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

The base class for all of the joint type of objects. More...

#include <Joint.h>

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

Public Member Functions

 Joint ()
 Default constructor. More...
 
virtual ~Joint ()
 Destructor. More...
 
virtual void AddExternalNodeInput (int iTargetDataType, float fltInput)
 Adds an external node input. More...
 
virtual void AfterResetSimulation ()
 Called after a simulation reset for some objects. More...
 
virtual RigidBodyChild ()
 Gets the child RigidBody part for this joint. More...
 
virtual void Child (RigidBody *lpValue)
 Sets the Child RigidBody part for this joint. More...
 
virtual void CreateJoint ()
 Creates the joint. More...
 
virtual bool EnableLimits ()
 Tells if ConstraintLimits are enabled. More...
 
virtual void EnableLimits (bool bVal)
 Sets whether ContrainLimits are enabled or not. More...
 
virtual ConstraintFrictionFriction ()
 Gets the pointer to the friction. More...
 
virtual void Friction (ConstraintFriction *lpFriction)
 Sets the pointer to the friction. More...
 
virtual void Friction (std::string strXml)
 Sets the friction. More...
 
virtual float * GetDataPointer (const std::string &strDataType)
 
virtual float GetLimitRange ()
 Gets the entire range of movement within the limits. If limits are not enabled then it returns -1. More...
 
virtual float GetPositionWithinLimits (float fltPos)
 Gets a position value within the constraint limits. More...
 
virtual void Initialize ()
 Initializes this object. More...
 
virtual float JointForce ()
 Gets the joint force. More...
 
virtual void JointForce (float fltForce)
 Sets the joint force. More...
 
virtual float JointPosition ()
 Gets the joint position. More...
 
virtual void JointPosition (float fltPos)
 Sets the joint position. More...
 
virtual float JointVelocity ()
 Gets the joint velocity. More...
 
virtual void JointVelocity (float fltVel)
 Sets the joint velocity. More...
 
virtual void Load (CStdXml &oXml)
 
virtual void QueryProperties (CStdPtrArray< TypeProperty > &aryProperties)
 
virtual ConstraintRelaxationRelaxation1 ()
 Gets the pointer to the primary axis displacement relaxation. More...
 
virtual void Relaxation1 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the primary axis displacement relaxation. More...
 
virtual void Relaxation1 (std::string strXml)
 Sets the primary axis displacement relaxation. More...
 
virtual ConstraintRelaxationRelaxation2 ()
 Gets the pointer to the secondary axis displacement relaxation. More...
 
virtual void Relaxation2 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the secondary axis displacement relaxation. More...
 
virtual void Relaxation2 (std::string strXml)
 Sets the secondary axis displacement relaxation. More...
 
virtual ConstraintRelaxationRelaxation3 ()
 Gets the pointer to the secondary axis displacement relaxation. More...
 
virtual void Relaxation3 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the third axis displacement relaxation. More...
 
virtual void Relaxation3 (std::string strXml)
 Sets the third axis displacement relaxation. More...
 
virtual ConstraintRelaxationRelaxation4 ()
 Gets the pointer to the secondary axis rotation relaxation. More...
 
virtual void Relaxation4 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the secondary axis rotation relaxation. More...
 
virtual void Relaxation4 (std::string strXml)
 Sets the secondary axis rotation relaxation. More...
 
virtual ConstraintRelaxationRelaxation5 ()
 Gets the pointer to the thirdary axis rotation relaxation. More...
 
virtual void Relaxation5 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the thirdary axis rotation relaxation. More...
 
virtual void Relaxation5 (std::string strXml)
 Sets the thirdary axis rotation relaxation. More...
 
virtual ConstraintRelaxationRelaxation6 ()
 Gets the pointer to the thirdary axis rotation relaxation. More...
 
virtual void Relaxation6 (ConstraintRelaxation *lpRelax)
 Sets the pointer to the thirdary axis rotation relaxation. More...
 
virtual void Relaxation6 (std::string strXml)
 Sets the thirdary axis rotation relaxation. More...
 
virtual void ResetSimulation ()
 Resets the simulation back to time 0. More...
 
virtual bool SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
 
virtual float Size ()
 Gets the size of the graphical representation of this joint. More...
 
