From: frohlich Date: Sat, 14 Mar 2009 09:16:06 +0000 (+0000) Subject: Make the debug geometry stuff work with a time argument. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=252deed5b93fb0545f3d544a37317ab852fb4849;p=simgear.git Make the debug geometry stuff work with a time argument. Modified Files: simgear/scene/bvh/BVHDebugCollectVisitor.hxx --- diff --git a/simgear/scene/bvh/BVHDebugCollectVisitor.hxx b/simgear/scene/bvh/BVHDebugCollectVisitor.hxx index 11bbd9f1..07834e64 100644 --- a/simgear/scene/bvh/BVHDebugCollectVisitor.hxx +++ b/simgear/scene/bvh/BVHDebugCollectVisitor.hxx @@ -55,8 +55,9 @@ class BVHStaticNode; class BVHDebugCollectVisitor : public BVHVisitor { public: - BVHDebugCollectVisitor(unsigned level = ~0u) : + BVHDebugCollectVisitor(const double& time, unsigned level = ~0u) : _group(new osg::Group), + _time(time), _level(level), _currentLevel(0) { @@ -100,8 +101,7 @@ public: addNodeSphere(node); osg::ref_ptr oldGroup = _group; osg::ref_ptr transform = new osg::MatrixTransform; - transform->setMatrix(osg::Matrix(node.getToWorldReferenceTransform().data())); - double tt = node.getReferenceTime() - node.getEndTime(); + transform->setMatrix(osg::Matrix(node.getToWorldTransform(_time).data())); _group = transform; ++_currentLevel; node.traverse(*this); @@ -200,6 +200,7 @@ private: } osg::ref_ptr _group; + const double _time; const unsigned _level; unsigned _currentLevel; };