AnimatLab  2
Test
OsgUserData.h
1 #pragma once
2 
3 namespace OsgAnimatSim
4 {
5  namespace Visualization
6  {
7 
8  class ANIMAT_OSG_PORT OsgUserData : public osg::Referenced
9  {
10  protected:
11  OsgMovableItem *m_lpItem;
12 
13  public:
14  OsgUserData(OsgMovableItem *lpItem);
15  ~OsgUserData(void);
16 
17  OsgBody *GetBodyPart() {return dynamic_cast<OsgBody *>(m_lpItem);};
18 
19  OsgMovableItem *GetOsgMovable() {return m_lpItem;};
20  MovableItem *GetMovable() {return dynamic_cast<MovableItem *>(m_lpItem);};
21 
22  OsgRigidBody *GetOsgBody() {return dynamic_cast<OsgRigidBody *>(m_lpItem);};
23  RigidBody *GetBody() {return dynamic_cast<RigidBody *>(m_lpItem);};
24 
25  OsgJoint *GetOsgJoint() {return dynamic_cast<OsgJoint *>(m_lpItem);};
26  Joint *GetJoint() {return dynamic_cast<Joint *>(m_lpItem);};
27 
28  OsgStructure *GetOsgStucture() {return dynamic_cast<OsgStructure *>(m_lpItem);};
29  Structure *GetStructure() {return dynamic_cast<Structure *>(m_lpItem);};
30 
31  Light *GetLight() {return dynamic_cast<Light *>(m_lpItem);};
32  };
33 
34  }// end Visualization
35 }// end OsgAnimatSim
36 
Classes for implementing the cm-labs vortex physics engine for AnimatLab.