virtual void Size (float fltVal, bool bUseScaling=true)
 Sets the size of the graphical representation of this joint. More...
 
virtual void StepSimulation ()
 Step the simulation for this object. More...
 
virtual void UpdatePhysicsPosFromGraphics ()
 Updates the physics position from graphics. More...
 
virtual bool UsesRadians ()
 Tells whether this joint uses radians or meters for its measurements. More...
 
virtual int VisualSelectionType ()
 Gets the visual selection type for this part. More...
 
virtual void WakeDynamics ()
 
- Public Member Functions inherited from AnimatSim::Environment::BodyPart
 BodyPart (void)
 Default constructor. More...
 
virtual ~BodyPart (void)
 Destructor. 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 void AddRobotPartInterface (RobotPartInterface *lpPart)
 
virtual int FindRobotPartListIndex (std::string strID, bool bThrowError=true)
 Finds the index of a robot part attached to this body part with the matching ID. More...
 
virtual CStdArray< RobotPartInterface * > * GetRobotPartInterfaces ()
 Gets a pointer to the roboto part interface associated with this body part. More...
 
virtual bool NeedsRobotSynch ()
 
virtual IPhysicsBodyPhysicsBody ()
 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 PhysicsBody (IPhysicsBody *lpBody)
 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 void RemoveRobotPartInterface (RobotPartInterface *lpPart)
 
virtual void Resize ()
 Called when this object has been resized. More...
 
virtual void Selected (bool bValue, bool bSelectMultiple)
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 
virtual float SynchUpdateInterval ()
 This is how often we need to update this particular adapter. More...
 
virtual void SynchUpdateInterval (float fltVal)
 Determines how often we need to update this particular adapter. More...
 
virtual bool SynchWithRobot ()
 Gets whether the m_bRobotAdpaterSynch flag applies to this adapter. More...
 
virtual void SynchWithRobot (bool bVal)
 Determines whether the m_bRobotAdpaterSynch flag applies to this adapter. More...
 
virtual void TimeStepModified ()
 If the time step is modified then we need to recalculate the length of the delay buffer. More...
 
virtual void UpdateExtraData ()
 UpdateData is called during this body parts sim update call, and before any of its child updates because those children may need import information like this parts position. However, there are a number of pieces of information that are not critical to the part itself, but that a user may have asked for. I do not want to collect that info for every part if it is not needed. So instead, if a user asks for it then this part is added to a list on the simulation. After all parts have been updated for a simulation step then we loop through the list of just the necessary parts and call UpdateExtraData to collect this additional data. It is important that this be done after all parts have stepped becasue some of this data will only be correct at the end. An example of this is force applied to a part. Forces can be added by any child parts, so it is only at the end that these values are valid. More...
 
virtual void VisualSelectionModeChanged (int iNewMode)
 Called when the visual selection mode changed in GUI. More...
 
- Public Member Functions inherited from AnimatSim::Node
 Node ()
 Default constructor. More...
 
virtual ~Node ()
 Destructor. More...
 
virtual void Copy (CStdSerialize *lpSource)
 
virtual bool Enabled ()
 Tells whether this node is enabled. More...
 
virtual void Enabled (bool bValue)
 Enables the node. More...
 
virtual int GetTargetDataTypeIndex (const std::string &strDataType)
 Used to convert a string target data type into an integer index. More...
 
virtual void Kill (bool bState=true)
 Kills. More...
 
virtual void SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify)
 Sets the system pointers. More...
 
virtual void VerifySystemPointers ()
 Verify that system pointers have been set correctly. More...
 
- Public Member Functions inherited from AnimatSim::AnimatBase
 AnimatBase ()
 Constructs an AnimatBase object. More...
 
virtual ~AnimatBase ()
 Destroys the AnimatBase object.. More...
 
virtual bool AddItem (const std::string &strItemType, const std::string &strXml, bool bThrowError=true, bool bDoNotInit=false)
 Adds a new object to this parent. More...
 
virtual long CalculateSnapshotByteSize ()
 Calculates the snapshot byte size. More...
 
virtual NeuralModuleGetNeuralModule ()
 Gets the neural module. More...
 
virtual NodeGetNode ()
 Gets the node. More...
 
