Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPDof Class Reference

Degree Of Freedom - basic component of a VPJoint. More...

#include <vpdof.h>

Inheritance diagram for VPDof:

VPMemoryObj List of all members.

Public Member Functions

 VPDof ()
 VPDof (const VPDof &dof)
 VPDof (const VPPoint4D &vec, const VPPoint4D &pos, float min, float max)
VPDofoperator= (const VPDof &dof)
void SetDescription (const std::string &desc)
const std::string & GetDescription ()
VPPoint4D GetAxis ()
VPPoint4D GetOrigin ()
VPBezierGetEvoluta ()
void GetLim (VPTransform *ptrResult)
VPTransform GetLim ()
float GetMin ()
float GetMax ()
float GetCurrentMin ()
float GetCurrentMax ()
float GetRest ()
VPJointGetOwnerJoint ()
void SetEvoluta (VPBezier *evol)
void SetLim (const VPTransform &t)
void SetAxis (VPVector3D v)
void SetMin (float min)
void SetMax (float max)
void SetOwnerJoint (VPJoint *ow)
void MoveTo (float pos)
 Sets DOF's current position.
float GetCurrent ()
 Gets DOF's current position.
void Move (float variance)
 Changes DOF.
void Transform (const VPTransform &t)
 Applies a transformation to the DOF.
void SetRest (float rest)
void Set (const VPPoint4D &vec, const VPPoint4D &pos, float min, float max)
 Initializes a DOF previouly created with default constructor.
void Rest ()
void SetRangeModifier (VPModifier *m)
VPModifierGetRangeModifier ()
void ApplyTransformTo (VPTransform *ptrTrans) const
 Apply internal transform to some external transform.

Protected Member Functions

void setAxis (VPVector3D ax)
void ComputeLIM ()

Detailed Description

Degree Of Freedom - basic component of a VPJoint.

A DOF is an axis of rotation, that may move along a 3D curve (the evoluta). The rotation of a DOF has a limited range that may change according to external elements, this is controlled by the rangeModifier (VPModifier). There may exist a hierachy of DOFs, so that by changing one DOF, hierarchically lower DOFs are rotated. DOFs may not be shared among joints because they have a single pointer to the owner joint and because the joint destructor may destroy DOFs marked as autoDelete.

Definition at line 33 of file vpdof.h.


Constructor & Destructor Documentation

VPDof::VPDof  ) 
 

Definition at line 37 of file vpdof.cpp.

References VPTransform::MakeIdentity(), NULL, and VPPoint4D::SetXYZW().

VPDof::VPDof const VPDof dof  ) 
 

Definition at line 57 of file vpdof.cpp.

References axis, confortMaxAngle, confortMinAngle, currentMaxAngle, currentMinAngle, currentPosition, description, evoluta, lim, maxAngle, minAngle, ownerJoint, position, rangeModifier, and restPosition.

VPDof::VPDof const VPPoint4D vec,
const VPPoint4D pos,
float  min,
float  max
 

Definition at line 76 of file vpdof.cpp.

References ComputeLIM(), and NULL.


Member Function Documentation

void VPDof::ApplyTransformTo VPTransform ptrTrans  )  const
 

Apply internal transform to some external transform.

Pre-multiply the internal transform to the argument. As VPTransform is a pre-multiplication matrix, the resulting transform has the effect of its previous value followed by the DOF's internal transform. This method is called by VPJoint when it is collection DOFs' transforms in order to compose its final transform.

Parameters:
ptrTrans [in,out] where to apply internal transform.

Definition at line 408 of file vpdof.cpp.

void VPDof::ComputeLIM  )  [protected]
 

Definition at line 334 of file vpdof.cpp.

References VPBezier::GetPoint(), VPTransform::MakeRotation(), and VPPoint4D::SetW().

Referenced by Set(), and VPDof().

VPPoint4D VPDof::GetAxis  ) 
 

Definition at line 167 of file vpdof.cpp.

float VPDof::GetCurrent  ) 
 

Gets DOF's current position.

Definition at line 259 of file vpdof.cpp.

float VPDof::GetCurrentMax  ) 
 

Definition at line 249 of file vpdof.cpp.

References VPModifier::GetMax().

float VPDof::GetCurrentMin  ) 
 

Definition at line 239 of file vpdof.cpp.

References VPModifier::GetMin().

const std::string& VPDof::GetDescription  )  [inline]
 

Definition at line 40 of file vpdof.h.

VPBezier* VPDof::GetEvoluta  )  [inline]
 

Definition at line 43 of file vpdof.h.

VPTransform VPDof::GetLim  ) 
 

