From: James Turner Date: Sun, 6 Oct 2013 17:07:54 +0000 (+0200) Subject: Reset: model placement can drop OSG nodes. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1099a3bdf018b8aff8e502cae2b5a640653d3ed4;p=simgear.git Reset: model placement can drop OSG nodes. --- diff --git a/simgear/scene/model/placement.cxx b/simgear/scene/model/placement.cxx index e1c5a0a5..7b6a0b69 100644 --- a/simgear/scene/model/placement.cxx +++ b/simgear/scene/model/placement.cxx @@ -44,6 +44,12 @@ SGModelPlacement::init( osg::Node * model ) _selector->setValue(0, 1); } +void SGModelPlacement::clear() +{ + _selector = NULL; + _transform = NULL; +} + void SGModelPlacement::update() { diff --git a/simgear/scene/model/placement.hxx b/simgear/scene/model/placement.hxx index 97d5cda5..84aecac2 100644 --- a/simgear/scene/model/placement.hxx +++ b/simgear/scene/model/placement.hxx @@ -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(); }