8 #include "OsgMovableItem.h"
10 #include "OsgRigidBody.h"
13 #include "OsgDragger.h"
14 #include "OsgSimulator.h"
45 Structure::Body(lpBody);
49 THROW_TEXT_ERROR(Osg_Err_lUnableToConvertToVsRigidBody, Osg_Err_strUnableToConvertToVsRigidBody,
"ID: " + lpBody->Name());
52 void OsgStructure::SetThisPointers()
54 OsgMovableItem::SetThisPointers();
56 m_lpThisST =
dynamic_cast<Structure *
>(
this);
58 THROW_TEXT_ERROR(Osg_Err_lThisPointerNotDefined, Osg_Err_strThisPointerNotDefined,
"m_lpThisST, " + m_lpThisAB->Name());
61 osg::MatrixTransform *OsgStructure::ParentOSG()
63 return GetOsgSimulator()->OSGRoot();
66 void OsgStructure::Create()
73 void OsgStructure::SetupPhysics()
79 OsgMovableItem::Physics_ResetSimulation();
81 Structure::ResetSimulation();
84 void OsgStructure::UpdatePositionAndRotationFromMatrix()
86 OsgMovableItem::UpdatePositionAndRotationFromMatrix();
90 m_lpOsgBody->EndGripDrag();
93 m_osgFinalMatrix = m_lpOsgBody->FinalMatrix();
94 Physics_UpdateAbsolutePosition();
OsgStructure()
Default constructor.
virtual ~OsgStructure()
Destructor.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
virtual RigidBody * Body()
Gets the root body.
Structure()
Default constructor.
virtual void ResetSimulation()
Resets the simulation back to time 0.
Declares the vortex structure class.