From 821436441499c1f8233aa3957b0143d8cf1f85f6 Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 8 Dec 2004 14:48:06 +0000 Subject: [PATCH] =?utf8?q?Mathias=20Fr=F6hlich:?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I still work on getting the YASim models see the detailed environment especially the carrier. I have *forgotten* to initialize and to destruct the ground cache object! Oooopppss! --- src/FDM/groundcache.cxx | 16 ++++++++++++++++ src/FDM/groundcache.hxx | 3 +++ 2 files changed, 19 insertions(+) diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index 683bb27d1..c6f5cf869 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -37,6 +37,22 @@ #include "flight.hxx" #include "groundcache.hxx" +FGGroundCache::FGGroundCache() +{ + sgdSetVec3(cache_center, 0.0, 0.0, 0.0); + ground_radius = 0.0; + cache_ref_time = 0.0; + wire_id = 0; + sgdSetVec3(reference_wgs84_point, 0.0, 0.0, 0.0); + reference_vehicle_radius = 0.0; + found_ground = false; +} + +FGGroundCache::~FGGroundCache() +{ + cache_root.removeAllKids(); +} + FGGroundCache::GroundProperty* FGGroundCache::extractGroundProperty( ssgLeaf* l ) { diff --git a/src/FDM/groundcache.hxx b/src/FDM/groundcache.hxx index be4293db5..9568129b4 100644 --- a/src/FDM/groundcache.hxx +++ b/src/FDM/groundcache.hxx @@ -30,6 +30,9 @@ class FGGroundCache { public: + FGGroundCache(); + ~FGGroundCache(); + ////////////////////////////////////////////////////////////////////////// // Ground handling routines ////////////////////////////////////////////////////////////////////////// -- 2.39.5