virtual SimulatorGetSimulator ()
 Gets the simulator pointer. More...
 
virtual StructureGetStructure ()
 Gets the structure for this node. More...
 
virtual bool HasProperty (const std::string &strName)
 Queries this object if it has a property with the given name. More...
 
virtual std::string ID ()
 Gets the unique GUID ID of this object. More...
 
virtual void ID (std::string strValue)
 Sets the unique GUID ID of the object. More...
 
virtual void Load (StdUtils::CStdXml &oXml)
 Loads the item using an XML data packet. More...
 
virtual void LoadKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Loads a key frame snapshot. More...
 
virtual std::string Name ()
 Gets the name of this object. More...
 
virtual void Name (std::string strValue)
 Sets the name of the object. Blank is acceptable. More...
 
virtual AnimatPropertyType PropertyType (const std::string &strName)
 
virtual void ReInitialize ()
 Re-initialize this object. More...
 
virtual bool RemoveItem (const std::string &strItemType, const std::string &strID, bool bThrowError=true)
 Removes a child item from this parent. More...
 
virtual void Reset ()
 Resets this object. More...
 
virtual void RigidBodyAdded (std::string strID)
 
virtual void RigidBodyRemoved (std::string strID)
 
virtual void SaveKeyFrameSnapshot (byte *aryBytes, long &lIndex)
 Saves a key frame snapshot. More...
 
virtual bool Selected ()
 Tells if this items is selected or not. More...
 
