10 #include <osg/ShapeDrawable>
13 #include <a_utils/a_utils.h>
84 osg::ref_ptr<osg::Switch> m_pSelectionSwitch;
85 osg::ref_ptr<osg::Geode> m_pSelectionGeode;
86 osg::ref_ptr<osg::ShapeDrawable> m_pSelectionDrawable;
87 osg::ref_ptr<osg::Box> m_pSelectionBox;
148 virtual tResult
SetHistory(tBool bEnabled, tUInt32 nCount = 0);
251 class cImplementation;
Base class for objects that can be managed with cBaseObjectScene.
tBool IsUpdated()
Returns whether or not this object has been updated since the last Reset call.
virtual tResult SetHistory(tBool bEnabled, tUInt32 nCount=0)
Enables or disable the history trail of this object.
osg::Vec3d GetMotion()
Returns the current motion vector.
tResult Reset()
Resets the updated property to false.
virtual tResult SetRotation(tFloat64 fRotX, tFloat64 fRotY, tFloat64 fRotZ)
Sets the rotation (attitude) of the object.
osg::ref_ptr< osg::ShapeDrawable > m_pDrawable
The drawable for the box.
tBool m_bUpdated
Whether or not this object has been updated.
virtual tResult SetMotionVector(tBool bEnabled)
Enables or disables the motion vector.
virtual ~cBaseObject()
Destructor.
tBool m_bSelected
Whether or not this object is selected.
virtual tResult SetMotion(tFloat64 fMotionX, tFloat64 fMotionY, tFloat64 fMotionZ)
Sets the motion vector of the object.
osg::ref_ptr< osg::Vec3Array > m_pMotionVector
The start and end point of the motion vector.
osg::ref_ptr< osg::DrawArrays > m_pMotionArray
This will do the actual drawing of the motion vector.
osg::Vec3d GetRotation()
Returns the current rotation.
virtual tBool IsSelected()
Returns the selected property of the object.
osg::ref_ptr< osg::Geometry > m_pHistoryGeom
Geometry object used for rendering the history trail.
tUInt32 GetId()
Returns the id of the object.
osg::Vec3d GetSize()
Returns the current size.
osg::ref_ptr< osg::Vec3Array > m_pPositionHistory
This will store old positions for drawing the history trail.
osg::ref_ptr< osg::DrawArrays > m_pHistoryArray
This will do the actual drawing of the history trail.
std::unique_ptr< cImplementation > m_pImplementation
D-Pointer implementation.
tResult Update()
Base Implementation sets the updated property to true.
osg::Vec3d m_vPos
The current position of the object.
virtual tResult SetSelected(tBool bSelected)
Gives the object a chance to change its appearance when being selected or unselected.
virtual tResult SetSize(tFloat64 fSizeX, tFloat64 fSizeY, tFloat64 fSizeZ)
Sets the dimensions of the object.
virtual tResult SetColor(tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha)
Sets the color of the object.
cBaseObject(tUInt32 nId)
Constructor.
virtual tResult UpdateSelection()
Used to update the selection sphere.
osg::ref_ptr< osg::PositionAttitudeTransform > m_pTransform
The transform that applies the translation and rotation to the box.
virtual tResult SetPosition(tFloat64 fPosX, tFloat64 fPosY, tFloat64 fPosZ)
Sets the position of the object.
tBool m_bHistory
Whether or not to show the history trail.
osg::Vec3d GetPosition()
Returns the current position.
osg::ref_ptr< osg::Geometry > m_pMotionGeom
Geometry object used for rendering the motion vector.
tBool m_bMotionVector
Whether or not to show the motion vector.
osg::ref_ptr< osg::Vec4Array > m_pColorArray
The color array used for drawing the history trail and the motion vector.
osg::ref_ptr< osg::Box > m_pBox
The box that represents the object.
tUInt32 m_nHistorySize
The maximum amount of positions in the m_pPositionHistory array.