H3DNetworkingUtils::Dynamic Class Reference

The Dynamic class is a DynamicTransform that puts the necessary routes in place to collect haptic forces on its enclosed geometry and influence the motion of the transform. More...

#include <H3DNetworkingUtils/Dynamic.h>

Inheritance diagram for H3DNetworkingUtils::Dynamic:

Inheritance graph

List of all members.

Public Member Functions

 Dynamic (H3D::Inst< AddChildren > _addChildren=0, H3D::Inst< RemoveChildren > _removeChildren=0, H3D::Inst< MFChild > _children=0, H3D::Inst< H3D::SFNode > _metadata=0, H3D::Inst< SFBound > _bound=0, H3D::Inst< H3D::SFVec3f > _bboxCenter=0, H3D::Inst< H3D::SFVec3f > _bboxSize=0, H3D::Inst< SFTransformedBound > _transformedBound=0, H3D::Inst< SFMatrix4f > _matrix=0, H3D::Inst< SFMatrix4f > _accumulatedForward=0, H3D::Inst< SFMatrix4f > _accumulatedInverse=0, H3D::Inst< H3D::SFVec3f > _position=0, H3D::Inst< H3D::SFRotation > _orientation=0, H3D::Inst< SFVelocity > _velocity=0, H3D::Inst< H3D::SFVec3f > _momentum=0, H3D::Inst< H3D::SFVec3f > _force=0, H3D::Inst< SFAngularVelocity > _angularVelocity=0, H3D::Inst< H3D::SFVec3f > _angularMomentum=0, H3D::Inst< SFSpin > _spin=0, H3D::Inst< H3D::SFVec3f > _torque=0, H3D::Inst< H3D::SFFloat > _mass=0, H3D::Inst< H3D::SFMatrix3f > _inertiaTensor=0, H3D::Inst< SFMotion > _motion=0, H3D::Inst< H3D::MFVec3f > _contactForces=0, H3D::Inst< H3D::MFVec3f > _contactTorques=0, H3D::Inst< SumMFVec3f > _totalContactForce=0, H3D::Inst< CalcTorque > _totalContactTorque=0, H3D::Inst< SumForces > _externalForces=0, H3D::Inst< SumTorques > _externalTorques=0, H3D::Inst< H3D::SFVec3f > _freedom=0, H3D::Inst< H3D::SFVec3f > _angularFreedom=0, H3D::Inst< H3D::SFFloat > _linearDamping=0, H3D::Inst< H3D::SFFloat > _rotationalDamping=0, H3D::Inst< H3D::SFFloat > _linearSpringStiffness=0, H3D::Inst< H3D::SFFloat > _angularSpringStiffness=0)
 Constructor.
virtual void addImpulse (const H3D::Vec3f &f) const
 addImpulse: apply a force lasting one graphics cycle.
virtual void addImpulseTorque (const H3D::Vec3f &t) const
 addImpulseTorque: apply a torque lasting one graphics cycle.

Public Attributes

auto_ptr< H3D::MFVec3f > contactForces
 The array of forces being applied to the object from user haptic tool contacts
access type: outputOnly
basic type: MFVec3f
default value:.
auto_ptr< H3D::MFVec3f > contactTorques
 The array of torques being applied to the object from user haptic tool contacts
access type: outputOnly
basic type: MFVec3f
default value:.
auto_ptr< H3D::SFVec3f > freedom
 The freedom field allows the Dynamic to be restricted in its movement in one, two or three axes
Note that this has no effect on its rotational behaviour
For example 1,1,1 allows full movement
0,0,0 allows no movement
1,0,0 allows movement along the x axis only (this could be called a 'slot-Dynamic')
1,1,0 allows movement on the xy plane only (this could be called a 'plane-Dynamic')
0.5,1,1 allows movement in any direction but is 50% restricted in the x direction
Note that this class can behave as a slot-dynamic if you restrict two dimensions
access type: inputOutput
basic type: SFVec3f
default value: 1 1 1.
auto_ptr< H3D::SFVec3f > angularFreedom
 angularFreedom allows the Dynamic to be restricted in its rotation in one, two or three axes