virtual bool SetData (const std::string &strDataType, const float fltValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual bool SetData (const std::string &strDataType, const long lValue, bool bThrowError=true)
 Set a variable based on a string data type name. More...
 
virtual void SimPausing ()
 Called just before the simulation pauses. More...
 
virtual void SimStarting ()
 Called just before the simulation starts. More...
 
virtual void SimStopping ()
 Called just before the simulation stops. More...
 
virtual std::string Type ()
 returns the string type name of this object. More...
 
virtual void Type (std::string strValue)
 Sets the class type for this object. More...
 
- Public Member Functions inherited from AnimatSim::Environment::MovableItem
 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 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 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 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 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 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 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...
 

Static Public Member Functions

static JointCastToDerived (AnimatBase *lpBase)
 
- Static Public Member Functions inherited from AnimatSim::Environment::BodyPart
static BodyPartCastToDerived (AnimatBase *lpBase)
 
- Static Public Member Functions inherited from AnimatSim::Node
static NodeCastToDerived (AnimatBase *lpBase)
 

Protected Member Functions

virtual void ClearRelaxations ()
 Clears the relaxation pointers. More...
 
virtual ConstraintFrictionLoadConstraintFriction (CStdXml &oXml)
 Loads constraint Friction object. More...
 
virtual ConstraintRelaxationLoadConstraintRelaxation (CStdXml &oXml, std::string strName)
 Loads constraint relaxation object. More...
 
- Protected Member Functions inherited from AnimatSim::Environment::BodyPart
virtual void UpdateData ()
 Called to collect any body data for this part. More...
 
- Protected Member Functions inherited from AnimatSim::Environment::MovableItem
virtual void LoadPosition (CStdXml &oXml)
 Loads the items position. More...
 
virtual void LoadRotation (CStdXml &oXml)
 Loads the items rotation. More...
 

Protected Attributes

ConstraintRelaxationm_aryRelaxations [6]
 The relaxations for the constraints.
 
bool m_bEnableLimits
 If true then any ConstraintLimits for this joint are enabled.
 
float m_fltForce
 The current force being applied to the joint by the motor.
 
float m_fltPosition
 
float m_fltSize
 Scales the size of the graphics for this joint.
 
float m_fltVelocity
 
RigidBodym_lpChild
 The child rigid body for this joint.
 
ConstraintFrictionm_lpFriction
 The friction for this joint.
 
- Protected Attributes inherited from AnimatSim::Environment::BodyPart
CStdArray< RobotPartInterface * > m_aryRobotParts
 Array of pointers to robot part interfaces connected to this body part.
 
bool m_bSynchWithRobot
 
float m_fltSynchUpdateInterval
 This is how often we need to update this particular adapter.
 
int m_iSynchCount
 Keeps track of the last time we did a synch for the robot.
 
int m_iSynchUpdateInterval
 The number of ticks between each call to update for this adapter till the next update time.
 
IPhysicsBodym_lpPhysicsBody
 
- Protected Attributes inherited from AnimatSim::Node
bool m_bInitEnabled
 Keeps track of the enabled state at sim startup.
 
float m_fltEnabled
 This is used for reporting the enabled state in a GetDataPointer call.
 
Organism * m_lpOrganism
 The pointer to this node's organism.
 
- Protected Attributes inherited from AnimatSim::AnimatBase
bool m_bEnabled
 Tells if this item is enabled or not. If it is not enabled then it is not run.
 
bool m_bSelected
 Tells whether the object is selected or not.
 
AnimatSim::Behavior::NeuralModulem_lpModule
 The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL.
 
Nodem_lpNode
 The pointer to this items parent Node. If this is not relevant for this object then this is NULL.
 
Simulatorm_lpSim
 The pointer to a Simulation.
 
AnimatSim::Environment::Structurem_lpStructure
 The pointer to this items parent Structure. If this is not relevant for this object then this is NULL.
 
std::string m_strID
 The unique Id for this object.
 
std::string m_strName
 The name for this object.
 
std::string m_strType
 The type for this object. Examples are Box, Plane, Neuron, etc..
 
- Protected Attributes inherited from AnimatSim::Environment::MovableItem
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

The base class for all of the joint type of objects.

This class provides the base functionality for a joint. A joint is what glues the different rigid bodies together into a complete structure. Each object is connected by a joint to its parent part. The only exception to this rule is the root rigid body of a structure/organism. The joint is positioned relative to the center of the parent object. This can be a little confusing becuase in the configuration file the joint is actually contained within the child object tag. So you may be tempted to try and make the joint relative to the child object. The different sub classes will define data parameters that specify the motion that they joint can perform. For instance, a HingeJoint is constrained to rotate about one axis just like the hinge on a door.

Some joints can be motorized, and some cannot. Hinge and Prismatic joints are currently the only joints that are motorized. So all of the parameters related to motors are only relevant for those joint types.

Author
dcofer
Date
3/22/2011

Definition at line 40 of file Joint.h.

Constructor & Destructor Documentation

AnimatSim::Environment::Joint::Joint ( )

Default constructor.

Author
dcofer
Date
3/22/2011

Definition at line 47 of file Joint.cpp.

References m_aryRelaxations, m_bEnableLimits, m_fltForce, m_fltPosition, m_fltSize, m_fltVelocity, m_lpChild, and m_lpFriction.

AnimatSim::Environment::Joint::~Joint ( )
virtual

Destructor.

Author
dcofer
Date
3/22/2011

Definition at line 68 of file Joint.cpp.

References ClearRelaxations(), m_lpChild, m_lpFriction, AnimatSim::Environment::MovableItem::m_lpParent, and StdUtils::Std_TraceMsg().

+ Here is the call graph for this function:

Member Function Documentation

void AnimatSim::Environment::Joint::AddExternalNodeInput ( int  iTargetDataType,
float  fltInput 
)
virtual

Adds an external node input.

This is used by the adapter to add a new external value to this node. It is up to the node to interpret what that value means. For example, if it is a neuron then it can interpret it to be a current. This value is added to the current total so that multiple adapters can call this in a given time step. It is cleared out to zero at the beginning of the time step. You can now also specify which data you are adding to for this method call. This allows adapters to be setup to change multiple different variables in the system.

Author
dcofer
Date
6/16/2014
Parameters
iTargetDataTypeThe index of the target data type we are adding to.
fltInputThe new input.

Implements AnimatSim::Node.

Reimplemented in AnimatSim::Environment::Joints::Hinge, and AnimatSim::Environment::Joints::Prismatic.

Definition at line 720 of file Joint.cpp.

void AnimatSim::Environment::Joint::AfterResetSimulation ( )
virtual

Called after a simulation reset for some objects.

This method is only used by some objects because they need to do some processing after the simulation has been reset.

Author
dcofer
Date
3/4/2011

Reimplemented from AnimatSim::AnimatBase.

Definition at line 734 of file Joint.cpp.

References AnimatSim::Environment::MovableItem::m_lpPhysicsMovableItem.

Referenced by AnimatSim::Environment::RigidBody::AfterResetSimulation().

+ Here is the caller graph for this function:

RigidBody * AnimatSim::Environment::Joint::Child ( )
virtual

Gets the child RigidBody part for this joint.

Author
dcofer
Date
3/22/2011
Returns
Pointer to the child RigidBody for this joint.

Definition at line 507 of file Joint.cpp.

References m_lpChild.

Referenced by AnimatSim::Environment::RigidBody::LoadJoint(), and AnimatSim::Environment::RigidBody::~RigidBody().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Child ( RigidBody lpValue)
virtual

Sets the Child RigidBody part for this joint.

Author
dcofer
Date
3/22/2011
Parameters
[in,out]lpValueIPointer to the child part.

Definition at line 517 of file Joint.cpp.

References m_lpChild, and AnimatSim::Environment::MovableItem::m_lpPhysicsMovableItem.

void AnimatSim::Environment::Joint::ClearRelaxations ( )
protectedvirtual

Clears the relaxation pointers.

Author
David Cofer
Date
2/16/2014

Definition at line 751 of file Joint.cpp.

References m_aryRelaxations.

Referenced by ~Joint().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::CreateJoint ( )
virtual

Creates the joint.

This method is called by the derived class in the physics library. It makes the calls necessary to create the actual joint using the chosen phsyics API.

Author
dcofer
Date
3/22/2011

Reimplemented in VortexAnimatSim::Environment::Joints::VsHinge, BulletAnimatSim::Environment::Joints::BlHinge, BulletAnimatSim::Environment::Joints::BlPrismatic, RoboticsAnimatSim::Environment::Joints::RbHinge, VortexAnimatSim::Environment::Joints::VsBallSocket, BulletAnimatSim::Environment::Joints::BlBallSocket, BulletAnimatSim::Environment::Joints::BlRPRO, VortexAnimatSim::Environment::Joints::VsPrismatic, VortexAnimatSim::Environment::Joints::VsRPRO, RoboticsAnimatSim::Environment::Joints::RbPrismatic, BulletAnimatSim::Environment::Joints::BlUniversal, RoboticsAnimatSim::Environment::Joints::RbRPRO, VortexAnimatSim::Environment::Joints::VsDistanceJoint, BulletAnimatSim::Environment::Joints::BlDistanceJoint, VortexAnimatSim::Environment::Joints::VsUniversal, and RoboticsAnimatSim::Environment::Joints::RbUniversal.

Definition at line 602 of file Joint.cpp.

Referenced by RoboticsAnimatSim::Environment::Bodies::RbMesh::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbSphere::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbCylinder::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbCone::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbEllipsoid::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbTorus::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlSphere::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsMesh::CreateJoints(), RoboticsAnimatSim::Environment::Bodies::RbBox::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlCylinder::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlTorus::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlCone::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlEllipsoid::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsTerrain::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsTorus::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlMesh::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsEllipsoid::CreateJoints(), BulletAnimatSim::Environment::Bodies::BlBox::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsBox::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsSphere::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsCylinder::CreateJoints(), VortexAnimatSim::Environment::Bodies::VsCone::CreateJoints(), and BulletAnimatSim::Environment::Bodies::BlTerrain::CreateJoints().

bool AnimatSim::Environment::Joint::EnableLimits ( )
virtual

Tells if ConstraintLimits are enabled.

Author
dcofer
Date
3/22/2011
Returns
true if it limits are enabled, false otherwise.

Definition at line 139 of file Joint.cpp.

References m_bEnableLimits.

void AnimatSim::Environment::Joint::EnableLimits ( bool  bVal)
virtual
ConstraintFriction * AnimatSim::Environment::Joint::Friction ( )
virtual

Gets the pointer to the friction.

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

Definition at line 435 of file Joint.cpp.

References m_lpFriction.

Referenced by Friction().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Friction ( ConstraintFriction lpRelax)
virtual

Sets the pointer to the friction.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 445 of file Joint.cpp.

References m_lpFriction.

void AnimatSim::Environment::Joint::Friction ( std::string  strXml)
virtual

Sets the friction.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the friction.

Definition at line 464 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), Friction(), and LoadConstraintFriction().

