V-ART
|
A joint with one rotational degrees of freedom. More...
#include <uniaxialjoint.h>
Public Member Functions | |
UniaxialJoint () | |
Creates an uninitialized biaxial (1 DOF) joint. More... | |
UniaxialJoint (const VART::UniaxialJoint &joint) | |
Creates a copy of an UniaxialJoint. More... | |
VART::UniaxialJoint & | operator= (const VART::UniaxialJoint &joint) |
Copies all data of an UniaxialJoint to another. More... | |
virtual VART::SceneNode * | Copy () |
Returns a copy of an Joint. Every derived class must reimplements this method, to avoid errors with VART::SceneNode::RecursiveCopy. More... | |
virtual | ~UniaxialJoint () |
void | SetFlexionTo (float value) |
Sets the first DOF. More... | |
void | Flex (float variance) |
Moves the first DOF. More... | |
virtual void | AddDof (Dof *dof) |
Add a DOF to the joint. More... | |
virtual Dof * | AddDof (const Point4D &vec, const Point4D &pos, float min, float max) |
Adds a Dof. More... | |
Public Member Functions inherited from VART::Joint | |
Joint () | |
Creates an uninitialized joint. More... | |
Joint (const Joint &j) | |
virtual | ~Joint () |
virtual void | CopyDofListFrom (VART::Joint &joint) |
Copy the dofList atribute from an joint, setting the ownerJoint atribute of copied dof to 'this' joint instance. More... | |
const Joint & | operator= (const Joint &j) |
unsigned short int | GetNumDofs () const |
void | MakeLim () |
Updates the LIM, based on DOFs' situation. More... | |
const Dof & | GetDof (DofID dof) const |
Returns a joint's DOF. More... | |
void | GetDofs (std::list< Dof * > *dofListPtr) |
Returns all DOFs. More... | |
DofID | GetDofID (const Dof *dofPtr) const |
Returns the DofID of some member Dof. More... | |
void | SetAtRest () |
Put the joint in a rest position. More... | |
bool | MoveDof (DofID dof, float variance) |
Moves a joint's DOF. More... | |
bool | HasDof (DofID dof) |
Checks whether a DOF exists in the joint. More... | |
virtual TypeID | GetID () |
Returns type identification of the node. More... | |
virtual void | XmlPrintOn (std::ostream &os, unsigned int indent) const |
Outputs XML representation of the scene. More... | |
Public Member Functions inherited from VART::Transform | |
Transform () | |
Creates an uninitialized transform. More... | |
Transform (const Transform &trans) | |
Copy constructor. More... | |
void | MakeIdentity () |
Turns transform into identity. More... | |
Point4D | operator* (const Point4D &point) const |
Applies transformation to a point. More... | |
Transform | operator* (const Transform &t) const |
Applies transformation to another transform. More... | |
Transform & | operator= (const Transform &t) |
Copies data from anoter transform. More... | |
void | Apply (const Transform &t) |
Applies a transformation to itself. More... | |
void | ApplyTo (Point4D *ptPoint) const |
Applies tranformation to a point. More... | |
void | MakeTranslation (const Point4D &translationVector) |
Turns transform into a translation. More... | |
void | MakeTranslation (double tx, double ty, double tz) |
Turns transform into a translation. More... | |
void | MakeXRotation (double radians) |
Turns transform into a rotation around the X axis. More... | |
void | MakeYRotation (double radians) |
Turns transform into a rotation around the Y axis. More... | |
void | MakeZRotation (double radians) |
Turns transform into a rotation around the Z axis. More... | |
void | MakeRotation (const Point4D &refVec, const float radians) |
Turns transform into a rotation (around some reference vetor). More... | |
void | MakeRotation (const Point4D &refPoint, const Point4D &refVec, const float radians) |
Turns transform into a rotation (around some reference axis). More... | |
void | MakeScale (double sX, double sY, double sZ) |
Turns transform into a scale. More... | |
void | MakeShear (double shX, double shY) |
Turns transform into a shear. More... | |
void | SetData (double *data) |
Set all data in the transform. More... | |
const double * | GetData () const |
Returns the address of transformation matrix. More... | |
void | GetVectorX (Point4D *result) const |
Returns the X vector of the transform. More... | |
void | GetVectorY (Point4D *result) const |
Returns the Y vector of the transform. More... | |
void | GetVectorZ (Point4D *result) const |
Returns the Z vector of the transform. More... | |
void | GetTranslation (Point4D *result) const |
Returns the translation part of the transform. More... | |
bool | HasNaN () const |
Check for NaNs inside the matrix. More... | |
virtual bool | DrawOGL () const |
Apply transform to rendering engine. More... | |
virtual void | DrawForPicking () const |
Draws and object, setting pick info. More... | |
virtual TypeID | GetID () const |
Returns type identification of the node. More... | |
virtual bool | RecursiveBoundingBox (BoundingBox *bBox) |
Returns the recursive bounding box. More... | |
void | ToggleRecVisibility () |
Toggles the recursive object's visibility. More... | |
void | CopyMatrix (const Transform &t) |
Copies matrix data from another transform. More... | |
Public Member Functions inherited from VART::SceneNode | |
SceneNode () | |
Creates an uninitialized scene node. More... | |
SceneNode (SceneNode &node) | |
virtual | ~SceneNode () |
SceneNode & | operator= (const SceneNode &node) |
virtual SceneNode * | RecursiveCopy () |
const std::string & | GetDescription () const |
Returns a copy of the object's description. More... | |
void | SetDescription (const std::string &desc) |
Changes the object's description. More... | |
void | AddChild (SceneNode &child) |
Add a child at the end of child list. More... | |
bool | DetachChild (SceneNode *childPtr) |
Removes a child from the child list. More... | |
void | AutoDeleteChildren () const |
Deletes (dealocate memory) recursively all children marked as 'autoDelete'. More... | |
SceneNode * | FindChildByName (const std::string &name) const |
Recusively searches its children for a given name. More... | |
std::list< SceneNode * > | GetChilds () |
bool | FindPathTo (SceneNode *targetPtr, SGPath *resultPtr) const |
Search target among children. More... | |
bool | FindPathTo (const std::string &targetName, SGPath *resultPtr) const |
Search target among children. More... | |
int | GetNodeTypeList (TypeID type, std::list< SceneNode * > &nodeList) |
Find all the nodes of with typeID 'type'. More... | |
virtual void | TraverseDepthFirst (SNOperator *operatorPtr) const |
Process all children in depth-first order. More... | |
virtual void | TraverseBreadthFirst (SNOperator *operatorPtr) const |
Process all children in breadth-first order. More... | |
virtual void | LocateDepthFirst (SNLocator *locatorPtr) const |
Seaches for a particular scene node (depth first) More... | |
virtual void | LocateBreadthFirst (SNLocator *locatorPtr) const |
Seaches for a particular scene node (breadth first) More... | |
Public Member Functions inherited from VART::MemoryObj | |
MemoryObj () | |
Default constructor. More... | |
MemoryObj (const VART::MemoryObj &obj) | |
Copy constructor. More... | |
Additional Inherited Members | |
Public Types inherited from VART::Joint | |
enum | DofID { FLEXION, ADDUCTION, TWIST } |
Public Types inherited from VART::SceneNode | |
enum | TypeID { NONE, GRAPHIC_OBJ, BOX, CONE, CURVE, BEZIER, CYLINDER, IMAGE, IMAGE_2D, VOLUME, MESH_OBJECT, SPHERE, JOINT, BIAXIAL_JOINT, CONDYLAR_JOINT, ELLIPSOID_JOINT, SADDLE_JOINT, PLANE_JOINT, POLYAXIAL_JOINT, UNIAXIAL_JOINT, HINGE_JOINT, PIVOT_JOINT, TRANSFORM } |
Public Attributes inherited from VART::MemoryObj | |
bool | autoDelete |
Static Public Attributes inherited from VART::SceneNode | |
static bool | recursivePrinting = true |
Protected Member Functions inherited from VART::SceneNode | |
virtual bool | DrawInstanceOGL () const |
Non-recursive drawing - should be overriden by every derived class. More... | |
bool | RecursiveFindPathTo (SceneNode *targetPtr, SGPath *resultPtr) const |
Recursive auxiliar method for FindPathTo. More... | |
bool | RecursiveFindPathTo (const std::string &targetName, SGPath *resultPtr) const |
Recursive auxiliar method for FindPathTo. More... | |
Protected Attributes inherited from VART::Joint | |
std::list< Dof * > | dofList |
Protected Attributes inherited from VART::Transform | |
double | matrix [16] |
Protected Attributes inherited from VART::SceneNode | |
std::list< SceneNode * > | childList |
Child list. More... | |
std::string | description |
Textual identification. More... | |
A joint with one rotational degrees of freedom.
FixMe: Put detailed description here.
Definition at line 16 of file uniaxialjoint.h.
VART::UniaxialJoint::UniaxialJoint | ( | ) |
Creates an uninitialized biaxial (1 DOF) joint.
Before using the joint, one DOF should be added to it.
Definition at line 10 of file uniaxialjoint.cpp.
VART::UniaxialJoint::UniaxialJoint | ( | const VART::UniaxialJoint & | joint | ) |
Creates a copy of an UniaxialJoint.
Definition at line 14 of file uniaxialjoint.cpp.
|
virtual |
Definition at line 34 of file uniaxialjoint.cpp.
|
virtual |
Add a DOF to the joint.
dof | [in] A pointer to the DOF that is to be added. |
Only one DOF can be added to a uniaxial joint. Joint's destructor will dealocate DOF marked as autoDelete.
Reimplemented from VART::Joint.
Definition at line 54 of file uniaxialjoint.cpp.
Referenced by VART::XmlScene::LoadSceneNode().
|
virtual |
Adds a Dof.
vec | [in] A vector. Together with "pos", defines the rotation axis of the new Dof. |
pos | [in] A point. Together with "vec", defines the roatation axis of the new Dof. |
min | [in] An angle (radians). Minimal allowed rotation. |
max | [in] An angle (radians). Maximal allowed rotation. |
Creates a new Dof with given parameters. Attaches the Dof to itself. The memory will be released upon Joint destruction.
Reimplemented from VART::Joint.
Definition at line 45 of file uniaxialjoint.cpp.
|
virtual |
Returns a copy of an Joint. Every derived class must reimplements this method, to avoid errors with VART::SceneNode::RecursiveCopy.
Reimplemented from VART::Joint.
Definition at line 25 of file uniaxialjoint.cpp.
References VART::Joint::CopyDofListFrom().
|
inline |
Moves the first DOF.
variance | [in] A number in the range [0:1] - will be added to the first DOF's position (see Dof::GetCurrent). |
Definition at line 46 of file uniaxialjoint.h.
References VART::Joint::dofList.
VART::UniaxialJoint & VART::UniaxialJoint::operator= | ( | const VART::UniaxialJoint & | joint | ) |
Copies all data of an UniaxialJoint to another.
Definition at line 19 of file uniaxialjoint.cpp.
void VART::UniaxialJoint::SetFlexionTo | ( | float | value | ) |
Sets the first DOF.
value | [in] A number in the range [0:1] - zero means "set to minimal angle" and 1 means "set to maximal angle". |
Definition at line 38 of file uniaxialjoint.cpp.
References VART::Dof::MoveTo().