For example, an angularFreedom of 0 0 1 will only allow rotation about the z axis
For finer rotational control
set inertiaTensor = 0.0001 0 0 0 0.0001 0 0 0 0.0001 for a really loose spin
or 10000 0 0 0 1000 0 0 0 1000 for no spin
access type: inputOutput
basic type: SFVec3f
default value: 1 1 1
auto_ptr< H3D::SFFloat > linearDamping
 Damping for linear movement
access type: inputOutput
basic type: SFFloat
default value: 0.
auto_ptr< H3D::SFFloat > rotationalDamping
 Damping for rotations
access type: inputOutput
basic type: SFFloat
default value: 0.
auto_ptr< SumMFVec3ftotalContactForce
 The accumulated total of forces in contactForces
access type: outputOnly
basic type: SFVec3f
default value: 0 0 0.
auto_ptr< CalcTorquetotalContactTorque
 The accumulated total of torques in contactTorques
access type: outputOnly
basic type: SFVec3f
default value: 0 0 0.
auto_ptr< SumForcesexternalForces
 Other forces can be routed to this - for example, in a networked system,
the user forces from another machine on this object can be routed to this field
access type: inputOnly
basic type: SFVec3f
default value: 0 0 0.
auto_ptr< SumTorquesexternalTorques
 Other torques can be routed to this - for example, in a networked system,
the user torques from another machine on this object can be routed to this field
access type: inputOnly
basic type: SFVec3f
default value: 0 0 0.
auto_ptr< H3D::SFFloat > linearSpringStiffness
 This node can optionally can have a spring force pulling it towards the origin
A typical stiffness = 100
access type: inputOutput
basic type: SFFloat
default value: 0 (off by default).
auto_ptr< H3D::SFFloat > angularSpringStiffness
 This node can optionally can have a spring force rotating it towards its original orientation
A typical stiffness = 100
access type: inputOutput
basic type: SFFloat
default value: 0 (off by default).

Classes

class  CalcTorque
 The CalcTorque field calulates the torque applied to the geometry with the haptics device /n routes_in[0] is the accumulatedForward matrix of this node /n routes_in[1] is the accumulatedInverse matrix of this node /n routes_in[2] is the collection of forces from device contacts /n routes_in[3] is the collection of global positions of the device contacts /n routes_in[4] is the angularFreedom. More...
class  InvertForces
 Accumulates the forces on the haptic devices and inverts them to act on the Dynamic. More...
class  LinDamper
 The LinDamper class generates a force to dampen the linear motion of a DynamicTransform. More...
class  LinSpring
 The LinSpring class generates a spring force that tries to pull the node to the origin /n routes_in[0] is the current position of the DynamicTransform node /n routes_in[1] is the spring force /n 1st input is enabled, /n 2nd input is position, /n 3rd is springAnchorPoint, /n 4th is springStiffness, /n 5th is springRestLength, /n 6th is springSlackLength. More...
class  RotDamper
 RotDamper dampens the angular motion of the dynamic. More...
class  SumForces
 The SumForces class just sums the forces of the MFVec3f with any SFVec3f fields that are routed to it. More...
struct  SumMFVec3f
 SumMFVec3f implements the impulseForce and impulseTorque fields of the MF route_in. More...
class  SumTorques
 The SumTorques class just sums all SFVec3f fields that are routed to it. More...


Detailed Description

The Dynamic class is a DynamicTransform that puts the necessary routes in place to collect haptic forces on its enclosed geometry and influence the motion of the transform.

It encapsulates the routes that can be seen in the H3D example Dynamic/Dynamic.x3d inside the class so that the user does not have to set them up. In this way it is closer to the Reachin Dynamic class. However, it only searches for these geometries at initialization time, so it won't work for geometries added later.
Examples:


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

Generated on Fri Mar 12 10:23:07 2010 for H3DNetworkingUtils by  doxygen 1.5.6