+ Here is the call graph for this function:

float AnimatSim::Environment::Joint::GetLimitRange ( )
virtual

Gets the entire range of movement within the limits. If limits are not enabled then it returns -1.

Returns
The calculated limit range.

Reimplemented in AnimatSim::Environment::Joints::Hinge, and AnimatSim::Environment::Joints::Prismatic.

Definition at line 494 of file Joint.cpp.

float AnimatSim::Environment::Joint::GetPositionWithinLimits ( float  fltPos)
virtual

Gets a position value within the constraint limits.

If limits are enabled then it checks to see if the specified position is within the limits. If it is not, then it adjusts the position to be at the limit and returns that value.

Parameters
fltPosThe position to check.
Returns
The position within limits.

Reimplemented in AnimatSim::Environment::Joints::Hinge, and AnimatSim::Environment::Joints::Prismatic.

Definition at line 485 of file Joint.cpp.

void AnimatSim::Environment::Joint::Initialize ( )
virtual

Initializes this object.

After an object is loaded in it must be initialized before it can be used. This allows the object to retrieve any pointers or setup memory that it will need during execution. Each object is responsible for initializing any of its child objects, so you simply need to call this method on the containing class to init all child objects. It also calls VerifySystemPointers to make sure that the system pointers have been setup correctly.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::Environment::BodyPart.