Definition at line 179 of file vpdof.cpp.

void VPDof::GetLim VPTransform ptrResult  ) 
 

Definition at line 184 of file vpdof.cpp.

float VPDof::GetMax  ) 
 

Definition at line 234 of file vpdof.cpp.

float VPDof::GetMin  ) 
 

Definition at line 229 of file vpdof.cpp.

VPPoint4D VPDof::GetOrigin  ) 
 

Definition at line 172 of file vpdof.cpp.

References VPTransform::GetTranslation().

VPJoint * VPDof::GetOwnerJoint  ) 
 

Definition at line 269 of file vpdof.cpp.

VPModifier * VPDof::GetRangeModifier  ) 
 

Definition at line 403 of file vpdof.cpp.

float VPDof::GetRest  ) 
 

Definition at line 264 of file vpdof.cpp.

void VPDof::Move float  variance  )  [inline]
 

Changes DOF.

Changes how much the DOF is "bent"

Parameters:
variance [in] How much to change the "current position".
See also:
MoveTo()

Definition at line 74 of file vpdof.h.

References MoveTo().

Referenced by VPBiaxialJoint::Adduct().

void VPDof::MoveTo float  pos  ) 
 

Sets DOF's current position.

Parameters:
pos [in] A number in the range [0:1]
A value of zero means minimal rotation (see GetMin, SetMin) around the initial axis position (see GetAxis, GetOrigin, GetEvoluta and related "Set" methods). A value of one means maximal rotation. Other values are linear.

Definition at line 301 of file vpdof.cpp.

References VPBezier::GetPoint(), VPJoint::MakeLim(), VPTransform::MakeRotation(), VPPoint4D::SetW(), and VPJoint::TransformDofs().

Referenced by Move(), Rest(), VPBiaxialJoint::SetAdductionTo(), VPPolyaxialJoint::SetAductionTo(), VPPolyaxialJoint::SetFlexionTo(), VPBiaxialJoint::SetFlexionTo(), and VPPolyaxialJoint::SetTwistTo().

VPDof & VPDof::operator= const VPDof dof  ) 
 

Definition at line 127 of file vpdof.cpp.

References axis, confortMaxAngle, confortMinAngle, currentMaxAngle, currentMinAngle, currentPosition, description, evoluta, lim, maxAngle, minAngle, ownerJoint, position, rangeModifier, and restPosition.

void VPDof::Rest  ) 
 

Definition at line 393 of file vpdof.cpp.

References MoveTo().

void VPDof::Set const VPPoint4D vec,
const VPPoint4D pos,
float  min,
float  max
 

Initializes a DOF previouly created with default constructor.

Newly created DOFs are set at zero rotation. Use GetCurrent to find initial positial.

Parameters:
vec [in] Rotation vector;
pos [in] DOF position (defines an axis along with "vec");
min [in] Minimal bending angle in radians;
max [in] Maximal bending angle in radians;

Definition at line 147 of file vpdof.cpp.

References ComputeLIM().

void VPDof::setAxis VPVector3D  ax  )  [protected]
 

void VPDof::SetAxis VPVector3D  v  ) 
 

Definition at line 274 of file vpdof.cpp.

void VPDof::SetDescription const std::string &  desc  ) 
 

void VPDof::SetEvoluta VPBezier evol  ) 
 

Definition at line 279 of file vpdof.cpp.

void VPDof::SetLim const VPTransform t  ) 
 

Definition at line 286 of file vpdof.cpp.

void VPDof::SetMax float  max  ) 
 

Definition at line 296 of file vpdof.cpp.

void VPDof::SetMin float  min  ) 
 

Definition at line 291 of file vpdof.cpp.

void VPDof::SetOwnerJoint VPJoint ow  ) 
 

Definition at line 383 of file vpdof.cpp.

Referenced by VPJoint::AddDof().

void VPDof::SetRangeModifier VPModifier m  ) 
 

Definition at line 398 of file vpdof.cpp.

void VPDof::SetRest float  rest  ) 
 

Definition at line 388 of file vpdof.cpp.

void VPDof::Transform const VPTransform t  ) 
 

Applies a transformation to the DOF.

Not of interest to the application programmer. This method is called when a DOF needs to be updated because a hierarchically superior DOF has been changed. This is done by applying the transform to DOF's attributes.

Definition at line 354 of file vpdof.cpp.

References VPTransform::ApplyTo(), VPBezier::GetPoint(), VPTransform::MakeRotation(), VPPoint4D::Normalize(), VPPoint4D::SetW(), and VPCurve::Transform().


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:14 2005 for VPAT by  doxygen 1.4.4