5 #if !defined(AFX_VSJOINT_H__93EDBBFE_2FA0_467C_970F_1775454FE94E__INCLUDED_)
6 #define AFX_VSJOINT_H__93EDBBFE_2FA0_467C_970F_1775454FE94E__INCLUDED_
35 Vx::VxConstraint *m_vxJoint;
36 Vx::VxConstraint::CoordinateID m_iCoordID;
42 osg::Matrix m_osgChildOffsetMatrix;
43 osg::ref_ptr< osg::MatrixTransform> m_osgChildOffsetMT;
45 #pragma region DefaultBallGraphicsItems
69 virtual void SetThisPointers();
70 void UpdatePosition();
72 virtual void ResetDraggerOnResize();
73 virtual void DeleteJointGraphics();
74 virtual void CreateJointGraphics();
75 virtual void SetupGraphics();
76 virtual void DeleteGraphics();
77 virtual void SetupPhysics();
78 virtual VxVector3 NormalizeAxis(CStdFPoint vLocalRot);
79 virtual void UpdatePositionAndRotationFromMatrix();
81 virtual void LocalMatrix(osg::Matrix osgLocalMT);
82 virtual void ChildOffsetMatrix(osg::Matrix osgMT);
83 virtual float GetCurrentVxJointPos();
89 virtual osg::Group *ParentOSG();
90 virtual osg::Group *ChildOSG();
92 virtual void SetAlpha();
94 virtual void Initialize();
95 virtual void SetBody();
96 virtual void Physics_ResetSimulation();
97 virtual void Physics_CollectData();
98 virtual bool Physics_SetData(
const std::string &strDataType,
const std::string &strValue);
99 virtual void Physics_QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
100 virtual void Physics_Resize();
102 virtual Vx::VxConstraint* Constraint() {
return m_vxJoint;};
103 virtual Vx::VxConstraint::CoordinateID CoordinateID() {
return m_iCoordID;};
106 virtual void Physics_SetParent(MovableItem *lpParent);
107 virtual void Physics_SetChild(MovableItem *lpChild);
108 virtual void Physics_UpdateMatrix();
109 virtual void Physics_PositionChanged();
110 virtual void Physics_RotationChanged();
111 virtual void BuildLocalMatrix();
112 virtual void BuildLocalMatrix(CStdFPoint localPos, CStdFPoint localRot, std::string strName);
113 virtual void Physics_EnableCollision(RigidBody *lpBody) {};
114 virtual void Physics_DisableCollision(RigidBody *lpBody) {};
115 virtual void Physics_AddBodyForceAtLocalPos(
float fltPx,
float fltPy,
float fltPz,
float fltFx,
float fltFy,
float fltFz,
bool bScaleUnits) {};
116 virtual void Physics_AddBodyForceAtWorldPos(
float fltPx,
float fltPy,
float fltPz,
float fltFx,
float fltFy,
float fltFz,
bool bScaleUnits) {};
117 virtual void Physics_AddBodyTorque(
float fltTx,
float fltTy,
float fltTz,
bool bScaleUnits) {};
118 virtual CStdFPoint Physics_GetVelocityAtPoint(
float x,
float y,
float z) {CStdFPoint v;
return v;};
119 virtual float Physics_GetMass() {
return 0;};
120 virtual float Physics_GetDensity() {
return 0;};
121 virtual bool Physics_CalculateLocalPosForWorldPos(
float fltWorldX,
float fltWorldY,
float fltWorldZ, CStdFPoint &vLocalPos);
128 #endif // !defined(AFX_VSJOINT_H__93EDBBFE_2FA0_467C_970F_1775454FE94E__INCLUDED_)
osg::ref_ptr< osg::StateSet > m_osgDefaultBallSS
The osg default ball state set.
osg::ref_ptr< osg::Geometry > m_osgDefaultBall
The osg default ball geometry.
osg::ref_ptr< osg::MatrixTransform > m_osgDefaultBallMT
The osg default ball matrix transform.
A common class for all rigid body data specific to vortex.
A common class for all joint data specific to vortex.
osg::ref_ptr< osg::Material > m_osgDefaultBallMat
The osg default ball material.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
osg::ref_ptr< osg::MatrixTransform > m_osgJointMT
The osg joint matrix transform.