]> git.mxchange.org Git - simgear.git/commitdiff
Reset: model placement can drop OSG nodes.
authorJames Turner <zakalawe@mac.com>
Sun, 6 Oct 2013 17:07:54 +0000 (19:07 +0200)
committerJames Turner <zakalawe@mac.com>
Wed, 9 Oct 2013 07:59:33 +0000 (09:59 +0200)
simgear/scene/model/placement.cxx
simgear/scene/model/placement.hxx

index e1c5a0a5abb2a668c6e4173866853fc299dd466b..7b6a0b6930f307d3292a40590de87d2175cb3a7c 100644 (file)
@@ -44,6 +44,12 @@ SGModelPlacement::init( osg::Node * model )
   _selector->setValue(0, 1);
 }
 
+void SGModelPlacement::clear()
+{
+    _selector = NULL;
+    _transform = NULL;
+}
+
 void
 SGModelPlacement::update()
 {
index 97d5cda5e46305e47dc835e1980069d5bb7d2475..84aecac237aca8ffae3bd9780a9e2b0be5183083 100644 (file)
@@ -42,7 +42,8 @@ public:
   virtual ~SGModelPlacement ();
 
   virtual void init( osg::Node* model );
-
+  void clear();
+  
   virtual void update();
 
   virtual osg::Node* getSceneGraph () { return _selector.get(); }