Reimplemented in AnimatSim::Environment::MotorizedJoint.

Definition at line 605 of file Joint.cpp.

References AnimatSim::Environment::BodyPart::Initialize(), AnimatSim::AnimatBase::Initialize(), m_aryRelaxations, and m_lpFriction.

Referenced by AnimatSim::Environment::MotorizedJoint::Initialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float AnimatSim::Environment::Joint::JointForce ( )
virtual

Gets the joint force.

Author
dcofer
Date
3/22/2011
Returns
Joint force.

Definition at line 572 of file Joint.cpp.

References m_fltForce.

Referenced by ResetSimulation().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::JointForce ( float  fltForce)
virtual

Sets the joint force.

Author
dcofer
Date
3/22/2011
Parameters
fltForceThe new force.

Definition at line 582 of file Joint.cpp.

References m_fltForce.

float AnimatSim::Environment::Joint::JointPosition ( )
virtual

Gets the joint position.

Author
dcofer
Date
3/22/2011
Returns
Joint position.

Definition at line 532 of file Joint.cpp.

References m_fltPosition.

Referenced by ResetSimulation().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::JointPosition ( float  fltPos)
virtual
float AnimatSim::Environment::Joint::JointVelocity ( )
virtual

Gets the joint velocity.

Author
dcofer
Date
3/22/2011
Returns
Joint Velocity.

Definition at line 552 of file Joint.cpp.

References m_fltVelocity.

Referenced by ResetSimulation().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::JointVelocity ( float  fltVel)
virtual

Sets the joint velocity.

Author
dcofer
Date
3/22/2011
Parameters
fltVelThe new velocity.

Definition at line 562 of file Joint.cpp.

References m_fltVelocity.

ConstraintFriction * AnimatSim::Environment::Joint::LoadConstraintFriction ( CStdXml oXml)
protectedvirtual

Loads constraint Friction object.

Author
dcofer
Date
3/28/2011
Parameters
[in,out]oXmlThe xml that defines the Friction to load.
Returns
Pointer to the Friction object.
Exceptions
Throwsan exception if there is a problem creating or loading the Friction.

Definition at line 870 of file Joint.cpp.

References AnimatSim::Simulator::CreateObject(), StdUtils::CStdXml::FindChildElement(), StdUtils::CStdXml::GetChildString(), StdUtils::CStdXml::IntoElem(), AnimatSim::AnimatBase::m_lpModule, AnimatSim::AnimatBase::m_lpSim, AnimatSim::AnimatBase::m_lpStructure, StdUtils::CStdXml::OutOfElem(), and AnimatSim::AnimatBase::SetSystemPointers().

Referenced by Friction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::LoadConstraintRelaxation ( CStdXml oXml,
std::string  strName 
)
protectedvirtual

Loads constraint relaxation object.

