AnimatLab  2
Test
OsgAnimatSim::Environment::OsgMovableItem Class Referenceabstract
+ Inheritance diagram for OsgAnimatSim::Environment::OsgMovableItem:
+ Collaboration diagram for OsgAnimatSim::Environment::OsgMovableItem:

Public Member Functions

virtual bool AddOsgNodeToParent ()
 
virtual void BuildLocalMatrix ()
 
virtual void BuildLocalMatrix (CStdFPoint vLocalOffset)
 
virtual void BuildLocalMatrix (CStdFPoint localPos, CStdFPoint vLocalOffset, CStdFPoint localRot, std::string strName)
 
virtual void CreateItem ()
 
virtual void DeleteGraphics ()
 
virtual void DeletePhysics (bool bIncludeChildren)=0
 
virtual void EndGripDrag ()
 
virtual osg::Matrix FinalMatrix ()
 
virtual void FinalMatrix (osg::Matrix vFinal)
 
virtual osg::MatrixTransform * GetCameraMatrixTransform ()
 Gets the matrix transform used by the camera for the mouse spring. More...
 
virtual osg::Matrix GetComMatrix (bool bInvert=false)
 
virtual osg::MatrixTransform * GetMatrixTransform ()
 
virtual OsgSimulatorGetOsgSimulator ()
 
virtual CStdFPoint GetOSGWorldCoords ()
 
virtual osg::Matrix GetOSGWorldMatrix (bool bUpdate=false)
 
virtual osg::Matrix GetParentComMatrix (bool bInvert=false)
 
virtual osg::Matrix GetParentPhysicsWorldMatrix ()
 
virtual osg::Matrix GetParentWorldMatrix ()
 
virtual osg::Matrix GetPhysicsWorldMatrix ()
 
virtual osg::Matrix GetWorldMatrix ()
 
virtual osg::Matrix LocalMatrix ()
 
virtual osg::Group * NodeGroup ()
 
virtual osg::MatrixTransform * ParentOSG ()=0
 
virtual void Physics_AfterResetSimulation ()
 
virtual bool Physics_CalculateLocalPosForWorldPos (float fltWorldX, float fltWorldY, float fltWorldZ, CStdFPoint &vLocalPos)
 
virtual void Physics_CollectData ()
 
virtual void Physics_CollectExtraData ()
 
virtual BoundingBox Physics_GetBoundingBox ()
 
virtual float Physics_GetBoundingRadius ()
 
virtual float * Physics_GetDataPointer (const std::string &strDataType)
 
virtual std::string Physics_GetLocalTransformMatrixString ()
 
virtual std::string Physics_ID ()
 
virtual void Physics_LoadLocalTransformMatrix (CStdXml &oXml)
 
virtual void Physics_OrientNewPart (float fltXPos, float fltYPos, float fltZPos, float fltXNorm, float fltYNorm, float fltZNorm)
 
virtual void Physics_PositionChanged ()
 
virtual void Physics_ResetGraphicsAndPhysics ()
 
virtual void Physics_ResetSimulation ()
 
virtual void Physics_ResizeDragHandler (float fltRadius)
 
virtual void Physics_RotationChanged ()
 
virtual void Physics_SaveLocalTransformMatrix (CStdXml &oXml)
 
virtual void Physics_Selected (bool bValue, bool bSelectMultiple)
 
virtual void Physics_SelectedVertex (float fltXPos, float fltYPos, float fltZPos)
 
virtual void Physics_SetChild (MovableItem *lpParent)
 
virtual void Physics_SetColor ()
 
virtual void Physics_SetParent (MovableItem *lpParent)
 
virtual void Physics_TextureChanged ()
 
virtual void Physics_UpdateAbsolutePosition ()
 
virtual void Physics_UpdateMatrix ()
 
virtual osg::Group * RootGroup ()
 
virtual void SetAlpha ()
 
virtual void SetColor (CStdColor &vAmbient, CStdColor &vDiffuse, CStdColor &vSpecular, float fltShininess)
 
virtual void SetCulling ()
 
virtual void SetMaterialAlpha (osg::Material *osgMat, osg::StateSet *ss, float fltAlpha)
 
virtual void SetTexture (std::string strTexture)
 
virtual void SetupGraphics ()
 
virtual void SetupPhysics ()=0
 
virtual void SetVisible (bool bVisible)
 
virtual void SetVisible (osg::Node *osgNode, bool bVisible)
 
virtual void StartGripDrag ()
 
virtual OsgMovableItemVsParent ()
 
- Public Member Functions inherited from AnimatSim::Environment::IPhysicsMovableItem
virtual void Physics_Resize ()=0
 
virtual void Physics_SetChild (MovableItem *lpChild)=0
 
