3 #include "RbMovableItem.h"
4 #include "RbSimulator.h"
15 RbMovableItem::RbMovableItem()
21 m_lpParentRbMI = NULL;
26 RbMovableItem::~RbMovableItem()
30 void RbMovableItem::SetThisPointers()
32 m_lpThisAB =
dynamic_cast<AnimatBase *
>(
this);
34 THROW_TEXT_ERROR(Rb_Err_lThisPointerNotDefined, Rb_Err_strThisPointerNotDefined,
"m_lpThisAB");
36 m_lpThisMI =
dynamic_cast<MovableItem *
>(
this);
38 THROW_TEXT_ERROR(Rb_Err_lThisPointerNotDefined, Rb_Err_strThisPointerNotDefined,
"m_lpThisMI, " + m_lpThisAB->Name());
42 THROW_TEXT_ERROR(Rb_Err_lThisPointerNotDefined, Rb_Err_strThisPointerNotDefined,
"m_lpThisRbMI, " + m_lpThisAB->Name());
44 m_lpThisMI->PhysicsMovableItem(
this);
51 m_lpRbSim =
dynamic_cast<RbSimulator *
>(m_lpThisAB->GetSimulator());
53 THROW_TEXT_ERROR(Rb_Err_lThisPointerNotDefined, Rb_Err_strThisPointerNotDefined,
"m_lpRbSim, " + m_lpThisAB->Name());
59 std::string RbMovableItem::Physics_ID()
62 return m_lpThisAB->ID();
67 #pragma region Selection-Code
69 void RbMovableItem::Physics_Selected(
bool bValue,
bool bSelectMultiple)
75 float *RbMovableItem::Physics_GetDataPointer(
const std::string &strDataType) {
return NULL;}
79 return m_lpParentRbMI;
82 bool RbMovableItem::Physics_CalculateLocalPosForWorldPos(
float fltWorldX,
float fltWorldY,
float fltWorldZ, CStdFPoint &vLocalPos)
87 void RbMovableItem::Physics_UpdateMatrix()
91 void RbMovableItem::Physics_UpdateAbsolutePosition()
95 void RbMovableItem::Physics_LoadLocalTransformMatrix(CStdXml &oXml)
99 void RbMovableItem::Physics_SaveLocalTransformMatrix(CStdXml &oXml)
103 std::string RbMovableItem::Physics_GetLocalTransformMatrixString()
108 void RbMovableItem::Physics_ResizeDragHandler(
float fltRadius)
112 void RbMovableItem::Physics_ResetGraphicsAndPhysics()
116 void RbMovableItem::Physics_PositionChanged()
120 void RbMovableItem::Physics_RotationChanged()
124 BoundingBox RbMovableItem::Physics_GetBoundingBox()
130 float RbMovableItem::Physics_GetBoundingRadius()
132 BoundingBox bb = Physics_GetBoundingBox();
133 return bb.MaxDimension();
136 void RbMovableItem::Physics_CollectData()
140 void RbMovableItem::Physics_ResetSimulation()
144 void RbMovableItem::Physics_OrientNewPart(
float fltXPos,
float fltYPos,
float fltZPos,
float fltXNorm,
float fltYNorm,
float fltZNorm)
148 void RbMovableItem::CreateItem()
150 m_lpThisAB->Initialize();
float m_fltReportNull
Used to report back nulls.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.