Author
dcofer
Date
3/28/2011
Parameters
[in,out]oXmlThe xml that defines the relaxation to load.
Returns
Pointer to the relaxation object.
Exceptions
Throwsan exception if there is a problem creating or loading the relaxation.

Definition at line 820 of file Joint.cpp.

References AnimatSim::Simulator::CreateObject(), StdUtils::CStdXml::FindChildElement(), StdUtils::CStdXml::GetChildString(), StdUtils::CStdXml::IntoElem(), AnimatSim::AnimatBase::m_lpModule, AnimatSim::AnimatBase::m_lpSim, AnimatSim::AnimatBase::m_lpStructure, StdUtils::CStdXml::OutOfElem(), and AnimatSim::AnimatBase::SetSystemPointers().

Referenced by Relaxation1(), Relaxation2(), Relaxation3(), Relaxation4(), Relaxation5(), and Relaxation6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation1 ( )
virtual

Gets the pointer to the primary axis displacement relaxation.

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

Definition at line 159 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation1().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation1 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the primary axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 169 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation1 ( std::string  strXml)
virtual

Sets the primary axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 188 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation1().

+ Here is the call graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation2 ( )
virtual

Gets the pointer to the secondary axis displacement relaxation.

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

Definition at line 205 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation2().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation2 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the secondary axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 215 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation2 ( std::string  strXml)
virtual

Sets the secondary axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 234 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation2().

+ Here is the call graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation3 ( )
virtual

Gets the pointer to the secondary axis displacement relaxation.

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

Definition at line 251 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation3().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation3 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the third axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 261 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation3 ( std::string  strXml)
virtual

Sets the third axis displacement relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 280 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation3().

+ Here is the call graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation4 ( )
virtual

Gets the pointer to the secondary axis rotation relaxation.

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

Definition at line 297 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation4().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation4 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the secondary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 307 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation4 ( std::string  strXml)
virtual

Sets the secondary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 326 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation4().

+ Here is the call graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation5 ( )
virtual

Gets the pointer to the thirdary axis rotation relaxation.

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

Definition at line 343 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation5().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation5 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the thirdary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 353 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation5 ( std::string  strXml)
virtual

Sets the thirdary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 372 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation5().

+ Here is the call graph for this function:

ConstraintRelaxation * AnimatSim::Environment::Joint::Relaxation6 ( )
virtual

Gets the pointer to the thirdary axis rotation relaxation.

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

Definition at line 389 of file Joint.cpp.

References m_aryRelaxations.

Referenced by Relaxation6().

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::Relaxation6 ( ConstraintRelaxation lpRelax)
virtual

Sets the pointer to the thirdary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Returns
nothing

Definition at line 399 of file Joint.cpp.

References m_aryRelaxations.

void AnimatSim::Environment::Joint::Relaxation6 ( std::string  strXml)
virtual

Sets the thirdary axis rotation relaxation.

Author
dcofer
Date
3/2/2011
Parameters
strXmlThe xml string with the data to load in the relaxation.

Definition at line 418 of file Joint.cpp.

References StdUtils::CStdXml::Deserialize(), StdUtils::CStdXml::FindElement(), LoadConstraintRelaxation(), and Relaxation6().

+ Here is the call graph for this function:

void AnimatSim::Environment::Joint::ResetSimulation ( )
virtual

Resets the simulation back to time 0.

This method calls the ResetSimulation method on all subitems in order to reset the simulation back to the beginning.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::Environment::BodyPart.

Reimplemented in AnimatSim::Environment::MotorizedJoint, AnimatSim::Environment::Joints::Hinge, BulletAnimatSim::Environment::Joints::BlHinge, BulletAnimatSim::Environment::Joints::BlPrismatic, RoboticsAnimatSim::Environment::Joints::RbHinge, and RoboticsAnimatSim::Environment::Joints::RbPrismatic.

Definition at line 722 of file Joint.cpp.

References JointForce(), JointPosition(), JointVelocity(), AnimatSim::Environment::MovableItem::m_lpPhysicsMovableItem, and AnimatSim::Environment::BodyPart::ResetSimulation().

