AnimatLab  2
Test
OsgWorldCoordinateNodeVisitor.cpp
1 #include "StdAfx.h"
2 #include "OsgWorldCoordinateNodeVisitor.h"
3 
4 
5 namespace OsgAnimatSim
6 {
7  namespace Visualization
8  {
9 
10 
11 void OsgWorldCoordinateNodeVisitor::apply(osg::Node &node)
12 {
13  if (!done)
14  {
15  if ( 0 == node.getNumParents() ) // no parents
16  {
17  wcMatrix.set( osg::computeLocalToWorld(this->getNodePath()) );
18 
19  done = true;
20  }
21  traverse(node);
22  }
23 }
24 
25  }// end Visualization
26 }//end OsgAnimatSim
Classes for implementing the cm-labs vortex physics engine for AnimatLab.