Grip-Reloaded
Grip version visualizaiton interface for DART (DynamicAnimationandRoboticsToolkits)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | Protected Attributes
osgDart::ContactForceVisual Class Reference

Class that creates a force vector visualization node. More...

#include <WorldVisuals.h>

List of all members.

Public Member Functions

 ContactForceVisual (bool debug=false)
 Constructs a ContactForceVisual object.
 ~ContactForceVisual ()
 Destructs the ContactForceVisual object.
void createForceVector (float lineLength, const Eigen::Vector3d &contactPoint, const Eigen::Vector3d &contactForce)
 Creates a force vector for the contact forces.
void update (float lineLength, const Eigen::Vector3d &contactPoint, const Eigen::Vector3d &contactForce)
 update the contact force visual

Protected Member Functions

osg::Matrix _convertVectorToOsgTF (const Eigen::Vector3d &point, const Eigen::Vector3d &vector)
 Converts two Eigen::Vector3d's specifying the point of contact and direction of the force to an osg::Matrix.

Protected Attributes

osgGolems::Line_contactForceLine
 Geometry creating the Line in OpenSceneGraph.
bool _debug
 Whether or not to print out debug statements.

Detailed Description

Class that creates a force vector visualization node.


Constructor & Destructor Documentation

ContactForceVisual::ContactForceVisual ( bool  debug = false)

Constructs a ContactForceVisual object.

Parameters:
debugWhether or not to print debug statements

Member Function Documentation

osg::Matrix ContactForceVisual::_convertVectorToOsgTF ( const Eigen::Vector3d &  point,
const Eigen::Vector3d &  vector 
) [protected]

Converts two Eigen::Vector3d's specifying the point of contact and direction of the force to an osg::Matrix.

Parameters:
pointVector specifying the point of contact
vectorVector specifying the direction of the force
Returns:
osg::Matrix pointer which is the transform of the force vector
void ContactForceVisual::createForceVector ( float  lineLength,
const Eigen::Vector3d &  contactPoint,
const Eigen::Vector3d &  contactForce 
)

Creates a force vector for the contact forces.

Parameters:
lineLengthLength of the force vector
contactPointVector specifying the point of the contact
contactForceForce of the contact force
Returns:
osg::MatrixTransform pointer to the TF containing the force vector node
void ContactForceVisual::update ( float  lineLength,
const Eigen::Vector3d &  contactPoint,
const Eigen::Vector3d &  contactForce 
)

update the contact force visual

Parameters:
lineLengthLength of the force vector
contactPointVector specifying the point of the contact
contactForceForce of the contact force
Returns:
void

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator