#include <SoJointSlider.h>
Public Member Functions | |
SoSFFloat | getPosition () |
SoSFFloat | getPositionRate () |
virtual void | setForce (dReal force1=0.0f) |
virtual void | setParams () |
SoJointSlider (const SbString &BodyOne="", const SbString &BodyTwo="", const SbString &nodeName="") | |
Static Public Member Functions | |
static void | initClass () |
Public Attributes | |
SoSFFloat | Bounce |
SoSFFloat | CFM |
SoSFFloat | FudgeFactor |
SoSFFloat | HiStop |
SoSFFloat | LoStop |
SoSFFloat | MaxForce |
SoSFVec3f | soAxis |
SoSFFloat | soForce |
SoSFFloat | StopCFM |
SoSFFloat | StopERP |
SoSFFloat | Velocity |
Protected Member Functions | |
virtual void | createOdeJoint (const dWorldID soWorldId) |
virtual SoNode * | createVisualisation () |
virtual void | updateOdeJointProperties (const SbMatrix &modelMatrix) |
Protected Attributes | |
float | initForce |
float | initMaxForce |
float | initVelocity |
Private Member Functions | |
SO_KIT_HEADER (SoJointSlider) |
These joints allow a wide variety of movement, but not much distance.
A slider joint
Definition at line 32 of file SoJointSlider.h.
SoJointSlider::SoJointSlider | ( | const SbString & | BodyOne = "" , |
|
const SbString & | BodyTwo = "" , |
|||
const SbString & | nodeName = "" | |||
) |
The parameterized constructor of SoJointSlider.
BodyOne | name of the first body to connect with (default = "") | |
BodyTwo | name of the second body to connect with (default = "") | |
nodeName | name of the node in the Inventor scenegraph |
Definition at line 126 of file SoJointSlider.cpp.
References Bounce, CFM, FudgeFactor, HiStop, SoJoint::INIT_CFM, SoJoint::INIT_ERP, LoStop, MaxForce, soAxis, soForce, StopCFM, StopERP, SoJoint::updateOdeParametersTrigger, and Velocity.
void SoJointSlider::createOdeJoint | ( | const dWorldID | soWorldId | ) | [protected, virtual] |
This method creates a slider joint using the soWorldId
and stores initial values.
soWorldId | the ODE world ID used for creating the joint |
Reimplemented from SoJoint.
Definition at line 174 of file SoJointSlider.cpp.
References initForce, initMaxForce, initVelocity, MaxForce, soForce, SoJoint::soJointGroupId, SoJoint::soJointId, and Velocity.
SoNode * SoJointSlider::createVisualisation | ( | ) | [protected, virtual] |
This method must be overridden by any subclass of SoJoint to return a visualisation matching the joint type.
Reimplemented from SoJoint.
Definition at line 212 of file SoJointSlider.cpp.
References SoJoint::GenerateCylinderAlignmentRotation(), and soAxis.
SoSFFloat SoJointSlider::getPosition | ( | ) |
Definition at line 244 of file SoJointSlider.cpp.
References SoJoint::soJointId.
Referenced by GetJointPosition::vExecute().
SoSFFloat SoJointSlider::getPositionRate | ( | ) |
Definition at line 252 of file SoJointSlider.cpp.
References SoJoint::soJointId.
Referenced by GetJointPositionRate::vExecute().
void SoJointSlider::initClass | ( | ) | [static] |
Initialises the class and it's type id variables.
Reimplemented from SoJoint.
Definition at line 114 of file SoJointSlider.cpp.
void SoJointSlider::setForce | ( | dReal | force1 = 0.0f |
) | [virtual] |
This method sets the value of force1
as a force on the slider joint.
force1 | specifies the forces in X, Y and Z direction. |
Reimplemented from SoJoint.
Definition at line 163 of file SoJointSlider.cpp.
References SoJoint::soJointId.
void SoJointSlider::setParams | ( | ) | [virtual] |
This method must be overridden by any subclass of SoJoint to set the ODE parameters of the object.
Reimplemented from SoJoint.
Definition at line 230 of file SoJointSlider.cpp.
References Bounce, CFM, FudgeFactor, HiStop, LoStop, MaxForce, SoJoint::soJointId, StopCFM, StopERP, and Velocity.
SoJointSlider::SO_KIT_HEADER | ( | SoJointSlider | ) | [private] |
void SoJointSlider::updateOdeJointProperties | ( | const SbMatrix & | modelMatrix | ) | [protected, virtual] |
This method updates the axis of the slider joint using the modelMatrix
as reference and adds an initial slider force.
modelMatrix | model matrix taken from Coin |
Reimplemented from SoJoint.
Definition at line 191 of file SoJointSlider.cpp.
References initForce, initMaxForce, initVelocity, MaxForce, soAxis, soForce, SoJoint::soJointId, and Velocity.
The bouncyness of the stops (default = 0.0). This is a restitution parameter in the range 0..1. 0 means the stops are not bouncy at all, 1 means maximum bouncyness.
Definition at line 56 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
The constraint force mixing (CFM) value used when not at a stop (default = SoJoint::INIT_CFM).
Definition at line 57 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
(default = 1.0)
The current (ODE) joint stop/motor implementation has a small problem: when the joint is at one stop and the motor is set to move it away from the stop, too much force may be applied for one time step, causing a ``jumping'' motion. This fudge factor is used to scale this excess force. It should have a value between zero and one (the default value). If the jumping motion is too visible in a joint, the value can be reduced. Making this value too small can prevent the motor from being able to move the joint away from a stop.
Definition at line 55 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
High stop for the jointangle (default = dInfinity). Setting this to dInfinity turns off the high stop. For rotational joints, this stop must be less than pi to be effective.
Definition at line 52 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
float SoJointSlider::initForce [protected] |
Definition at line 68 of file SoJointSlider.h.
Referenced by createOdeJoint(), and updateOdeJointProperties().
float SoJointSlider::initMaxForce [protected] |
Definition at line 67 of file SoJointSlider.h.
Referenced by createOdeJoint(), and updateOdeJointProperties().
float SoJointSlider::initVelocity [protected] |
Definition at line 66 of file SoJointSlider.h.
Referenced by createOdeJoint(), and updateOdeJointProperties().
Low stop for the jointangle (default = -dInfinity). Setting this to -dInfinity turns off the low stop. For rotational joints, this stop must be greater than - pi to be effective.
Definition at line 51 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
The maximum force or torque that the motor will use to achieve the desired velocity (default = 0.0). This must always be greater than or equal to zero. Setting this to zero turns off the motor.
Definition at line 54 of file SoJointSlider.h.
Referenced by createOdeJoint(), setParams(), SoJointSlider(), updateOdeJointProperties(), and SetJointMaxForce::vExecute().
The axis for the slider joint (default = {0.0f,0.0f,0.0f}).
Definition at line 48 of file SoJointSlider.h.
Referenced by createVisualisation(), SoJointSlider(), and updateOdeJointProperties().
The force for the slider joint (default = 0.0f).
Definition at line 49 of file SoJointSlider.h.
Referenced by createOdeJoint(), SoJointSlider(), and updateOdeJointProperties().
The constraint force mixing (CFM) value used by the stops (default = SoJoint::INIT_CFM). Together with the ERP value this can be used to get spongy or soft stops.
Definition at line 59 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
The error reduction parameter (ERP) used by the stops (default = SoJoint::INIT_ERP).
Definition at line 58 of file SoJointSlider.h.
Referenced by setParams(), and SoJointSlider().
Desired motor angular or linear velocity (default = 0.0).
Definition at line 53 of file SoJointSlider.h.
Referenced by createOdeJoint(), setParams(), SoJointSlider(), updateOdeJointProperties(), and SetJointSpeed::vExecute().
Generated on Sat Mar 10 20:00:21 2012 for IPSA by 1.5.8 |