virtual void Physics_SetParent (MovableItem *lpParent)=0
 

Protected Member Functions

virtual void AttachedPartMovedOrRotated (std::string strID)
 
virtual osg::Matrix CalculateTransformRelativeToParent (osg::Matrix osgLocalMatrix)
 
virtual void CreateDragger (std::string strName)
 
virtual void CreateGeometry (bool bOverrideStatic=false)
 
virtual void CreateGraphicsGeometry ()
 
virtual void CreatePhysicsGeometry ()
 
virtual void CreateSelectedGraphics (std::string strName)
 
virtual void CreateSelectedVertex (std::string strName)
 
virtual void DeleteSelectedVertex ()
 
virtual void GeometryRotationMatrix (osg::Matrix osgGeometryMT)
 
virtual void HideSelectedVertex ()
 
virtual void InitializeGraphicsGeometry ()
 
virtual void LocalMatrix (osg::Matrix osgLocalMT)
 
virtual void ResetPhyiscsAndChildJoints ()
 
virtual void ResizePhysicsGeometry ()
 
virtual void SetThisPointers ()
 
virtual void ShowSelectedVertex ()
 
virtual void UpdatePositionAndRotationFromMatrix ()
 
virtual void UpdatePositionAndRotationFromMatrix (osg::Matrix osgMT)
 
virtual void UpdateWorldMatrix ()
 

Protected Attributes

bool m_bCullBackfaces
 
osg::StateAttribute::GLMode m_eTextureMode
 
OsgSimulatorm_lpOsgSim
 
OsgMovableItemm_lpParentVsMI
 
AnimatBase * m_lpThisAB
 
MovableItem * m_lpThisMI
 
OsgMovableItemm_lpThisVsMI
 
osg::ref_ptr< osg::CullFace > m_osgCull
 
osg::ref_ptr< osg::Node > m_osgDebugNode
 
osg::ref_ptr< OsgDragger > m_osgDragger
 
osg::Matrix m_osgFinalMatrix
 
osg::ref_ptr< osg::Geometry > m_osgGeometry
 
osg::ref_ptr< osg::MatrixTransform > m_osgGeometryRotationMT
 
osg::Matrix m_osgLocalMatrix
 
osg::ref_ptr< osg::Material > m_osgMaterial
 
osg::ref_ptr< osgManipulator::Selection > m_osgMT
 
osg::ref_ptr< osg::Node > m_osgNode
 
osg::ref_ptr< osg::Group > m_osgNodeGroup
 
osg::ref_ptr< osg::MatrixTransform > m_osgParent
 
osg::ref_ptr< osg::Group > m_osgRoot
 
osg::ref_ptr< osg::Group > m_osgSelectedGroup
 
osg::ref_ptr< osg::MatrixTransform > m_osgSelVertexMT
 
osg::ref_ptr< osg::Geode > m_osgSelVertexNode
 
osg::ref_ptr< osg::StateSet > m_osgStateSet
 
osg::ref_ptr< osg::Texture2D > m_osgTexture
 
osg::Matrix m_osgWorldMatrix
 

Detailed Description

Definition at line 13 of file OsgMovableItem.h.

Member Function Documentation

osg::MatrixTransform * OsgAnimatSim::Environment::OsgMovableItem::GetCameraMatrixTransform ( )
virtual

Gets the matrix transform used by the camera for the mouse spring.

Sometimes it is necessary to rotate the geometry that was generated to match the correct orientation of the physics geometry. If this MT is set then this is added BEFORE the local matrix so we can make the graphics and physics geometries match. If it is not set then it is not used. The mouse spring needs to have the end matrix transform to work correctly, but I do not want to use that for the matrix other parts use because it adds an extra rotation that it should not to other parts then.

Author
dcofer
Date
5/15/2011
Returns
Pointer to the matrix transform used by the camera.

Definition at line 464 of file OsgMovableItem.cpp.

References m_osgGeometryRotationMT.

void OsgAnimatSim::Environment::OsgMovableItem::UpdatePositionAndRotationFromMatrix ( osg::Matrix  osgMT)
protectedvirtual

We are just manually resetting the sim positions back to their original values.

Definition at line 493 of file OsgMovableItem.cpp.

Member Data Documentation

osg::ref_ptr< osg::MatrixTransform> OsgAnimatSim::Environment::OsgMovableItem::m_osgGeometryRotationMT
protected

Sometimes it is necessary to rotate the geometry that was generated to match the correct orientation of the physics geometry. If this MT is set then this is added BEFORE the local matrix so we can make the graphics and physics geometries match. If it is not set then it is not used.

Definition at line 47 of file OsgMovableItem.h.

Referenced by GetCameraMatrixTransform().


The documentation for this class was generated from the following files: