]> git.mxchange.org Git - flightgear.git/commitdiff
Mathias Fröhlich:
authorehofman <ehofman>
Wed, 8 Dec 2004 14:48:06 +0000 (14:48 +0000)
committerehofman <ehofman>
Wed, 8 Dec 2004 14:48:06 +0000 (14:48 +0000)
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
src/FDM/groundcache.hxx

index 683bb27d117d916619bf9de45d07106bd21e9a79..c6f5cf8692b2013655fd4a5440fe2a3d0c4b4388 100644 (file)
 #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 )
 {
index be4293db58f9cb9f6567fdda1c65e9302393d1d6..9568129b4c6afd19c544f79f761baeb874272bf0 100644 (file)
@@ -30,6 +30,9 @@
 
 class FGGroundCache {
 public:
+    FGGroundCache();
+    ~FGGroundCache();
+
     //////////////////////////////////////////////////////////////////////////
     // Ground handling routines
     //////////////////////////////////////////////////////////////////////////