Introduction
Macro Definition Documentation◆ MAX_ROT_VARS
Maximum number of variables used to represent a link rotation. Used to allocate space for the GetRotVarID functions. Function Documentation◆ TrivialInertiaMatrix()
Identifies trivial (i.e., null) inertia matrices.
Definition at line 691 of file link.c. References ZERO. Referenced by PrintLink(). ◆ AdjustLinkForceParameters()
Adjust the range of the stiffness, length, rest, and maxForce variables associated with the link. These variables are related by the equations force=stiffness*(length-rest) which can be used to crop the ranges given by the user.
Definition at line 790 of file link.c. References CopyInterval(), Error(), FALSE, Tlink::force, Tlink::forceModel, Intersection(), IntervalAdd(), IntervalScale(), IntervalSize(), IntervalSubstract(), Tlink::length, LINEAR_FORCE, Tlink::rest, Tlink::stiffness, TRUE, and ZERO. Referenced by InitDeformXLink(), and InitPrismaticXLink(). ◆ GetRotVarID()
Defines the csvID, vID, and nvID fields for the link. If the values are already cached nothing is done. If the cuiksystem is diferent from that for which the identified where computed before they are re-computed. Note that in general there are not translation variables associated with a link but that translations are computed accumulating displacements on links from the ground link to the current one. In global cuiksystems, though, those accumulations are identified with given variables and they can be directly retrieved (see SetTransVars).
Definition at line 1862 of file link.c. References Tlink::csvID, Error(), GetRotVarIDAxisX(), GetRotVarIDFLinks(), GetRotVarIDLinks(), GetRotVarIDQLinks(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, Tlink::nvID, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, Tlink::type, and Tlink::vID. Referenced by ApplyLinkRotVar(), FixLinkZToZero(), GenerateLinkSolutionAxisX(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateLinkSolutionQLinks(), GenerateSolutionFromLinkConf(), GetLinkConfFromSolution(), GetLinkForceVars(), GetLinkPoseSimpVars(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransform2LinkQLinks(), LinkForceField(), LinkPotentialEnergy(), RegenerateLinkBoxLinks(), RegenerateLinkBoxQLinks(), RegenerateLinkSolutionLinks(), RegenerateLinkSolutionQLinks(), SetForceRelatedVars(), SetForceVars(), and SetRotVars(). ◆ GetRotVarIDAxisX()
This function is specific for LINK_AxisX links. For this links only one axis is represented. It is also used for LINK_DeforX and for LINK_PrismaticX. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 1938 of file link.c. References Tlink::csvID, Tlink::forceModel, GetCSVariableID(), LINEAR_FORCE, LINK_LENGTH, LINK_MAX_FORCE, LINK_REST, LINK_ROT, Tlink::name, NEW, NO_FORCE, NO_UINT, Tlink::nvID, Tlink::varLength, and Tlink::vID. Referenced by GetRotVarID(). ◆ GetRotVarIDFLinks()
Version of GetRotVarID for REP_FLINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 1982 of file link.c. References Tlink::csvID, GetCSVariableID(), LINK_ROT, Tlink::name, NEW, Tlink::nvID, and Tlink::vID. Referenced by GetRotVarID(). ◆ GetRotVarIDLinks()
Version of GetRotVarID for REP_LINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 2007 of file link.c. References Tlink::csvID, GetCSVariableID(), LINK_ROT2, Tlink::name, NEW, Tlink::nvID, and Tlink::vID. Referenced by GetRotVarID(). ◆ GetRotVarIDQLinks()
Version of GetRotVarID for REP_QLINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 2031 of file link.c. References Tlink::csvID, GetCSVariableID(), LINK_ROT3_E, LINK_ROT3_Q, Tlink::name, NEW, Tlink::nvID, and Tlink::vID. Referenced by GetRotVarID(). ◆ GenerateLinkConf()
Adds the configuration variables to the system of equations. These parameters will be later used in the equations (i.e., in the force equilibrium equations for tensegrities).
Definition at line 2215 of file link.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), DeleteVariable(), EQU, Error(), Tlink::force, Tlink::forceModel, GetCSVariableID(), GetParameter(), InitEquation(), InitMonomial(), Tlink::length, LINEAR_FORCE, LINK_LENGTH, LINK_MAX_FORCE, LINK_REST, Tlink::name, NEW, NewVariable(), NFUN, NO_FORCE, NO_UINT, REP_FLINKS, REP_LINKS, ResetMonomial(), Tlink::rest, SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), Tlink::stiffness, SYSTEM_EQ, SYSTEM_VAR, and Tlink::varLength. Referenced by GenerateLinkRot(). ◆ GenerateLinkRotAxisX()
Version of GenerateLinkRot for links where only the X axis is represented.
Definition at line 2307 of file link.c. References AddEquation2CS(), AddVariable2CS(), DeleteEquation(), DeleteVariable(), GenerateNormEquation(), GetCSVariableID(), IsGroundLink, LINK_ROT, Tlink::name, NEW, NewInterval(), NewVariable(), NO_UINT, SetVariableInterval(), and SYSTEM_VAR. Referenced by GenerateLinkRot(). ◆ GenerateLinkRotLinks()
Version of GenerateLinkRot for partial matrix representation.
Definition at line 2457 of file link.c. References AddEquation2CS(), AddVariable2CS(), Tlink::c, DeleteEquation(), DeleteVariable(), DUMMY_VAR, GenerateDotProductEquation(), GenerateNormEquation(), GenerateScaledSaddleEquation(), GetCSVariableID(), IsGroundLink, LINK_ROT, LINK_ROT2, Tlink::name, NEW, NewInterval(), NewVariable(), NO_UINT, Tlink::s, SetVariableInterval(), and SYSTEM_VAR. Referenced by GenerateLinkRot(). ◆ GenerateLinkRotFLinks()
Version of GenerateLinkRot for full matrix representation.
Definition at line 2343 of file link.c. References AddEquation2CS(), AddVariable2CS(), Tlink::c, DeleteEquation(), DeleteVariable(), GenerateCrossProductEquations(), GenerateDotProductEquation(), GenerateNormEquation(), GetCSVariableID(), IsGroundLink, LINK_ROT, Tlink::name, NEW, NewInterval(), NewVariable(), NO_UINT, ROT_REDUNDANCY, Tlink::s, SetVariableInterval(), and SYSTEM_VAR. Referenced by GenerateLinkRot(). ◆ GenerateLinkRotQLinks()
Version of GenerateLinkRot for quaternion representation.
Definition at line 2537 of file link.c. References AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), DeleteEquation(), DeleteMonomial(), DeleteVariable(), DUMMY_VAR, EQU, GenerateSaddleEquation(), GetCSVariableID(), InitEquation(), InitMonomial(), IsGroundLink, LINK_ROT3_E, LINK_ROT3_Q, Tlink::name, NEW, NewInterval(), NewVariable(), NFUN, NO_UINT, ResetMonomial(), SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SYSTEM_EQ, and SYSTEM_VAR. Referenced by GenerateLinkRot(). ◆ ApplyLinkRotAxisX()
Version of ApplyLinkRot for links for which only the axis X is relevant.
Definition at line 2748 of file link.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteMonomial(), Error(), GetCSVariableID(), InitMonomial(), LINK_ROT, Tlink::name, NEW, NFUN, NO_UINT, Norm(), ResetMonomial(), and ZERO. Referenced by ApplyLinkRot(), and ApplyLinkRotNoDeform(). ◆ ApplyLinkRotDeformX()
Version of ApplyLinkRot for links for which only the axis X is relevant and where there is an elongation along this axis.
Definition at line 2802 of file link.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteMonomial(), Error(), GetCSVariableID(), InitMonomial(), LINK_LENGTH, LINK_ROT, Tlink::name, NEW, NFUN, NO_UINT, Norm(), ResetMonomial(), and ZERO. Referenced by ApplyLinkRot(). ◆ ApplyLinkRotLinks()
Version of ApplyLinkRot for partial matrix representation.
Definition at line 2926 of file link.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteMonomial(), Error(), GetCSVariableID(), HTransformApply(), InitMonomial(), LINK_ROT2, Tlink::name, NEW, NFUN, NO_UINT, Tlink::R, ResetMonomial(), and ZERO. Referenced by ApplyLinkRot(). ◆ ApplyLinkRotFLinks()
Version of ApplyLinkRot for full matrix representation.
Definition at line 2860 of file link.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteMonomial(), Error(), GetCSVariableID(), HTransformApply(), InitMonomial(), LINK_ROT, Tlink::name, NEW, NFUN, NO_UINT, Tlink::R, ResetMonomial(), and ZERO. Referenced by ApplyLinkRot(). ◆ ApplyLinkRotQLinks()
Version of ApplyLinkRot for quaternion representation.
Definition at line 2995 of file link.c. References AddCt2Monomial(), AddMonomial(), AddVariable2Monomial(), DeleteMonomial(), Error(), GetCSVariableID(), InitMonomial(), LINK_ROT3_E, Tlink::name, NEW, NFUN, NO_UINT, ResetMonomial(), and ZERO. Referenced by ApplyLinkRot(). ◆ RegenerateLinkSolutionConf()
Computes the force-related dummy variables from the system ones. Actually nothing is computed since all force variables are system variables. This is an auxiliary function of RegenerateLinkSolution.
Definition at line 3261 of file link.c. Referenced by RegenerateLinkSolution(). ◆ RegenerateLinkSolutionLinks()
Version of RegenerateLinkSolution for partial matrix representation.
Definition at line 3266 of file link.c. References GetRotVarID(), MAX_ROT_VARS, and Tlink::s. Referenced by GenerateLinkSolutionLinks(), and RegenerateLinkSolution(). ◆ RegenerateLinkSolutionQLinks()
Version of RegenerateLinkSolution for quaternion representation.
Definition at line 3285 of file link.c. References GetRotVarID(), and MAX_ROT_VARS. Referenced by GenerateLinkSolutionQLinks(), and RegenerateLinkSolution(). ◆ RegenerateLinkBoxConf()
Computes the force-related dummy variables from the system ones. Actually nothing is computed since all force variables are system variables. This is an auxiliary function of RegenerateLinkBox and is the same as RegenerateLinkSolutionConf but working on a box instead than on a point.
Definition at line 3345 of file link.c. Referenced by RegenerateLinkBox(). ◆ RegenerateLinkBoxLinks()
Version of RegenerateLinkBox for partial matrix representation.
Definition at line 3350 of file link.c. References GetBoxIntervals(), GetRotVarID(), IntervalProduct(), IntervalScale(), MAX_ROT_VARS, Tlink::s, and SetBoxInterval(). Referenced by RegenerateLinkBox(). ◆ RegenerateLinkBoxQLinks()
Version of RegenerateLinkBox for quaternion representation.
Definition at line 3388 of file link.c. References CopyInterval(), GetBoxInterval(), GetRotVarID(), IntervalProduct(), MAX_ROT_VARS, and SetBoxInterval(). Referenced by RegenerateLinkBox(). ◆ GetTransform2LinkAxisX()
Version of GetTransform2Link for links where only the X axis is relevant. Also used for LINK_DeformX links.
Definition at line 3576 of file link.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, CrossProduct(), DefineNormalVector(), GetRotVarID(), HTransformIdentity(), HTransformSetElement(), MAX_ROT_VARS, Normalize(), and ZERO. Referenced by GetTransform2Link(). ◆ GetTransform2LinkLinks()
Version of GetTransform2Link for full partial representation.
Definition at line 3651 of file link.c. References AXIS_H, GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformProduct(), HTransformSetElement(), MAX_ROT_VARS, and Tlink::R. Referenced by GetTransform2Link(). ◆ GetTransform2LinkFLinks()
Version of GetTransform2Link for full matrix representation.
Definition at line 3612 of file link.c. References AXIS_H, GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformProduct(), HTransformSetElement(), MAX_ROT_VARS, and Tlink::R. Referenced by GetTransform2Link(). ◆ GetTransform2LinkQLinks()
Version of GetTransform2Link for quaternion representation.
Definition at line 3695 of file link.c. References GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformSetElement(), and MAX_ROT_VARS. Referenced by GetTransform2Link(). ◆ GenerateLinkSolutionAxisX()
Version of GenerateLinkSolution for links where only the axis X is relevant. Also used for LINK_DeformX links.
Definition at line 3785 of file link.c. References GetRotVarID(), HTransformGetElement(), and MAX_ROT_VARS. Referenced by GenerateLinkSolution(). ◆ GenerateLinkSolutionLinks()
Version of GenerateLinkSolution for partial matrix representation.
Definition at line 3827 of file link.c. References GetRotVarID(), HTransformDelete(), HTransformGetElement(), HTransformProduct(), Tlink::iR, MAX_ROT_VARS, and RegenerateLinkSolutionLinks(). Referenced by GenerateLinkSolution(). ◆ GenerateLinkSolutionFLinks()
Version of GenerateLinkSolution for full matrix representation.
Definition at line 3800 of file link.c. References GetRotVarID(), HTransformDelete(), HTransformGetElement(), HTransformProduct(), Tlink::iR, and MAX_ROT_VARS. Referenced by GenerateLinkSolution(). ◆ GenerateLinkSolutionQLinks()
Version of GenerateLinkSolution for quaternion representation.
Definition at line 3856 of file link.c. References GetRotVarID(), HTransformGetElement(), MAX_ROT_VARS, and RegenerateLinkSolutionQLinks(). Referenced by GenerateLinkSolution(). ◆ SetTransVars()
Sets to TRUE the translations variables for the given link in the given array of variables. In general the tranlation variables are not in the cuiksystems since translations are computed accumulating displacements over links. The translation variables are only present in very particular cuiksystems and for links that are at the end of a open sequence of links.
Definition at line 1843 of file link.c. References GetCSVariableID(), LINK_Connect, LINK_TRANS, Tlink::name, NEW, NO_UINT, TRUE, and Tlink::type. Referenced by SetPoseVars(). ◆ SetRotVars()
Sets to TRUE the rotation variables for the given link in the given array of variables. Note that the rotation variables depends on the CT_REPRESENTATION setting.
Definition at line 2064 of file link.c. References Error(), GetRotVarID(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, MAX_ROT_VARS, NO_UINT, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, TRUE, and Tlink::type. Referenced by SetPoseVars(). ◆ EmptyLinkConf()Determines if a link internal configuration is empty, i.e., if it is a link without internal deformation degrees of freedom (it may have internal force degrees of freedom but those are not relevant ot the kinematics).
Definition at line 649 of file link.c. References IsVariableLengthLink(), and TLinkConf::l. Referenced by CheckCollisionSolid(), GetLinkConfExtension(), GetLinkConfTransform(), and MoveLinkFromTransform(). ◆ GetLinkConfExtension()
Extension of the link. Only defined for prismatic links. For other links it triggers an error.
Definition at line 654 of file link.c. References EmptyLinkConf(), Error(), GetLinkType(), TLinkConf::l, LINK_PrismaticX, and TLinkConf::p. Referenced by main(). ◆ GetLinkConfTransform()
Defines a transformation that traverses the link, taking into account the possible link deformation..
Definition at line 665 of file link.c. References EmptyLinkConf(), GetLinkType(), HTransformIdentity(), HTransformScaleX(), HTransformTx(), TLinkConf::l, LINK_DeformX, LinkNBodies(), and TLinkConf::p. Referenced by CheckCollisionSolid(), and MoveLinkFromTransform(). ◆ DeleteLinkConf()
Release memory.
Definition at line 684 of file link.c. References TLinkConf::p. Referenced by DeleteLinkTransforms(). ◆ InitLink()
Initializes a link structure with no bodies.
Definition at line 701 of file link.c. References Tlink::allSpheres, Tlink::axisID, Tlink::bodies, Tlink::c, CopyVoidPtr(), Tlink::csvID, DeleteVoidPtr(), Error(), Tlink::extForce, FALSE, Tlink::fixedDim, Tlink::force, Tlink::forceEquilibrium, Tlink::forceModel, HTransformCopy(), HTransformIdentity(), Tlink::iFrame, Tlink::iMatrix, INF, INIT_NUM_SHAPES, InitVector(), Tlink::iR, Tlink::l1, Tlink::l2, Tlink::length, LINK_FullRot, Tlink::mass, Tlink::maxCoord, Tlink::name, NEW, NewInterval(), NO_FORCE, NO_UINT, Tlink::nvID, Tlink::p1, Tlink::p2, Tlink::R, Tlink::rest, Tlink::s, Tlink::stiffness, TRUE, Tlink::type, Tlink::varLength, and Tlink::vID. Referenced by InitAxisXLink(), InitConnectLink(), InitDeformXLink(), InitNoRotLink(), InitPrismaticXLink(), InitWorldFromMolecule(), and main(). ◆ InitNoRotLink()
Initializes a link structure with no bodies. In this particular type of links the orientation of the link is not relevant. Up to now we only use this kink of links for tensegrities where the relevant information is in the connections between links and not in the links themselves. In principle NoRot links have to be in force equilibrium, except if it is explicitly de-activated (see NoForceEquilibriumLink)
Definition at line 781 of file link.c. References Tlink::forceEquilibrium, InitLink(), LINK_NoRot, TRUE, and Tlink::type. ◆ InitAxisXLink()
Initializes a link structure with no bodies. In this particular type of links only the X axis of the frame attached to the link is relevant for the problem. This is used, for instance, when defining composite links (e.g. spherical-spherical) where the internal rotation of the link is not relevant.
Definition at line 853 of file link.c. References CopyInterval(), Error(), FALSE, Tlink::force, Tlink::forceModel, InitLink(), IntervalSize(), Tlink::length, LINEAR_FORCE, LINK_AxisX, LowerLimit(), NewInterval(), NO_FORCE, Tlink::rest, Tlink::stiffness, Tlink::type, VAR_FORCE, Tlink::varLength, ZERO, and ZeroInterval(). Referenced by AddLeg2World(), and InitPrismaticXLink(). ◆ InitDeformXLink()
Initializes an axis X link that can elongate along the X axis (i.e., a deformable Axis X link).
Definition at line 895 of file link.c. References AdjustLinkForceParameters(), CopyInterval(), Error(), Tlink::force, Tlink::forceModel, InitLink(), IntervalSize(), Tlink::length, LINEAR_FORCE, LINK_DeformX, LowerLimit(), NewInterval(), NO_FORCE, Tlink::rest, Tlink::stiffness, TRUE, Tlink::type, UpperLimit(), VAR_FORCE, Tlink::varLength, ZERO, and ZeroInterval(). Referenced by AddLeg2World(). ◆ InitPrismaticXLink()
Initializes an axis X link that can extend along the X axis in a prismatic way. It can be seen as the same as a LINK_DeformX but here the deformation is an extension of a prismatic element.
Definition at line 954 of file link.c. References AdjustLinkForceParameters(), CopyInterval(), Error(), Tlink::force, Tlink::forceModel, InitAxisXLink(), InitLink(), IntervalSize(), Tlink::length, LINEAR_FORCE, LINK_PrismaticX, LowerLimit(), NewInterval(), NO_FORCE, Tlink::rest, Tlink::stiffness, TRUE, Tlink::type, UpperLimit(), VAR_FORCE, Tlink::varLength, ZERO, and ZeroInterval(). Referenced by AddLeg2World(). ◆ InitConnectLink()
Initializes a connection link: a cable, spring or leg connecting two different links.
Definition at line 1026 of file link.c. References AddBody2Link(), C_CABLE, C_LEG, C_SPRING, CopyInterval(), DECOR_SHAPE, DeletePolyhedron(), Error(), HIDDEN_SHAPE, InitLink(), Tlink::l1, Tlink::l2, LINK_Connect, NewCylinder(), NewSphere(), NewSpring(), Tlink::p1, Tlink::p2, Tlink::rest, Tlink::stiffness, and Tlink::type. ◆ CopyLink()Initializes a link copying the information from another link.
Definition at line 1113 of file link.c. References AddBody2Link(), Tlink::allSpheres, Tlink::axisID, Tlink::bodies, Tlink::c, CopyInterval(), CopyVoidPtr(), Tlink::csvID, DeleteVoidPtr(), Tlink::extForce, Tlink::fixedDim, Tlink::force, Tlink::forceEquilibrium, Tlink::forceModel, GetLinkBody(), HTransformCopy(), Tlink::iFrame, Tlink::iMatrix, INIT_NUM_SHAPES, InitVector(), Tlink::iR, Tlink::l1, Tlink::l2, Tlink::length, LinkNBodies(), Tlink::mass, Tlink::maxCoord, Tlink::name, NEW, Tlink::nvID, Tlink::p1, Tlink::p2, Tlink::R, Tlink::rest, Tlink::s, Tlink::stiffness, TRUE, Tlink::type, Tlink::varLength, and Tlink::vID. Referenced by AddLink2Mechanism(). ◆ SetLinkMass()
Sets the mass of the link. If set to 0, the dynamic information is reseted.
Definition at line 1196 of file link.c. References Error(), Tlink::mass, SetLinkInertialFrame(), and SetLinkInertiaMatrix(). ◆ SetLinkInertiaMatrix()
Sets the inertia matrix of the link.
Definition at line 1209 of file link.c. References Tlink::iMatrix. Referenced by SetLinkMass(). ◆ SetLinkInertialFrame()
Sets the inertial frame of the link, i.e., the transfrom from the link reference frame to the inertial reference frame. The inertial reference frame is centered at the center of mass of the link.
Definition at line 1223 of file link.c. References HTransformCopy(), HTransformIdentity(), and Tlink::iFrame. Referenced by SetLinkMass(). ◆ GetLinkMass()
Gives the mass of the link (0 if not set explicitly).
Definition at line 1231 of file link.c. References Tlink::mass. Referenced by InitHandC(), and main(). ◆ GetLinkInertiaMatrix()
Gives the (symmetric) inertia matrix of the link.
Definition at line 1236 of file link.c. References Tlink::iMatrix. Referenced by InitHandC(), and main(). ◆ GetLinkInertialFrame()
Gives the inertial frame of the link with respect to the link frame. This is the identity if not set explicity.
Definition at line 1241 of file link.c. References Tlink::iFrame. Referenced by InitHandC(), and main(). ◆ AddBody2Link()
Adds a body to the link.
Definition at line 1246 of file link.c. References Tlink::allSpheres, Tlink::bodies, CopyPolyhedron(), DECOR_SHAPE, EmptyPolyhedron(), Error(), GetPolyhedronMaxCoordinate(), GetPolyhedronStatus(), GetPolyhedronType(), LINK_NoRot, Tlink::maxCoord, NEW, NewVectorElement(), SPHERE, and Tlink::type. Referenced by AddBody2Mechanism(), AddLeg2World(), CopyLink(), InitConnectLink(), InitWorldFromMolecule(), and main(). ◆ AddForce2Link()
Adds an external force to a link. The force on the link is initalized to zero and several exteran forces can be added. Forces must be expressed in a global reference frame. This is only used in tensegrity structures. In other mechanisms this is not relevant at all.
Definition at line 1269 of file link.c. References Tlink::extForce. ◆ GetForceOnLink()
Retrives the force on a link as defined using AddForce2Link. This is only used in tensegrity structures. In other mechanisms this is not relevant at all.
Definition at line 1276 of file link.c. References Error(), and Tlink::extForce. Referenced by GenerateForceEquilibriumEquations(). ◆ NoForceEquilibriumLink()
Deactivates the force equilibrium on a link. It only has effect on links of type LINK_NoRot (which have not been previously deactivated)
Definition at line 1283 of file link.c. References FALSE, and Tlink::forceEquilibrium. ◆ IsForceEquilibriumLink()Identify links where forces must be in equilibrium (sum to 0, including external forces). Only some of the links in tensegrities are of this type.
Definition at line 1289 of file link.c. References Tlink::forceEquilibrium. Referenced by GenerateForceEquilibriumEquations(). ◆ SetLinkTrans()
Fixes one of the dimension of the translation of a link. This is only used in tensegrity structures. In other mechanisms this is not relevant at all.
Definition at line 1294 of file link.c. References Error(), and Tlink::fixedDim. ◆ GetLinkTrans()
Retives the one of the dimension of the translation of a link. This is only used in tensegrity structures. In other mechanisms this is not relevant at all.
Definition at line 1301 of file link.c. References Error(), and Tlink::fixedDim. Referenced by FixLinks(). ◆ GetLinkLength()The length of the link. Only defined for Axis X links.
Definition at line 1308 of file link.c. References Tlink::length. Referenced by PrintMechanism(). ◆ GetLinkStiffness()
Stiffness of the link. Only defined for some Axis X and Deform X links.
Definition at line 1313 of file link.c. References Error(), Tlink::forceModel, IsConnectionSpring(), LINEAR_FORCE, and Tlink::stiffness. ◆ GetLinkRest()The rest interval for a given link. It is a zero-size interval if the rest is a constant. This is only relevant for tensegrites and not used at all for mechanisms.
Definition at line 1321 of file link.c. References Error(), Tlink::forceModel, IsConnectionSpring(), LINEAR_FORCE, and Tlink::rest. ◆ GetLinkMaxForce()The maximum range for compression, tension forces for this link.
Definition at line 1329 of file link.c. References Error(), Tlink::force, Tlink::forceModel, and NO_FORCE. ◆ ChangeLinkReferenceFrame()
In order to get the simplest possible set of solutions we can select a reference frame for the link different from that used to defined the bodies. This internal reference frame is defined from two (not necessarily orthogonal) vectors. Therefore, we store the sin and cos between the two vectors defining the internal reference frame and the rotation from the frame where bodies are defined and the internal reference frame. This function does not change the points defining the bodies. (they remain in the original frame), but it changes the way they are interpreted changing the workings of functions GenerateLinkRot and ApplyLinkRot. If the two given vectors are (almost) aligned, the internal reference frame is not changed. When using a CT_REPRESENTATION based on quaternions it is not possible to change the internal link reference frame.
Definition at line 1336 of file link.c. References Tlink::c, Error(), HTransformSetElement(), Tlink::iR, LINK_FullRot, Tlink::R, REP_JOINTS, REP_QLINKS, Tlink::s, and Tlink::type. Referenced by InitWorldKinCS(). ◆ LinkNBodies()
Gets the number of convex parts of the link.
Definition at line 1422 of file link.c. References Tlink::bodies, and VectorSize(). Referenced by AddLink2Mechanism(), AddLink2World(), CopyLink(), DeleteLink(), GetLinkConfTransform(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), IsConnectionCable(), IsConnectionLeg(), IsConnectionSpring(), LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), main(), MoveLinkFromTransform(), PlotLink(), PrintLink(), VisibleLink(), and WorldAtomJacobian(). ◆ LinkNAtoms()
Gets the number of atoms (i.e., spheres) in a link.
Definition at line 1427 of file link.c. References GetLinkBody(), GetPolyhedronType(), LinkNBodies(), SPHERE, and VisibleLink(). Referenced by MechanismStoreRigidAtoms(). ◆ GetLinkBody()
Gets one of the convex parts of the link.
Definition at line 1448 of file link.c. References Tlink::bodies, and GetVectorElement(). Referenced by CopyLink(), DeleteLink(), GetMechanismDefiningPoint(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), IsConnectionCable(), IsConnectionLeg(), IsConnectionSpring(), LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), main(), MoveLinkFromTransform(), PlotLink(), PrintLink(), PrintMechanism(), VisibleLink(), and WorldAtomJacobian(). ◆ GetLinkBodyStatus()
Gets the status of one of the convex parts of the link.
Definition at line 1459 of file link.c. References Tlink::bodies, GetPolyhedronStatus(), GetVectorElement(), and NO_UINT. Referenced by InitPQPCD(), InitSolidCD(), and InitVcollideCD(). ◆ GetLinkName()
Gets the name of a link.
Definition at line 1470 of file link.c. References Tlink::name. Referenced by AddLink2World(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateJointSolution(), GenerateWorldSingularityEquations(), GetJointName(), GetJointTransSeq(), GetLinkID(), GetMechanismLinkID(), GetWorldDOFLabel(), JointForceEquation(), main(), PrintCollisionInfoInt(), PrintCollisions(), PrintJoint(), PrintMechanism(), RegenerateJointBox(), RegenerateJointSolution(), StoreCollisionInfoInt(), WorldDOF2Sol(), and WorldFixTensegrityAddon(). ◆ GetLinkType()
Gets the type of a link.
Definition at line 1475 of file link.c. References Tlink::type. Referenced by AddLink2Mechanism(), AddLink2World(), FixLinks(), FixZToZero(), GenerateKinTree(), GetLinkConfExtension(), GetLinkConfTransform(), GetLinkTransformsFromDOF(), GetLinkTransformsFromSolution(), InitJoint(), main(), NoCheckConnectedCollisions(), PrintMechanism(), WorldAtomJacobian(), and WorldCoupleTensegrityVariable(). ◆ IsVariableLengthLink()Used to determine wheter a link has variable length (up to now only Deform_X links have variable length).
Definition at line 1480 of file link.c. References Tlink::varLength. Referenced by EmptyLinkConf(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), NewRevUpJoint(), NewSphSphUpJoint(), and WorldCoupleTensegrityVariable(). ◆ GetLinkForceModel()
Use to determine the force model of the link: NO_FORCE, VAR_FORCE, LINEAR_FORCE.
Definition at line 1485 of file link.c. References Tlink::forceModel. Referenced by GenerateForceEquilibriumEquations(), JointForceEquation(), and WorldCoupleTensegrityVariable(). ◆ GetLinkForceVars()
Get the identifiers of the force-related of the link, if any.
Definition at line 1490 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, LINK_Connect, LINK_NoRot, MAX_ROT_VARS, NO_FORCE, NO_UINT, Tlink::type, and VAR_FORCE. Referenced by GenerateForceEquilibriumEquations(), and WorldCoupleTensegrityVariable(). ◆ LinkPotentialEnergy()
Evaluates the potential energy stored in the link. It only works for tensegrity related links with variable length. For other links the output is 0. Thus, we capture the potential energy in the springs, cables, and prismatic legs of tensegrity structures. This energy is somehow compensated by struts (i.e., the compressive elements with constant length). but we do not model this part. We assume that the energy of the struts comes "for free" as a reaction of the energy in the active elements (mainly cables). If the energy of the struts need to be taken into account too, just model the struts as prismatic legs (with low motion raange and high stiffness). Prismatic legs have an associated force model that can be used to compute the associated energy. In structures with struts, this energy function might not be in equilibrium (i.e., null gradient) in the valid tensegrity configurations.
Definition at line 1534 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_UINT, Tlink::stiffness, and Tlink::varLength. Referenced by WorldPotentialEnergy(). ◆ LinkForceField()
Evaluates the gradient of the potential energy stored in the link. It only works for tensegrity related links. For other links the output is a null vector. IMPORTANT: see the notes in LinkPotentialEnergy
Definition at line 1560 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_UINT, Tlink::stiffness, and Tlink::varLength. Referenced by WorldForceField(). ◆ GetLinkTransSeq()
Build the sequence of transforms traversing the link. Only has effects for deformable links since in them the shape and thus the transform tot traverse them varies with the configuration. Note that here we accumulate homogeneous transform traversing the deformable link. This is NOT the the non-homogeneous transform used to model the link deformation.
Definition at line 1579 of file link.c. References AddVarTrans2TransSeq(), Error(), GetCSVariableID(), InitTransSeq(), LINK_LENGTH, Tlink::name, NEW, NO_UINT, TX, and Tlink::varLength. Referenced by GenerateMEquationFromBranch(). ◆ GetLinkTransform()
Builds the homogeneous transform traversing the link. This only works for deformable links since in them the shape and thus the transform tot traverse them varies with the configuration. This is like GetLinkTransSeq but here the transform is constant instead of symbolic.
Definition at line 1600 of file link.c. References HTransformIdentity(), HTransformTx(), and Tlink::varLength. Referenced by GetLinkTransformFromConf(), and GetLinkTransformsFromDOF(). ◆ GetLinkTransformFromConf()
The same as GetLinkTransform but here the degrees of freedom are taken from the information stored in a link deformation structure.
Definition at line 1608 of file link.c. References GetLinkTransform(), and TLinkConf::p. Referenced by GetMechanismDOFsFromTransforms(). ◆ GetLinkConfFromSolution()
Defines a link configuration from the a solution point. This sets the link configuration from the solution. For the reverse see GenerateSolutionFromLinkConf
Definition at line 1613 of file link.c. References Tlink::forceModel, GetRotVarID(), TLinkConf::l, LINEAR_FORCE, MAX_ROT_VARS, TLinkConf::ndp, NEW, NO_FORCE, NumLinkDOF(), TLinkConf::p, and Tlink::varLength. Referenced by GetTransform2Link(). ◆ GetLinkConfFromDOF()Defines a link configuration from an array of degrees of freedom. This sets the link configuration from the dof. For the reverse see GenerateDOFFromLinkConf.
Definition at line 1645 of file link.c. References Tlink::forceModel, TLinkConf::l, LINEAR_FORCE, TLinkConf::ndp, NEW, NO_FORCE, NumLinkDOF(), TLinkConf::p, and Tlink::varLength. Referenced by GetLinkTransformsFromDOF(). ◆ GenerateSolutionFromLinkConf()
Sets the solution entries corresponding to the link configuration. This sets the solution from the link configuration. For the reverse see GetLinkConfFromSolution.
Definition at line 1673 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), TLinkConf::l, LINEAR_FORCE, MAX_ROT_VARS, NO_FORCE, NumLinkDOF(), TLinkConf::p, and Tlink::varLength. Referenced by GenerateLinkSolution(). ◆ GenerateDOFFromLinkConf()Sets the dof entries corresponding to the link configuration. This sets the dof from the link configuration. For the reverse see GetLinkConfFromDOF.
Definition at line 1702 of file link.c. References Error(), TLinkConf::l, TLinkConf::ndp, and TLinkConf::p. Referenced by GetMechanismDOFsFromTransforms(). ◆ NumLinkDOF()
Definition at line 1711 of file link.c. References Tlink::forceModel, LINEAR_FORCE, VAR_FORCE, and Tlink::varLength. Referenced by GenerateSolutionFromLinkConf(), GetLinkConfFromDOF(), GetLinkConfFromSolution(), GetLinkDOFLabel(), GetLinkDOFRange(), GetMechanismDOFsFromTransforms(), and WorldInitDOFInfo(). ◆ GetLinkDOFRange()Returns a given link DOF range.
Definition at line 1721 of file link.c. References Error(), Tlink::force, Tlink::length, NumLinkDOF(), Tlink::rest, and Tlink::varLength. Referenced by GetWorldRangeDOF(). ◆ GetLinkDOFLabel()
Creates a string with a label for a configuration parameter. This is used to create interfaces.
Definition at line 1756 of file link.c. References Error(), NEW, NumLinkDOF(), and Tlink::varLength. Referenced by GetWorldDOFLabel(). ◆ IsLinkAllSpheres()Returns TRUE if all non-DECOR bodies in the link (i.e., bodies that are considered in the collision checking) are spheres. This function is used when generating the collision avoidance related equations. If all involved bodies are spheres we do not use separating planes but we directly bound the squared distance between the sphere centers to be larger than the squared sum of radii.
Definition at line 1791 of file link.c. References Tlink::allSpheres. Referenced by AddBody2Mechanism(), and AddLink2Mechanism(). ◆ SetPoseVars()
Sets to TRUE the translations/rotation variables for the given link in the given array of variables.
Definition at line 1796 of file link.c. References SetRotVars(), and SetTransVars(). ◆ SetForceVars()
Sets to TRUE the force variables for the given link in the given array of variables.
Definition at line 1802 of file link.c. References Tlink::forceModel, GetRotVarID(), MAX_ROT_VARS, NO_FORCE, and TRUE. Referenced by WorldForceVars(). ◆ SetForceRelatedVars()
Sets to TRUE the force and rest-length variables, i.e., the variables without a geometric impact. It is like SetForceVars but the rest-length variable is also set, if necesary.
Definition at line 1820 of file link.c. References Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_FORCE, and TRUE. Referenced by WorldSimpKinematicVars(). ◆ GetLinkPoseSimpVars()
Identifies variables that give the rotation of the links that survive in the simplified cuiksystem. Thes variables are identified in an array of booleans and their name is printed to a file (one name per row).
Definition at line 2114 of file link.c. References CT_REPRESENTATION, Error(), GetCSVariableName(), GetParameter(), GetRotVarID(), IsSystemVarInSimpCS(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, MAX_ROT_VARS, NO_UINT, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, TRUE, and Tlink::type. Referenced by GetWorldSimpVariableMask(). ◆ GenerateLinkRot()
Each link has a 3D reference frame formed by three vectors (in general orthonormal vectors unless ChangeLinkReferenceFrame is used). This functions add the variales representing the rotation of this reference frame with respect to the gobal reference frame. The translation from this global reference frame to the origin of the frame attached to the link is given by equations involving only rotation variables (and fixed vectors) and can only be computed at the level where we have together links (mechanisms) and cuiksystems, that is, at the world.h level. Note that the rotation representation depends on the CT_REPRESENTATION setting.
Definition at line 2173 of file link.c. References CT_REPRESENTATION, Error(), GenerateLinkConf(), GenerateLinkRotAxisX(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), GenerateLinkRotQLinks(), GetParameter(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by InitWorldKinCS(). ◆ FixLinkZToZero()
Fixes the Z compoment of the vector giving the pose of the link. This only works for links represented by a single vector (i.e., AxisX, DeforX, PrismaticX links) and when the representation is not REP_JOINTS)
Definition at line 2639 of file link.c. References AddEquation2CS(), AddMonomial(), AddVariable2Monomial(), CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), EQU, Error(), GetParameter(), GetRotVarID(), InitEquation(), InitMonomial(), IsGroundLink, LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_PrismaticX, MAX_ROT_VARS, NFUN, REP_JOINTS, SetEquationCmp(), SetEquationType(), SetEquationValue(), SYSTEM_EQ, and Tlink::type. Referenced by FixZToZero(). ◆ ApplyLinkRot()
Apply the changes of basis given by the link reference frame to a vector. This results in an expression that transforms the vector from the local reference frame to the global one. These expressions are added to the given equations (one expression for X, another for Y, and another for Z).
Definition at line 2678 of file link.c. References ApplyLinkRotAxisX(), ApplyLinkRotDeformX(), ApplyLinkRotFLinks(), ApplyLinkRotLinks(), ApplyLinkRotQLinks(), CT_REPRESENTATION, Error(), GetParameter(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, Norm(), REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, TRUE, Tlink::type, and ZERO. Referenced by ApplyLinkRotNoDeform(), ApplyLinkRotVar(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), and WorldFixTensegrityAddon(). ◆ ApplyLinkRotNoDeform()
Version of ApplyLinkRot for deformable links where the deformation is not considered. For non-deformable links this is the same as ApplyLinkRot. This can also be seen as a ApplyLinkRot for a deformable links with a particular deformation status (i.e., a default deformation) that is given in the 'sf' and 'sv' parameters.
Definition at line 2738 of file link.c. References ApplyLinkRot(), ApplyLinkRotAxisX(), and Tlink::varLength. Referenced by JointForceEquation(). ◆ ApplyLinkRotVar()
Apply the changes of basis given by the link reference frame to a vector of variables representing a point in local coordinates of the link.
Definition at line 3121 of file link.c. References ApplyLinkRot(), CT_REPRESENTATION, DeleteEquation(), Error(), GetParameter(), GetRotVarID(), InitEquation(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, MAX_ROT_VARS, NO_UINT, Tlink::R, REP_JOINTS, Tlink::type, VarAccumulateEquations(), VarScaleEquation(), and ZERO. ◆ RegenerateLinkSolution()
Solution points only include values for the system (and secondary) variables. However, in some formulations, the frame of reference for each link is represented using not only system variables, but dummy or force variables too. This function computes the values for the link-related non-basic variables form the basic ones for a given link.
Definition at line 3228 of file link.c. References CT_REPRESENTATION, Error(), GetParameter(), LINK_FullRot, RegenerateLinkSolutionConf(), RegenerateLinkSolutionLinks(), RegenerateLinkSolutionQLinks(), REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by RegenerateMechanismSolution(). ◆ RegenerateLinkBox()
This is the same as RegenerateLinkSolution but working on solution boxes instead of on solution points (i.e. it is interval-based instead of floating point based).
Definition at line 3310 of file link.c. References CT_REPRESENTATION, Error(), GetParameter(), LINK_FullRot, RegenerateLinkBoxConf(), RegenerateLinkBoxLinks(), RegenerateLinkBoxQLinks(), REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by RegenerateMechanismBox(). ◆ GetTransform2Link()
Returns the homogeneous transform with the position and orientation of the link for a given solution point.
Definition at line 3415 of file link.c. References CT_REPRESENTATION, Error(), GetLinkConfFromSolution(), GetParameter(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransform2LinkQLinks(), HTransformTxyz(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by GetLinkTransformsFromSolution(), and PrintJointAxes(). ◆ GetTransform2ConnectionLink()
Computes the transform to a connectin link given the transforms to the normal links.
Definition at line 3461 of file link.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, CrossProduct(), DefineNormalVector(), DifferenceVector(), Error(), HTransformApply(), HTransformIdentity(), HTransformSetElement(), TLinkConf::l, Tlink::l1, Tlink::l2, LINK_Connect, TLinkConf::ndp, Norm(), Normalize(), TLinkConf::p, Tlink::p1, Tlink::p2, and Tlink::type. Referenced by GetLinkTransformsFromDOF(), and GetLinkTransformsFromSolution(). ◆ GetConnectionLinkWrench()
Computes the wrench exerced by a spring on the connected links. For connection links that are not springs, the output wrenches are zero.
Definition at line 3497 of file link.c. References CrossProduct(), DifferenceVector(), Error(), HTransformApply(), IntervalCenter(), IsConnectionSpring(), Tlink::l1, Tlink::l2, LINK_Connect, Norm(), Tlink::p1, Tlink::p2, Tlink::rest, ScaleVector(), Tlink::stiffness, and Tlink::type. Referenced by ApplyExternalForces(). ◆ GetConnectionLinkPotentialEnergy()
This is a generalization of LinkPotentialEnergy which works in general (not only for tensegrity structures). It is used when computing the potential (mechanical) energy of a dynamical system.
Definition at line 3548 of file link.c. References DifferenceVector(), HTransformApply(), IntervalCenter(), IsConnectionSpring(), Tlink::l1, Tlink::l2, LINK_Connect, Norm(), Tlink::p1, Tlink::p2, Tlink::rest, Tlink::stiffness, and Tlink::type. Referenced by MechEnergy(). ◆ GenerateLinkSolution()
Generate the solution variables form an homogenous transform giving the pose of the link and the internal link configuration.
Definition at line 3743 of file link.c. References CT_REPRESENTATION, Error(), GenerateLinkSolutionAxisX(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateLinkSolutionQLinks(), GenerateSolutionFromLinkConf(), GetParameter(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by WorldDOF2Sol(). ◆ IsConnectionCable()Identifies connection cables.
Definition at line 3883 of file link.c. References CYLINDER, GetLinkBody(), GetPolyhedronType(), LINK_Connect, LinkNBodies(), and Tlink::type. Referenced by PrintLink(). ◆ IsConnectionSpring()Identifies connection springs.
Definition at line 3890 of file link.c. References GetLinkBody(), GetPolyhedronType(), LINK_Connect, LinkNBodies(), SEGMENTS, and Tlink::type. Referenced by ApplyExternalForces(), GetConnectionLinkPotentialEnergy(), GetConnectionLinkWrench(), GetLinkRest(), GetLinkStiffness(), InitHandC(), MechEnergy(), and PrintLink(). ◆ IsConnectionLeg()Identifies connection legs.
Definition at line 3897 of file link.c. References CYLINDER, GetLinkBody(), GetPolyhedronType(), LINK_Connect, LinkNBodies(), SPHERE, and Tlink::type. Referenced by PrintLink(). ◆ GetConnectLinkFrom()
Returns the first link connected by a connection link.
Definition at line 3906 of file link.c. References Error(), Tlink::l1, LINK_Connect, and Tlink::type. Referenced by ApplyExternalForces(), and PrintMechanism(). ◆ GetConnectLinkTo()
Returns the second link connected by a connection link.
Definition at line 3914 of file link.c. References Error(), Tlink::l2, LINK_Connect, and Tlink::type. Referenced by ApplyExternalForces(), and PrintMechanism(). ◆ GetConnectLinkPointFrom()
Returns the point on the first link connected by a connection link.
Definition at line 3922 of file link.c. References Error(), LINK_Connect, Tlink::p1, and Tlink::type. ◆ GetConnectLinkPointTo()
Returns the point on the second link connected by a connection link.
Definition at line 3933 of file link.c. References Error(), LINK_Connect, Tlink::p2, and Tlink::type. ◆ VisibleLink()Checks if a links has some visible parts, i.e., if not all the parts of the link are HIDDEN.
Definition at line 3944 of file link.c. References FALSE, GetLinkBody(), GetPolyhedronStatus(), HIDDEN_SHAPE, LINK_NoRot, LinkNBodies(), and Tlink::type. Referenced by LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), MoveLinkFromTransform(), and PlotLink(). ◆ GetLinkMaxCoordinate()
Returns the sum of the maximum coordinate value (either for X,Y or Z) for all the convex polyhedrons in the link. This is used in higher levels to define an over-estimate bounding-box of the world. This bounding box is used to define the ranges for some of the coordinate and separating planes variables.
Definition at line 3963 of file link.c. References Tlink::maxCoord. Referenced by AddBody2Mechanism(), and AddLink2Mechanism(). ◆ LinkPrintAtoms()
Stores the centers of the atoms in a given link in global coordinates. This is used only whent the world represents a molecule and we want to store the atom (i.e., the sphere) positions into a file.
Definition at line 3968 of file link.c. References GetLinkBody(), LinkNBodies(), PolyhedronPrintCenter(), and VisibleLink(). Referenced by MechanismPrintAtoms(). ◆ LinkStoreAtoms()
Stores the centers of the atoms and their radius in a given link in global coordinates. This is an auxiliary function of MechanismStoreRigidAtoms.
Definition at line 3985 of file link.c. References GetLinkBody(), LinkNBodies(), PolyhedronPrintCenterAndRadius(), and VisibleLink(). Referenced by MechanismStoreRigidAtoms(). ◆ PlotLink()Adds a link to a 3d scene. It adds the diffent parts of the link as if they are expressed in the global frame. To displace the use MoveLinkFromTransform
Definition at line 4002 of file link.c. References Tlink::axisID, Close3dObject(), DeleteColor(), GetLinkBody(), LINK_AxisX, LINK_Connect, LINK_DeformX, LINK_PrismaticX, LinkNBodies(), NewColor(), NO_UINT, PlotPolyhedron(), PlotVect3d(), StartNew3dObject(), Tlink::type, and VisibleLink(). Referenced by PlotMechanism(). ◆ MoveLinkFromTransform()
Displaces a link previously added to a 3d scene from the transform giving the pose of the link. This function triggers an error (actually the error is triggered in GetTransform2Link) if applied to the groundlink. Note that the groundLink is not suposed to move.
Definition at line 4038 of file link.c. References Tlink::axisID, EmptyLinkConf(), GetLinkBody(), GetLinkConfTransform(), HTransformDelete(), HTransformProduct(), LinkNBodies(), Move3dObject(), MovePolyhedron(), NO_UINT, and VisibleLink(). Referenced by MoveMechanismFromTransforms(). ◆ PrintLink()
Stores the link information into a file in the format valid to be read by InitWorldFromFile.
Definition at line 4075 of file link.c. References DECOR_SHAPE, Error(), FALSE, GetBlue(), GetGreen(), GetLinkBody(), GetPolyhedronGranularity(), GetPolyhedronRadius(), GetPolyhedronStatus(), GetRed(), HIDDEN_SHAPE, HTransformIsIdentity(), HTransformPrettyPrint(), Tlink::iFrame, Tlink::iMatrix, IntervalCenter(), IsConnectionCable(), IsConnectionLeg(), IsConnectionSpring(), LINK_Connect, LINK_FullRot, LinkNBodies(), Tlink::mass, Tlink::name, NEW, NORMAL_SHAPE, Tlink::p1, Tlink::p2, PrintPolyhedron(), Tlink::rest, SetPolyhedronColor(), Tlink::stiffness, TrivialInertiaMatrix(), TRUE, and Tlink::type. Referenced by PrintMechanism(). ◆ DeleteLink()
Deletes the information stored in a link and frees the allocated memory.
Definition at line 4239 of file link.c. References Tlink::bodies, Tlink::csvID, DeleteInterval(), DeletePolyhedron(), DeleteVector(), FALSE, Tlink::force, Tlink::forceModel, GetLinkBody(), HTransformDelete(), Tlink::iMatrix, Tlink::iR, Tlink::length, LinkNBodies(), Tlink::name, NO_FORCE, Tlink::nvID, Tlink::R, Tlink::rest, Tlink::stiffness, Tlink::varLength, and Tlink::vID. Referenced by AddLeg2World(), DeleteMechanism(), InitWorldFromMolecule(), and main(). |
Follow us!