AnimatLab  2
Test
AnimatSim::Environment::MovableItem Class Reference

Baes class for all items that can be moved/roated within the environment. More...

#include <MovableItem.h>

+ Inheritance diagram for AnimatSim::Environment::MovableItem:
+ Collaboration diagram for AnimatSim::Environment::MovableItem:

Public Member Functions

 MovableItem (void)
 Default constructor. More...
 
virtual ~MovableItem (void)
 Destructor. More...
 
virtual CStdFPoint AbsolutePosition ()
 Gets the absolute position of this body part. More...
 
virtual void AbsolutePosition (CStdFPoint &oPoint)
 Sets the absolute position of this body part. (m_oAbsPosition) More...
 
virtual void AbsolutePosition (float fltX, float fltY, float fltZ)
 Sets the absolute position of this body part. (m_oAbsPosition) More...
 
virtual void AddBodyClicked (float fltPosX, float fltPosY, float fltPosZ, float fltNormX, float fltNormY, float fltNormZ)
 Called when the user clicks on this object while the AddBody mode is active. More...
 
virtual bool AllowMouseManipulation ()
 Tells if a given part can be manipulated using the mouse and draggers. More...
 
virtual bool AllowRotateDragX ()
 Gets whether this body part can be rotated along the x-axis by the user with the drag handlers. More...
 
virtual bool AllowRotateDragY ()
 Gets whether this body part can be rotated along the y-axis by the user with the drag handlers. More...
 
virtual bool AllowRotateDragZ ()
 Gets whether this body part can be rotated along the z-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragX ()
 Gets whether this body part can be translated along the x-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragY ()
 Gets whether this body part can be translated along the y-axis by the user with the drag handlers. More...
 
virtual bool AllowTranslateDragZ ()
 Gets whether this body part can be translated along the z-axis by the user with the drag handlers. More...
 
virtual float Alpha ()
 Gets the current alpha. More...
 
virtual void Alpha (float fltAlpha)
 Sets the current alpha. More...
 
virtual CStdColorAmbient ()
 Gets the ambient color value. More...
 
virtual void Ambient (CStdColor &aryColor)
 
virtual void Ambient (float *aryColor)
 Sets the Ambient color. More...
 
virtual void Ambient (std::string strXml)
 Loads the Ambient color from an XML data packet. More...
 
virtual bool CalculateLocalPosForWorldPos (float fltWorldX, float fltWorldY, float fltWorldZ, CStdFPoint &vLocalPos)
 Calculates the local position values for matrix transform for the part to be in a specific world position. More...
 
virtual IMovableItemCallbackCallback ()
 Gets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation. More...
 
virtual void Callback (IMovableItemCallback *lpCallback)
 Sets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation. More...
 
virtual float CollisionsAlpha ()
 Gets the collisions alpha. More...
 
virtual void CollisionsAlpha (float fltVal)
 Sets the collisions alpha. More...
 
virtual CStdColorDiffuse ()
 Gets the diffuse color. More...
 
virtual void Diffuse (CStdColor &aryColor)
 
virtual void Diffuse (float *aryColor)
 Sets the Diffuse color. More...
 
virtual void Diffuse (std::string strXml)
 Loads the Diffuse color from an XML data packet. More...
 
virtual BoundingBox GetBoundingBox ()
 Gets the bounding box for this part. More...
 
virtual float GetBoundingRadius ()
 Gets the bounding radius of this part. More...
 
virtual CStdFPoint GetCurrentPosition ()
 Gets the current position of this part. More...
 
virtual float * GetDataPointer (const std::string &strDataType)
 
virtual float GraphicsAlpha ()
 Gets the graphics alpha. More...
 
virtual void GraphicsAlpha (float fltVal)
 Sets the graphics alpha. More...
 
virtual bool IsSelected ()
 Query if this object is selected. More...
 
virtual bool IsVisible ()
 Query if this object is visible. More...
 
virtual void IsVisible (bool bVal)
 Sets whether this part is visible or not. More...
 
virtual float JointsAlpha ()
 Gets the joints alpha. More...
 
virtual void JointsAlpha (float fltVal)
 Sets the joints alpha. More...
 
virtual void Load (CStdXml &oXml)
 
virtual std::string LocalTransformationMatrixString ()
 Returns a string representation of the transformation matrix of this object. This is primarily used to save off the transform matrix into the project file. More...
 
virtual void OrientNewPart (float fltXPos, float fltYPos, float fltZPos, float fltXNorm, float fltYNorm, float fltZNorm)
 Orients a new part based on where the parent was clicked and the normal of the surface face. More...
 
RigidBodyParent ()
 Gets the parent RigidBody of this part. More...
 
void Parent (RigidBody *lpValue)
 Sets the parent RigidBody of this part. More...
 
virtual IPhysicsMovableItemPhysicsMovableItem ()
 Gets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc.. More...
 
virtual void PhysicsMovableItem (IPhysicsMovableItem *lpBase)
 Sets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc.. More...
 
virtual CStdFPoint Position ()
 Gets the local position. (m_oPosition) More...
 
virtual void Position (CStdFPoint &oPoint, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition) More...
 
virtual void Position (float fltX, float fltY, float fltZ, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition) More...
 