Referenced by AnimatSim::Environment::MotorizedJoint::ResetSimulation(), and AnimatSim::Environment::RigidBody::ResetSimulation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float AnimatSim::Environment::Joint::Size ( )
virtual

Gets the size of the graphical representation of this joint.

Author
dcofer
Date
3/22/2011
Returns
Size for the graphics object.

Definition at line 107 of file Joint.cpp.

References m_fltSize.

void AnimatSim::Environment::Joint::Size ( float  fltVal,
bool  bUseScaling = true 
)
virtual

Sets the size of the graphical representation of this joint.

Author
dcofer
Date
3/22/2011
Parameters
fltValThe new size value.
bUseScalingtrue to use unit scaling.

Definition at line 118 of file Joint.cpp.

References AnimatSim::Simulator::InverseDistanceUnits(), m_fltSize, AnimatSim::AnimatBase::m_lpSim, AnimatSim::Environment::BodyPart::Resize(), and StdUtils::Std_IsAboveMin().

+ Here is the call graph for this function:

void AnimatSim::Environment::Joint::StepSimulation ( )
virtual

Step the simulation for this object.

This is called on an object each time it is stepped in the simulation. this is where its simulation code is processed. However, StepSimulation is not necessarily called every single time that the simulation as a whole is stepped. A good example of this is that neural modules can have different integration time steps. So a firing rate module may have a DT of 0.5 ms, while an integrate and fire model may have one of 0.1 ms. So the firing rate module would only get its StepSimulation method called every 5th time that the other module was called. This is all handed in the StepSimulation method of the Simulator and NervousSystem.

Author
dcofer
Date
3/1/2011

Reimplemented from AnimatSim::AnimatBase.

Reimplemented in VortexAnimatSim::Environment::Joints::VsHinge, BulletAnimatSim::Environment::Joints::BlHinge, BulletAnimatSim::Environment::Joints::BlPrismatic, RoboticsAnimatSim::Environment::Joints::RbHinge, VortexAnimatSim::Environment::Joints::VsPrismatic, and RoboticsAnimatSim::Environment::Joints::RbPrismatic.

Definition at line 616 of file Joint.cpp.

References AnimatSim::AnimatBase::StepSimulation(), and AnimatSim::Environment::BodyPart::UpdateData().

Referenced by AnimatSim::Environment::RigidBody::StepSimulation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AnimatSim::Environment::Joint::UpdatePhysicsPosFromGraphics ( )
virtual

Updates the physics position from graphics.

This updates the position of the physcis node directly from the scenegraph position of the graphics node for this item, and then does the same for all child items.

Author
dcofer
Date
3/26/2011

Reimplemented from AnimatSim::Environment::BodyPart.

Definition at line 740 of file Joint.cpp.

bool AnimatSim::Environment::Joint::UsesRadians ( )
virtual

Tells whether this joint uses radians or meters for its measurements.

This is defaulted to true. You must override this and set it to the appropriate value for your derived classes.

Author
dcofer
Date
3/22/2011
Returns
true if it uses radians, false if it uses meters.

Reimplemented in AnimatSim::Environment::Joints::Prismatic.

Definition at line 97 of file Joint.cpp.

Referenced by AnimatSim::Environment::MotorizedJoint::Initialize(), AnimatSim::Environment::ConstraintLimit::LimitPos(), AnimatSim::Environment::MotorizedJoint::MaxForce(), AnimatSim::Environment::MotorizedJoint::MaxVelocity(), AnimatSim::Environment::MotorizedJoint::ResetSimulation(), AnimatSim::Environment::MotorizedJoint::SetPosition(), AnimatSim::Environment::MotorizedJoint::SetVelocity(), and AnimatSim::ExternalStimuli::MotorStimulus::StepSimulation().

+ Here is the caller graph for this function:

int AnimatSim::Environment::Joint::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 from AnimatSim::Environment::MovableItem.

Definition at line 497 of file Joint.cpp.

Member Data Documentation

float AnimatSim::Environment::Joint::m_fltVelocity
protected

The current velocity of the joint. Velocities can be in rad/sec or m/s depending on the type of joint. UsesRadians lets you know whether it is using radians.

Definition at line 55 of file Joint.h.

Referenced by Joint(), and JointVelocity().


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