3 #include "VsMouseSpring.h"
4 #include "VsMovableItem.h"
7 #include "VsMotorizedJoint.h"
8 #include "VsRigidBody.h"
10 #include "VsSimulator.h"
11 #include "VsOsgUserDataVisitor.h"
12 #include "VsOsgUserData.h"
13 #include "VsDragger.h"
17 namespace Visualization
20 VsOsgUserDataVisitor::VsOsgUserDataVisitor(
VsMovableItem *lpItem) :
osg::NodeVisitor(
osg::NodeVisitor::TRAVERSE_ALL_CHILDREN )
25 setNodeMaskOverride(0xFFFFFFFF);
28 VsOsgUserDataVisitor::~VsOsgUserDataVisitor(
void)
33 void VsOsgUserDataVisitor::apply(osg::Geode &osgGeode)
35 int iCount = osgGeode.getNumDrawables();
37 for(
int iIdx=0; iIdx<iCount; iIdx++)
39 osg::Drawable *lpDraw = osgGeode.getDrawable(iIdx);
42 AnimatBase *lpAB =
dynamic_cast<AnimatBase *
>(m_lpItem);
44 lpDraw->setName(lpAB->Name() +
"_Drawable");
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
Declares the vortex structure class.