virtual void Position (std::string strXml, bool bUseScaling=true, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the local position. (m_oPosition). This method is primarily used by the GUI to reset the local position using an xml data packet. More...
 
virtual void QueryProperties (CStdPtrArray< TypeProperty > &aryProperties)
 
virtual float ReceptiveFieldsAlpha ()
 Gets the receptive fields alpha. More...
 
virtual void ReceptiveFieldsAlpha (float fltVal)
 Sets the receptive fields alpha. More...
 
virtual CStdFPoint ReportPosition ()
 Gets the reported local position. (m_oReportPosition). More...
 
virtual void ReportPosition (CStdFPoint &oPoint)
 Sets the reported local position. (m_oReportPosition). More...
 
virtual void ReportPosition (float fltX, float fltY, float fltZ)
 Sets the reported local position. (m_oReportPosition). More...
 
virtual CStdFPoint ReportRotation ()
 Gets the reported rotation of this part. (m_oReportRotation) More...
 
virtual void ReportRotation (CStdFPoint &oPoint)
 Sets the reported rotation of this part. (m_oReportRotation) More...
 
virtual void ReportRotation (float fltX, float fltY, float fltZ)
 Sets the reported rotation of this part. (m_oReportRotation) More...
 
virtual CStdFPoint ReportWorldPosition ()
 Gets the reported world position. (m_oReportWorldPosition) More...
 
virtual void ReportWorldPosition (CStdFPoint &oPoint)
 Sets the reported world position (m_oReportWorldPosition) More...
 
virtual void ReportWorldPosition (float fltX, float fltY, float fltZ)
 Sets the reported world position (m_oReportWorldPosition) More...
 
virtual CStdFPoint Rotation ()
 Gets the rotation of this body in radians. More...
 
virtual void Rotation (CStdFPoint &oPoint, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation) More...
 
virtual void Rotation (float fltX, float fltY, float fltZ, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation) More...
 
virtual void Rotation (std::string strXml, bool bFireChangeEvent=false, bool bUpdateMatrix=true)
 Sets the rotation of this body in radians. (m_oRotation). This method is primarily used by the GUI to reset the rotation using an xml data packet. More...
 
virtual void Selected (bool bValue, bool bSelectMultiple)
 
virtual CStdFPoint SelectedVertex ()
 Gets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SelectedVertex (CStdFPoint &vPoint, bool bFireChangeEvent=false, bool bUpdatePhysics=true)
 Sets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SelectedVertex (float fltX, float fltY, float fltZ, bool bFireChangeEvent=false, bool bUpdatePhysics=true)
 Sets the relative position of the selected vertex. (m_vSelectedVertex) More...
 
virtual void SetBoundingBox (int iIdx, float fltVal)
 Sets one dimension of the bounding box. This does nothing for all parts except a mesh. More...
 
virtual bool SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
 
virtual float Shininess ()
 Gets the shininess. More...
 
virtual void Shininess (float fltVal)
 Sets the shininess value. More...
 
virtual float SimulationAlpha ()
 Gets the simulation alpha. More...
 
virtual void SimulationAlpha (float fltVal)
 Sets the simulation alpha. More...
 
virtual CStdColorSpecular ()
 Gets the specular color. More...
 
virtual void Specular (CStdColor &aryColor)
 
virtual void Specular (float *aryColor)
 Sets the Specular color. More...
 
virtual void Specular (std::string strXml)
 Loads the Specular color from an XML data packet. More...
 
virtual std::string Texture ()
 Gets the texture filename. More...
 
virtual void Texture (std::string strValue)
 Sets the Texture filename. More...
 
virtual CStdFPoint UpdateAbsolutePosition ()
 
virtual void UserDefinedDraggerRadius (float fltRadius)
 User defined dragger radius. More...
 
virtual float UserDefinedDraggerRadius ()
 Gets the user defined dragger radius. More...
 
virtual void VisualSelectionModeChanged (int iNewMode)
 Called when the visual selection mode changed in GUI. More...
 
virtual int VisualSelectionType ()
 Gets the visual selection type for this part. More...
 

Protected Member Functions

virtual void LoadPosition (CStdXml &oXml)
 Loads the items position. More...
 
virtual void LoadRotation (CStdXml &oXml)
 Loads the items rotation. More...
 

Protected Attributes

bool m_bIsSelected
 Keeps track of whether this movable item has been selected or not.
 
bool m_bIsVisible
 
float m_fltAlpha
 The current alpha transparency for this body part.
 
float m_fltCollisionsAlpha
 The alpha transparency used in the Collisions VisualSelectionMode.
 
float m_fltGraphicsAlpha
 The alpha transparency used in the Graphics VisualSelectionMode.
 
float m_fltJointsAlpha
 The alpha transparency used in the Joints VisualSelectionMode.
 
float m_fltReceptiveFieldsAlpha
 The alpha transparency used in the Receptive Fields VisualSelectionMode.
 
float m_fltReportIsVisible
 
float m_fltShininess
 The shininess of the part. A value between 0 and 128.
 
float m_fltSimulationAlpha
 The alpha transparency used in the Simulation VisualSelectionMode.
 
float m_fltUserDefinedDraggerRadius
 User defined drag handle radius. If this is -1 then the user has not set the value and the default is used.
 
IMovableItemCallbackm_lpCallback
 
Simulatorm_lpMovableSim
 The pointer to a Simulation.
 
RigidBodym_lpParent
 
IPhysicsMovableItemm_lpPhysicsMovableItem
 
CStdFPoint m_oAbsPosition
 
CStdFPoint m_oPosition
 These are rotation and position coords relative to the parent if this is a body part.
 
CStdFPoint m_oReportPosition
 This is used for reporting the position back to the GUI. It is the position scaled for distance units.
 
CStdFPoint m_oReportRotation
 
CStdFPoint m_oReportWorldPosition
 This is used for reporting the position back to the GUI. It is the world position scaled for distance units.
 
CStdFPoint m_oRotation
 
std::string m_strTexture
 An optional texture to apply to the rigid body.
 
CStdColor m_vAmbient
 The ambient color to apply to this part. It is specified as red, green, blue, and alpha.
 
CStdColor m_vDiffuse
 The diffuse color to apply to this part. It is specified as red, green, blue, and alpha.
 
CStdFPoint m_vSelectedVertex
 The relative position of the selected vertex.
 
CStdColor m_vSpecular
 The specular color to apply to this part. It is specified as red, green, blue, and alpha.
 

Detailed Description

Baes class for all items that can be moved/roated within the environment.

Author
dcofer
Date
4/22/2011

Definition at line 19 of file MovableItem.h.

Constructor & Destructor Documentation

AnimatSim::Environment::MovableItem::MovableItem ( void  )
AnimatSim::Environment::MovableItem::~MovableItem ( void  )
virtual

Destructor.

Author
dcofer
Date
3/2/2011

Definition at line 76 of file MovableItem.cpp.

Member Function Documentation

CStdFPoint AnimatSim::Environment::MovableItem::AbsolutePosition ( )
virtual

Gets the absolute position of this body part.

Author
dcofer
Date
3/2/2011
Returns
return m_oAbsPosition.

Definition at line 240 of file MovableItem.cpp.

References m_lpPhysicsMovableItem, and m_oAbsPosition.

void AnimatSim::Environment::MovableItem::AbsolutePosition ( CStdFPoint &  oPoint)
virtual

Sets the absolute position of this body part. (m_oAbsPosition)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new position.

Reimplemented in AnimatSim::Environment::Bodies::LineBase.

Definition at line 256 of file MovableItem.cpp.

References AnimatSim::Simulator::DistanceUnits(), m_lpMovableSim, m_oAbsPosition, and m_oReportWorldPosition.

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::AbsolutePosition ( float  fltX,
float  fltY,
float  fltZ 
)
virtual

Sets the absolute position of this body part. (m_oAbsPosition)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.

Definition at line 272 of file MovableItem.cpp.

References AnimatSim::Simulator::DistanceUnits(), m_lpMovableSim, m_oAbsPosition, and m_oReportWorldPosition.

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::AddBodyClicked ( float  fltPosX,
float  fltPosY,
float  fltPosZ,
float  fltNormX,
float  fltNormY,
float  fltNormZ 
)
virtual

Called when the user clicks on this object while the AddBody mode is active.

When the user selects the AddBody mode in the GUI then the simulation detects when a part is clicked in the simulation window. (This occurs in the VsCameraManipulator class). It gets the position of the click in global coordinates, and the normal vector for the surface that was clicked. We then need to pass this info back up the GUI and let it know the click occurred. This method uses the IMovableItemCallback object to send this info back up to the GUI.

Author
dcofer
Date
3/2/2011
Parameters
fltPosXThe position x coordinate.
fltPosYThe position y coordinate.
fltPosZThe position z coordinate.
fltNormXThe normal x coordinate.
fltNormYThe normal y coordinate.
fltNormZThe normal z coordinate.

Reimplemented in AnimatSim::Environment::BodyPart.

Definition at line 1204 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowMouseManipulation ( )
virtual

Tells if a given part can be manipulated using the mouse and draggers.

Author
dcofer
Date
3/2/2011
Returns
true if it can be manipulated, false if not.

Reimplemented in AnimatSim::Environment::Bodies::LineBase.

Definition at line 133 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowRotateDragX ( )
virtual

Gets whether this body part can be rotated along the x-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can rotate along x-axis.

Reimplemented in AnimatSim::Environment::Structure, AnimatSim::Environment::Bodies::Sensor, AnimatSim::Environment::Bodies::FluidPlane, and AnimatSim::Environment::Bodies::Terrain.

Definition at line 1092 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowRotateDragY ( )
virtual

Gets whether this body part can be rotated along the y-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can rotate along y-axis.

Reimplemented in AnimatSim::Environment::Structure, AnimatSim::Environment::Bodies::Sensor, AnimatSim::Environment::Bodies::FluidPlane, and AnimatSim::Environment::Bodies::Terrain.

Definition at line 1102 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowRotateDragZ ( )
virtual

Gets whether this body part can be rotated along the z-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can rotate along z-axis.

Reimplemented in AnimatSim::Environment::Structure, AnimatSim::Environment::Bodies::Sensor, AnimatSim::Environment::Bodies::FluidPlane, and AnimatSim::Environment::Bodies::Terrain.

Definition at line 1112 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowTranslateDragX ( )
virtual

Gets whether this body part can be translated along the x-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can drag along x-axis.

Reimplemented in AnimatSim::Environment::Structure.

Definition at line 1061 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowTranslateDragY ( )
virtual

Gets whether this body part can be translated along the y-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can drag along y-axis.

Reimplemented in AnimatSim::Environment::Structure.

Definition at line 1072 of file MovableItem.cpp.

bool AnimatSim::Environment::MovableItem::AllowTranslateDragZ ( )
virtual

Gets whether this body part can be translated along the z-axis by the user with the drag handlers.

Author
dcofer
Date
4/21/2011
Returns
true if can drag along z-axis.

Reimplemented in AnimatSim::Environment::Structure.

Definition at line 1082 of file MovableItem.cpp.

float AnimatSim::Environment::MovableItem::Alpha ( )
virtual

Gets the current alpha.

The current alpha is on of the various selection mode alphas like JointsAlpha. This is just the one that is currently selected.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 679 of file MovableItem.cpp.

References m_fltAlpha.

void AnimatSim::Environment::MovableItem::Alpha ( float  fltAlpha)
virtual

Sets the current alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltAlphaThe new Alpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 690 of file MovableItem.cpp.

References m_fltAlpha, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

CStdColor * AnimatSim::Environment::MovableItem::Ambient ( )
virtual

Gets the ambient color value.

Author
dcofer
Date
3/2/2011
Returns
Pointer to color data

Definition at line 705 of file MovableItem.cpp.

References m_vAmbient.

Referenced by Ambient().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Ambient ( float *  aryColor)
virtual

Sets the Ambient color.

Author
dcofer
Date
3/2/2011
Parameters
[in,out]aryColorThe color data.

Definition at line 729 of file MovableItem.cpp.

References Ambient().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Ambient ( std::string  strXml)
virtual

Loads the Ambient color from an XML data packet.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe color data in an xml data packet

Definition at line 744 of file MovableItem.cpp.

References Ambient(), and StdUtils::CStdColor::Load().

+ Here is the call graph for this function:

bool AnimatSim::Environment::MovableItem::CalculateLocalPosForWorldPos ( float  fltWorldX,
float  fltWorldY,
float  fltWorldZ,
CStdFPoint &  vLocalPos 
)
virtual

Calculates the local position values for matrix transform for the part to be in a specific world position.

Author
dcofer
Date
7/3/2011
Parameters
fltWorldXThe world x coordinate we want.
fltWorldYThe world y coordinate we want.
fltWorldZThe world z coordinate we want.
Returns
The calculated local position for world position.

Definition at line 1241 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

IMovableItemCallback * AnimatSim::Environment::MovableItem::Callback ( )
virtual

Gets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation.

Author
dcofer
Date
3/2/2011
Returns
Pointer to callback object if one exists, NULL else.

Definition at line 969 of file MovableItem.cpp.

References m_lpCallback.

Referenced by AnimatSim::Environment::Structure::Position().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Callback ( IMovableItemCallback lpCallback)
virtual

Sets the callback interface pointer. This is an interface pointer to a callback class that allows us to notify the GUI of events that occur within the simulation.

Author
dcofer
Date
3/2/2011
Parameters
[in,out]lpCallbackThe pointer to a callback interface object.

Definition at line 980 of file MovableItem.cpp.

References m_lpCallback.

float AnimatSim::Environment::MovableItem::CollisionsAlpha ( )
virtual

Gets the collisions alpha.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 560 of file MovableItem.cpp.

References m_fltCollisionsAlpha.

void AnimatSim::Environment::MovableItem::CollisionsAlpha ( float  fltVal)
virtual

Sets the collisions alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new CollisionsAlpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 571 of file MovableItem.cpp.

References m_fltCollisionsAlpha, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

CStdColor * AnimatSim::Environment::MovableItem::Diffuse ( )
virtual

Gets the diffuse color.

Author
dcofer
Date
3/2/2011
Returns
Pointer to color data

Definition at line 759 of file MovableItem.cpp.

References m_vDiffuse.

Referenced by Diffuse().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Diffuse ( float *  aryColor)
virtual

Sets the Diffuse color.

Author
dcofer
Date
3/2/2011
Parameters
[in,out]aryColorThe color data.

Definition at line 783 of file MovableItem.cpp.

References Diffuse().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Diffuse ( std::string  strXml)
virtual

Loads the Diffuse color from an XML data packet.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe color data in an xml data packet

Definition at line 797 of file MovableItem.cpp.

References Diffuse(), and StdUtils::CStdColor::Load().

+ Here is the call graph for this function:

BoundingBox AnimatSim::Environment::MovableItem::GetBoundingBox ( )
virtual

Gets the bounding box for this part.

Author
dcofer
Date
6/18/2011
Returns
The bounding box.

Definition at line 1030 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

Referenced by AnimatSim::Environment::Bodies::Mesh::SetBoundingBox().

+ Here is the caller graph for this function:

float AnimatSim::Environment::MovableItem::GetBoundingRadius ( )
virtual

Gets the bounding radius of this part.

Author
dcofer
Date
3/2/2011
Returns
The bounding radius.

Definition at line 1014 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

CStdFPoint AnimatSim::Environment::MovableItem::GetCurrentPosition ( )
virtual

Gets the current position of this part.

Author
dcofer
Date
3/2/2011
Returns
The current position.

Definition at line 286 of file MovableItem.cpp.

References m_oAbsPosition.

Referenced by AnimatSim::Environment::Bodies::LineBase::CalculateLength(), AnimatSim::Environment::Odor::CalculateOdorValue(), and AnimatSim::Environment::Bodies::Mouth::StepSimulation().

+ Here is the caller graph for this function:

float AnimatSim::Environment::MovableItem::GraphicsAlpha ( )
virtual

Gets the graphics alpha.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 531 of file MovableItem.cpp.

References m_fltGraphicsAlpha.

void AnimatSim::Environment::MovableItem::GraphicsAlpha ( float  fltVal)
virtual

Sets the graphics alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new GraphicsAlpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 542 of file MovableItem.cpp.

References m_fltGraphicsAlpha, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

bool AnimatSim::Environment::MovableItem::IsSelected ( )
virtual

Query if this object is selected.

Author
David Cofer
Date
10/8/2013
Returns
true if selected, false if not.

Definition at line 1152 of file MovableItem.cpp.

References m_bIsSelected.

bool AnimatSim::Environment::MovableItem::IsVisible ( )
virtual

Query if this object is visible.

Author
dcofer
Date
3/2/2011
Returns
true if visible, false if not.

Definition at line 504 of file MovableItem.cpp.

References m_bIsVisible.

void AnimatSim::Environment::MovableItem::IsVisible ( bool  bVal)
virtual

Sets whether this part is visible or not.

Author
dcofer
Date
3/2/2011
Parameters
bValtrue to make visible, false to make invisible.

Definition at line 514 of file MovableItem.cpp.

References m_bIsVisible, and m_lpPhysicsMovableItem.

float AnimatSim::Environment::MovableItem::JointsAlpha ( )
virtual

Gets the joints alpha.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 589 of file MovableItem.cpp.

References m_fltJointsAlpha.

void AnimatSim::Environment::MovableItem::JointsAlpha ( float  fltVal)
virtual

Sets the joints alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new JointsAlpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 600 of file MovableItem.cpp.

References m_fltJointsAlpha, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::LoadPosition ( CStdXml oXml)
protectedvirtual

Loads the items position.

I have split this off into its own virtual class because some derived classes may need to override this function. For example, RigidBody needs to override it to not set the position if it is the root body.

Author
dcofer
Date
5/14/2011
Parameters
[in,out]oXmlThe xml.

Reimplemented in AnimatSim::Environment::RigidBody.

Definition at line 1580 of file MovableItem.cpp.

References Position(), and StdUtils::Std_LoadPoint().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::LoadRotation ( CStdXml oXml)
protectedvirtual

Loads the items rotation.

I have split this off into its own virtual function to make it consistent with the LoadPosition method.

Author
dcofer
Date
5/14/2011
Parameters
[in,out]oXmlThe xml.

Definition at line 1598 of file MovableItem.cpp.

References Rotation(), and StdUtils::Std_LoadPoint().

+ Here is the call graph for this function:

std::string AnimatSim::Environment::MovableItem::LocalTransformationMatrixString ( )
virtual

Returns a string representation of the transformation matrix of this object. This is primarily used to save off the transform matrix into the project file.

Author
dcofer
Date
3/2/2011
Returns
String of transform matrix for saving.

Definition at line 488 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

void AnimatSim::Environment::MovableItem::OrientNewPart ( float  fltXPos,
float  fltYPos,
float  fltZPos,
float  fltXNorm,
float  fltYNorm,
float  fltZNorm 
)
virtual

Orients a new part based on where the parent was clicked and the normal of the surface face.

Author
dcofer
Date
6/18/2011
Parameters
fltXPosThe click x position.
fltYPosThe click y position.
fltZPosThe click z position.
fltXNormThe face normal x coordinate.
fltYNormTh face normale y coordinat.
fltZNormThe face normal z coordinate.

Reimplemented in AnimatSim::Environment::Bodies::LineBase.

Definition at line 1223 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

RigidBody * AnimatSim::Environment::MovableItem::Parent ( )

Gets the parent RigidBody of this part.

Author
dcofer
Date
3/2/2011
Returns
Pointer to the parent RigidBody of this part, NULL if not set.

Definition at line 90 of file MovableItem.cpp.

References m_lpParent.

Referenced by AnimatSim::Environment::RigidBody::LoadJoint(), AnimatSim::Environment::RigidBody::LoadRigidBody(), and AnimatSim::Environment::Structure::LoadRoot().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Parent ( RigidBody lpValue)

Sets the parent RigidBody of this part.

Author
dcofer
Date
3/2/2011
Parameters
[in,out]lpValueThe pointer to the parent RigidBody.

Definition at line 100 of file MovableItem.cpp.

References m_lpParent, and m_lpPhysicsMovableItem.

IPhysicsMovableItem * AnimatSim::Environment::MovableItem::PhysicsMovableItem ( )
virtual

Gets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc..

Author
dcofer
Date
3/2/2011
Returns
Pointer to Vs interface, NULL else.

Definition at line 992 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

Referenced by AnimatSim::Environment::Structure::Position().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::PhysicsMovableItem ( IPhysicsMovableItem lpBody)
virtual

Sets the physics body interface pointer. This is an interface reference to the Vs version of this object. It will allow us to call methods directly in the Vs (OSG) version of the object directly without having to overload a bunch of methods in each box, sphere, etc..

Author
dcofer
Date
3/2/2011
Parameters
[in,out]lpBodyThe pointer to the phsyics body interface.

Definition at line 1004 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

CStdFPoint AnimatSim::Environment::MovableItem::Position ( )
virtual

Gets the local position. (m_oPosition)

Author
dcofer
Date
3/2/2011
Returns
returns m_oPosition.

Reimplemented in AnimatSim::Environment::RigidBody, and AnimatSim::Environment::Structure.

Definition at line 143 of file MovableItem.cpp.

References m_oPosition.

Referenced by LoadPosition(), AnimatSim::Environment::RigidBody::LoadPosition(), Position(), AnimatSim::Environment::Structure::Position(), and AnimatSim::Environment::RigidBody::Position().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Position ( CStdFPoint &  oPoint,
bool  bUseScaling = true,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the local position. (m_oPosition)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new point to use to set the local position.
bUseScalingIf true then the position values that are passed in will be scaled by the unit scaling values.
bFireChangeEventIf true then this will call the IMovableItemCallback->PositionChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Reimplemented in AnimatSim::Environment::RigidBody, AnimatSim::Environment::Structure, AnimatSim::Environment::Bodies::LineBase, VortexAnimatSim::Environment::VsLight, OsgAnimatSim::Environment::OsgLight, VortexAnimatSim::Environment::Bodies::VsFluidPlane, and BulletAnimatSim::Environment::Bodies::BlFluidPlane.

Definition at line 161 of file MovableItem.cpp.

References AnimatSim::Simulator::DistanceUnits(), AnimatSim::Simulator::InverseDistanceUnits(), m_lpCallback, m_lpMovableSim, m_lpPhysicsMovableItem, m_oPosition, m_oReportPosition, and AnimatSim::IMovableItemCallback::PositionChanged().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Position ( float  fltX,
float  fltY,
float  fltZ,
bool  bUseScaling = true,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the local position. (m_oPosition)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.
bUseScalingIf true then the position values that are passed in will be scaled by the unit scaling values.
bFireChangeEventIf true then this will call the IMovableItemCallback->PositionChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Definition at line 197 of file MovableItem.cpp.

References Position().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Position ( std::string  strXml,
bool  bUseScaling = true,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the local position. (m_oPosition). This method is primarily used by the GUI to reset the local position using an xml data packet.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the position.
bUseScalingIf true then the position values that are passed in will be scaled by the unit scaling values.
bFireChangeEventIf true then this will call the IMovableItemCallback->PositionChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Definition at line 220 of file MovableItem.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindChildElement(), StdUtils::CStdXml::FindElement(), Position(), and StdUtils::Std_LoadPoint().

+ Here is the call graph for this function:

float AnimatSim::Environment::MovableItem::ReceptiveFieldsAlpha ( )
virtual

Gets the receptive fields alpha.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 618 of file MovableItem.cpp.

References m_fltReceptiveFieldsAlpha.

void AnimatSim::Environment::MovableItem::ReceptiveFieldsAlpha ( float  fltVal)
virtual

Sets the receptive fields alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new ReceptiveFieldsAlpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 629 of file MovableItem.cpp.

References m_fltReceptiveFieldsAlpha, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

CStdFPoint AnimatSim::Environment::MovableItem::ReportPosition ( )
virtual

Gets the reported local position. (m_oReportPosition).

Author
dcofer
Date
3/2/2011
Returns
Returns m_oReportPosition.

Definition at line 306 of file MovableItem.cpp.

References m_oReportPosition.

void AnimatSim::Environment::MovableItem::ReportPosition ( CStdFPoint &  oPoint)
virtual

Sets the reported local position. (m_oReportPosition).

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new position.

Definition at line 316 of file MovableItem.cpp.

References m_oReportPosition.

void AnimatSim::Environment::MovableItem::ReportPosition ( float  fltX,
float  fltY,
float  fltZ 
)
virtual

Sets the reported local position. (m_oReportPosition).

Author
dcofer
Date
3/2/2011
Parameters
fltXThe coordinate.
fltYThe y coordinate.
fltZThe z coordinate.

Definition at line 328 of file MovableItem.cpp.

References m_oReportPosition.

CStdFPoint AnimatSim::Environment::MovableItem::ReportRotation ( )
virtual

Gets the reported rotation of this part. (m_oReportRotation)

Author
dcofer
Date
3/2/2011
Returns
Returns the reported rotation.

Definition at line 455 of file MovableItem.cpp.

References m_oReportRotation.

void AnimatSim::Environment::MovableItem::ReportRotation ( CStdFPoint &  oPoint)
virtual

Sets the reported rotation of this part. (m_oReportRotation)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new reported rotation.

Definition at line 465 of file MovableItem.cpp.

References m_oReportRotation.

void AnimatSim::Environment::MovableItem::ReportRotation ( float  fltX,
float  fltY,
float  fltZ 
)
virtual

Sets the reported rotation of this part. (m_oReportRotation)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.

Definition at line 477 of file MovableItem.cpp.

References m_oReportRotation.

CStdFPoint AnimatSim::Environment::MovableItem::ReportWorldPosition ( )
virtual

Gets the reported world position. (m_oReportWorldPosition)

Author
dcofer
Date
3/2/2011
Returns
Returns the reported world position. (m_oReportWorldPosition)

Definition at line 338 of file MovableItem.cpp.

References m_oReportWorldPosition.

void AnimatSim::Environment::MovableItem::ReportWorldPosition ( CStdFPoint &  oPoint)
virtual

Sets the reported world position (m_oReportWorldPosition)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new position.

Definition at line 348 of file MovableItem.cpp.

References m_oReportWorldPosition.

void AnimatSim::Environment::MovableItem::ReportWorldPosition ( float  fltX,
float  fltY,
float  fltZ 
)
virtual

Sets the reported world position (m_oReportWorldPosition)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.

Definition at line 360 of file MovableItem.cpp.

References m_oReportWorldPosition.

CStdFPoint AnimatSim::Environment::MovableItem::Rotation ( )
virtual

Gets the rotation of this body in radians.

Author
dcofer
Date
3/2/2011
Returns
rotation of body. (m_oRotation)

Definition at line 370 of file MovableItem.cpp.

References m_oRotation.

Referenced by LoadRotation(), and Rotation().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Rotation ( CStdFPoint &  oPoint,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the rotation of this body in radians. (m_oRotation)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]oPointThe new rotation values.
bFireChangeEventIf true then this will call the IMovableItemCallback->RotationChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Definition at line 386 of file MovableItem.cpp.

References m_lpCallback, m_lpPhysicsMovableItem, m_oReportRotation, m_oRotation, and AnimatSim::IMovableItemCallback::RotationChanged().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Rotation ( float  fltX,
float  fltY,
float  fltZ,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the rotation of this body in radians. (m_oRotation)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.
bFireChangeEventIf true then this will call the IMovableItemCallback->RotationChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Definition at line 414 of file MovableItem.cpp.

References Rotation().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Rotation ( std::string  strXml,
bool  bFireChangeEvent = false,
bool  bUpdateMatrix = true 
)
virtual

Sets the rotation of this body in radians. (m_oRotation). This method is primarily used by the GUI to reset the rotation using an xml data packet.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml std::string used to load the rotation.
bFireChangeEventIf true then this will call the IMovableItemCallback->RotationChanged callback method to inform the GUI that the part has moved. If false then this callback will be skipped.
bUpdateMatrixIf true then the IPhysicsMovableItem->Physics_UpdateMatrix method will be called so that the osg graphics will be updated. If false then this will be skipped.

Definition at line 435 of file MovableItem.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindChildElement(), StdUtils::CStdXml::FindElement(), Rotation(), and StdUtils::Std_LoadPoint().

+ Here is the call graph for this function:

CStdFPoint AnimatSim::Environment::MovableItem::SelectedVertex ( )
virtual

Gets the relative position of the selected vertex. (m_vSelectedVertex)

Author
dcofer
Date
3/2/2011
Returns
returns m_vSelectedVertex.

Definition at line 915 of file MovableItem.cpp.

References m_vSelectedVertex.

Referenced by SelectedVertex().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::SelectedVertex ( CStdFPoint &  vPoint,
bool  bFireChangeEvent = false,
bool  bUpdatePhysics = true 
)
virtual

Sets the relative position of the selected vertex. (m_vSelectedVertex)

Author
dcofer
Date
3/2/2011
Parameters
[in,out]vPointThe new point to use to set the local position.
bFireChangeEventIf true then this will call the IMovableItemCallback->SelectedVertexChanged callback method to inform the GUI that the selected vertex has changed. If false then this callback will be skipped.
bUpdatePhysicsIf true then the physcis object is also updated.

Definition at line 929 of file MovableItem.cpp.

References m_lpCallback, m_lpPhysicsMovableItem, m_vSelectedVertex, and AnimatSim::IMovableItemCallback::SelectedVertexChanged().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::SelectedVertex ( float  fltX,
float  fltY,
float  fltZ,
bool  bFireChangeEvent = false,
bool  bUpdatePhysics = true 
)
virtual

Sets the relative position of the selected vertex. (m_vSelectedVertex)

Author
dcofer
Date
3/2/2011
Parameters
fltXThe x coordinate.
fltYThe y coordinate.
fltZThe z coordinate.
bFireChangeEventIf true then this will call the IMovableItemCallback->SelectedVertexChanged callback method to inform the GUI that the selected vertex has changed. If false then this callback will be skipped.
bUpdatePhysicsIf true then the physcis object is also updated.

Definition at line 954 of file MovableItem.cpp.

References SelectedVertex().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::SetBoundingBox ( int  iIdx,
float  fltVal 
)
virtual

Sets one dimension of the bounding box. This does nothing for all parts except a mesh.

Author
dcofer
Date
6/7/2014
Returns
The bounding box.

Reimplemented in AnimatSim::Environment::Bodies::Mesh.

Definition at line 1048 of file MovableItem.cpp.

float AnimatSim::Environment::MovableItem::Shininess ( )
virtual

Gets the shininess.

Author
dcofer
Date
3/2/2011
Returns
Shininess value.

Definition at line 866 of file MovableItem.cpp.

References m_fltShininess.

void AnimatSim::Environment::MovableItem::Shininess ( float  fltVal)
virtual

Sets the shininess value.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new value.

Definition at line 876 of file MovableItem.cpp.

References m_fltShininess, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

float AnimatSim::Environment::MovableItem::SimulationAlpha ( )
virtual

Gets the simulation alpha.

Author
dcofer
Date
3/2/2011
Returns
float alpha between 0 and 1.

Definition at line 647 of file MovableItem.cpp.

References m_fltSimulationAlpha.

void AnimatSim::Environment::MovableItem::SimulationAlpha ( float  fltVal)
virtual

Sets the simulation alpha.

Author
dcofer
Date
3/2/2011
Parameters
fltValThe new SimulationAlpha value between 0 and 1.
Exceptions
Ifvalue not between 0 and 1.

Definition at line 658 of file MovableItem.cpp.

References m_fltSimulationAlpha, m_lpPhysicsMovableItem, and StdUtils::Std_InValidRange().

+ Here is the call graph for this function:

CStdColor * AnimatSim::Environment::MovableItem::Specular ( )
virtual

Gets the specular color.

Author
dcofer
Date
3/2/2011
Returns
Pointer to color data

Definition at line 812 of file MovableItem.cpp.

References m_vSpecular.

Referenced by Specular().

+ Here is the caller graph for this function:

void AnimatSim::Environment::MovableItem::Specular ( float *  aryColor)
virtual

Sets the Specular color.

Author
dcofer
Date
3/2/2011
Parameters
[in,out]aryColorThe color data.

Definition at line 836 of file MovableItem.cpp.

References Specular().

+ Here is the call graph for this function:

void AnimatSim::Environment::MovableItem::Specular ( std::string  strXml)
virtual

Loads the Specular color from an XML data packet.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe color data in an xml data packet

Definition at line 850 of file MovableItem.cpp.

References StdUtils::CStdColor::Load(), and Specular().

+ Here is the call graph for this function:

std::string AnimatSim::Environment::MovableItem::Texture ( )
virtual

Gets the texture filename.

Author
dcofer
Date
3/2/2011
Returns
Texture filename.

Definition at line 891 of file MovableItem.cpp.

References m_strTexture.

void AnimatSim::Environment::MovableItem::Texture ( std::string  strValue)
virtual

Sets the Texture filename.

Author
dcofer
Date
3/2/2011
Parameters
strValueThe texture filename.

Definition at line 901 of file MovableItem.cpp.

References m_lpPhysicsMovableItem, and m_strTexture.

void AnimatSim::Environment::MovableItem::UserDefinedDraggerRadius ( float  fltRadius)
virtual

User defined dragger radius.

Author
David Cofer
Date
10/8/2013
Parameters
fltRadiusSets the user defined drag radius.

Definition at line 1122 of file MovableItem.cpp.

References m_fltUserDefinedDraggerRadius, and m_lpPhysicsMovableItem.

float AnimatSim::Environment::MovableItem::UserDefinedDraggerRadius ( )
virtual

Gets the user defined dragger radius.

Author
David Cofer
Date
10/8/2013
Returns
.

Definition at line 1141 of file MovableItem.cpp.

References m_fltUserDefinedDraggerRadius.

void AnimatSim::Environment::MovableItem::VisualSelectionModeChanged ( int  iNewMode)
virtual

Called when the visual selection mode changed in GUI.

In the GUI the user can select several different types of visual selection modes This method is called any time that the user switches the selection mode in the GUI. This allows us to change the current Alpha value of the objects so the display is correct.

Author
dcofer
Date
3/2/2011
Parameters
iNewModeThe new VisualSelectionMode.

Reimplemented in AnimatSim::Environment::Light, and AnimatSim::Environment::BodyPart.

Definition at line 1180 of file MovableItem.cpp.

References m_lpPhysicsMovableItem.

Referenced by AnimatSim::Environment::BodyPart::VisualSelectionModeChanged(), and AnimatSim::Environment::Light::VisualSelectionModeChanged().

+ Here is the caller graph for this function:

int AnimatSim::Environment::MovableItem::VisualSelectionType ( )
virtual

Gets the visual selection type for this part.

In the GUI the user can select several different types of visual selection modes When a user selects an object while in a given selection mode we need to be able to check each object that is in the path of the click to see if it should be selected. So we check the current selection mode with this VisualSelectionType property to see if they match. So if the current VisualSelectionMode is Joints, and this body part is a joint then it will have a matching VisualSelectionType property and we will no it should be selected, but if a rigid body was selected its VisualSelectionType will be different, so we will not select it.

Author
dcofer
Date
3/2/2011
Returns
.

Reimplemented in AnimatSim::Environment::RigidBody, and AnimatSim::Environment::Joint.

Definition at line 123 of file MovableItem.cpp.

Member Data Documentation

bool AnimatSim::Environment::MovableItem::m_bIsVisible
protected

Determines if this body is physically seen or not. If this is false then whatever geometry this is, like a box, is not seen in the graphics.

Definition at line 54 of file MovableItem.h.

Referenced by IsVisible(), and MovableItem().

IMovableItemCallback* AnimatSim::Environment::MovableItem::m_lpCallback
protected

This is an interface pointer to a callback class that allows us to notify the gui of events that occur within the simulation.

Definition at line 98 of file MovableItem.h.

Referenced by AnimatSim::Environment::BodyPart::AddBodyClicked(), Callback(), MovableItem(), Position(), AnimatSim::Environment::BodyPart::Resize(), Rotation(), and SelectedVertex().

RigidBody* AnimatSim::Environment::MovableItem::m_lpParent
protected

The parent rigid body of this part. If this value is null then it is assumed that this is the root part of a structure or the structure itself.

Definition at line 27 of file MovableItem.h.

Referenced by AnimatSim::Environment::RigidBody::LoadJoint(), MovableItem(), Parent(), AnimatSim::Environment::RigidBody::ParentWithCollisionGeometry(), AnimatSim::Environment::RigidBody::RigidBody(), AnimatSim::Environment::Joint::~Joint(), and AnimatSim::Environment::RigidBody::~RigidBody().

CStdFPoint AnimatSim::Environment::MovableItem::m_oAbsPosition
protected

The absolute position of the movable item in world coordinates. This is calcualted during loading of the part using the position of the parent part and the relative position specified in the configuration file.

Definition at line 32 of file MovableItem.h.

Referenced by AbsolutePosition(), AnimatSim::Environment::Bodies::Plane::CornerX(), AnimatSim::Environment::Bodies::Plane::CornerY(), GetCurrentPosition(), and AnimatSim::Environment::Bodies::OdorSensor::StepSimulation().

CStdFPoint AnimatSim::Environment::MovableItem::m_oReportRotation
protected

This is used for reporting the rotation back to the GUI. We need to keep the regular rotation information so it can be used during a simulation reset.

Definition at line 50 of file MovableItem.h.

Referenced by ReportRotation(), and Rotation().

CStdFPoint AnimatSim::Environment::MovableItem::m_oRotation
protected

The rotation to apply to this body part. It is defined by the three euler angles in radians.

Definition at line 46 of file MovableItem.h.

Referenced by Rotation().


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