Tlink Struct Reference

Detailed Description

Information about each rigid part of a mechanisms. Each link is formed by one of more convex bodies.

See Also
link.h, link.c.

Definition at line 89 of file link.h.

Data Fields

char * name
 
double s
 
double c
 
THTransform R
 
THTransform iR
 
Tvector bodies
 
boolean allSpheres
 
unsigned int axisID [3]
 
double maxCoord
 
TCuikSystemcsvID
 
unsigned int * vID
 
unsigned int nvID
 

Field Documentation

double Tlink::s

Sinus between the vectors defining the internal reference frame for the link.
The default value is 1.
See ChangeLinkReferenceFrame.

Definition at line 92 of file link.h.

Referenced by ChangeLinkReferenceFrame(), CopyLink(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), InitLink(), RegenerateLinkBoxLinks(), and RegenerateLinkSolutionLinks().

double Tlink::c

Cosinus between the vectors defining the internal reference frame for the link.
The default value is 0.
See ChangeLinkReferenceFrame.

Definition at line 97 of file link.h.

Referenced by ChangeLinkReferenceFrame(), CopyLink(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), and InitLink().

THTransform Tlink::R

Rotation matrix defining the internal reference frame from the reference frame where bodies are defined.
In some cases the links do not have an orthonormal basis associated but a non-orthonormal one. In this case the variables for the link encode M*iR with M the orthonormal basis and iR a basis change to a non-orthonormal basis. Where in normal links points (p) are taken to the global frame using M*p, here we have to compute (M*iR)*R*p=M*p. The link variables encode M*iR all together and, thus we need R to compute R*p, when necessary. The default value is the identity.
Note: For convenience, we use a homogeneous transform structure to hold the basis change but the matrix is not a homogeneous transform (the new rotation basis is not necessarilyt orthonormal). The two only operations we use from the homogeneous transform implementation are a matrix per vector product and a matrix matrix operation See ChangeLinkReferenceFrame.

Definition at line 102 of file link.h.

Referenced by ApplyLinkRotFLinks(), ApplyLinkRotLinks(), ApplyLinkRotVar(), ChangeLinkReferenceFrame(), CopyLink(), DeleteLink(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), and InitLink().

THTransform Tlink::iR

Inverse of R. This is necessary to recover M*iR for a given M (the link rotation using a orthonormal basis). In this case M*iR gives the values for the variables used internally to represent the rotation for the link.

Definition at line 119 of file link.h.

Referenced by ChangeLinkReferenceFrame(), CopyLink(), DeleteLink(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), and InitLink().

Tvector Tlink::bodies

Set of sub-parts of the link where each part is a convex object.
All these convex objects are defined a common reference frame, i.e., the link's reference frame.
Bodies are convex polyhedrons (see Tpolyhedron).

Definition at line 124 of file link.h.

Referenced by AddBody2Link(), CopyLink(), DeleteLink(), GetLinkBody(), GetLinkBodyStatus(), InitLink(), and LinkNBodies().

boolean Tlink::allSpheres

TRUE if all non-DECOR bodies (i.e., bodies that ar considered in collision detection) are spheres. If all bodies in all links are spheres, we implement a speciall collision detectio prodedure based on the distance between the centers and not on separating planes.

Definition at line 129 of file link.h.

Referenced by AddBody2Link(), CopyLink(), InitLink(), and IsLinkAllSpheres().

unsigned int Tlink::axisID[3]

Identifier of the three objects (lines) representing the reference frame for the link.
These identifiers are only used if axes parameter of PlotLink is larger than 0. Otherwise they are set to NO_UINT.

Definition at line 134 of file link.h.

Referenced by CopyLink(), InitLink(), MoveLinkFromTransform(), and PlotLink().

double Tlink::maxCoord

Maximum coordinate value used in any of the bodies of the link.

Definition at line 140 of file link.h.

Referenced by AddBody2Link(), CopyLink(), GetLinkMaxCoordinate(), and InitLink().

TCuikSystem* Tlink::csvID

Last cuik system used to get the variable identifiers of this link. If in the new calls to GetTransform2Link, RegenerateLinkBox, or RegenerateLinkSolution the input cuiksystem is the same as this one, we could reuse the values stored in vID. Otherwise we have to recompute them.

Definition at line 142 of file link.h.

Referenced by CacheRotVarsFLinks(), CacheRotVarsLinks(), CacheRotVarsQLinks(), CopyLink(), DeleteLink(), and InitLink().

unsigned int Tlink::nvID

Number of elements in vID. This depends on the CT_REPRESENTATION parameter.

Definition at line 148 of file link.h.

Referenced by CacheRotVarsFLinks(), CacheRotVarsLinks(), CacheRotVarsQLinks(), CopyLink(), DeleteLink(), and InitLink().