Detailed Description
Macro Definition Documentation
Maximum number of variables used to represent a link rotation. Used to allocate space for the GetRotVarID functions. Definition at line 25 of file link.c. 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(). Function Documentation
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 731 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().
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 1635 of file link.c. References Tlink::csvID, Error(), GetRotVarIDAxisX(), GetRotVarIDFLinks(), GetRotVarIDLinks(), GetRotVarIDQLinks(), LINK_AxisX, 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().
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 1708 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().
Version of GetRotVarID for REP_FLINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 1752 of file link.c. References Tlink::csvID, GetCSVariableID(), LINK_ROT, Tlink::name, NEW, Tlink::nvID, and Tlink::vID. Referenced by GetRotVarID().
Version of GetRotVarID for REP_LINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 1777 of file link.c. References Tlink::csvID, GetCSVariableID(), LINK_ROT2, Tlink::name, NEW, Tlink::nvID, and Tlink::vID. Referenced by GetRotVarID().
Version of GetRotVarID for REP_QLINKS representations. Don't use this function directly. Instead call always GetRotVarID.
Definition at line 1801 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().
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 1981 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().
Version of GenerateLinkRot for links where only the X axis is represented.
Definition at line 2073 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().
Version of GenerateLinkRot for partial matrix representation.
Definition at line 2223 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().
Version of GenerateLinkRot for full matrix representation.
Definition at line 2109 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().
Version of GenerateLinkRot for quaternion representation.
Definition at line 2303 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().
Version of ApplyLinkRot for links for which only the axis X is relevant.
Definition at line 2508 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().
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 2562 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().
Version of ApplyLinkRot for partial matrix representation.
Definition at line 2686 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().
Version of ApplyLinkRot for full matrix representation.
Definition at line 2620 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().
Version of ApplyLinkRot for quaternion representation.
Definition at line 2755 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().
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 3018 of file link.c. Referenced by RegenerateLinkSolution().
Version of RegenerateLinkSolution for partial matrix representation.
Definition at line 3023 of file link.c. References GetRotVarID(), MAX_ROT_VARS, and Tlink::s. Referenced by GenerateLinkSolutionLinks(), and RegenerateLinkSolution().
Version of RegenerateLinkSolution for quaternion representation.
Definition at line 3042 of file link.c. References GetRotVarID(), and MAX_ROT_VARS. Referenced by GenerateLinkSolutionQLinks(), and RegenerateLinkSolution().
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 3102 of file link.c. Referenced by RegenerateLinkBox().
Version of RegenerateLinkBox for partial matrix representation.
Definition at line 3107 of file link.c. References GetBoxIntervals(), GetRotVarID(), IntervalProduct(), IntervalScale(), MAX_ROT_VARS, Tlink::s, and SetBoxInterval(). Referenced by RegenerateLinkBox().
Version of RegenerateLinkBox for quaternion representation.
Definition at line 3145 of file link.c. References CopyInterval(), GetBoxInterval(), GetRotVarID(), IntervalProduct(), MAX_ROT_VARS, and SetBoxInterval(). Referenced by RegenerateLinkBox().
Version of GetTransform2Link for links where only the X axis is relevant. Also used for LINK_DeformX links.
Definition at line 3215 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().
Version of GetTransform2Link for full partial representation.
Definition at line 3290 of file link.c. References AXIS_H, GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformProduct(), HTransformSetElement(), MAX_ROT_VARS, and Tlink::R. Referenced by GetTransform2Link().
Version of GetTransform2Link for full matrix representation.
Definition at line 3251 of file link.c. References AXIS_H, GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformProduct(), HTransformSetElement(), MAX_ROT_VARS, and Tlink::R. Referenced by GetTransform2Link().
Version of GetTransform2Link for quaternion representation.
Definition at line 3334 of file link.c. References GetRotVarID(), HTransformIdentity(), HTransformOrthonormalize(), HTransformSetElement(), and MAX_ROT_VARS. Referenced by GetTransform2Link().
Version of GenerateLinkSolution for links where only the axis X is relevant. Also used for LINK_DeformX links.
Definition at line 3423 of file link.c. References GetRotVarID(), HTransformGetElement(), and MAX_ROT_VARS. Referenced by GenerateLinkSolution().
Version of GenerateLinkSolution for partial matrix representation.
Definition at line 3465 of file link.c. References GetRotVarID(), HTransformDelete(), HTransformGetElement(), HTransformProduct(), Tlink::iR, MAX_ROT_VARS, and RegenerateLinkSolutionLinks(). Referenced by GenerateLinkSolution().
Version of GenerateLinkSolution for full matrix representation.
Definition at line 3438 of file link.c. References GetRotVarID(), HTransformDelete(), HTransformGetElement(), HTransformProduct(), Tlink::iR, and MAX_ROT_VARS. Referenced by GenerateLinkSolution().
Version of GenerateLinkSolution for quaternion representation.
Definition at line 3494 of file link.c. References GetRotVarID(), HTransformGetElement(), MAX_ROT_VARS, and RegenerateLinkSolutionQLinks(). Referenced by GenerateLinkSolution().
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 sequende of links.
Definition at line 1619 of file link.c. References GetCSVariableID(), LINK_TRANS, Tlink::name, NEW, NO_UINT, and TRUE. Referenced by SetPoseVars().
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 1834 of file link.c. References Error(), GetRotVarID(), LINK_AxisX, 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(). 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 638 of file link.c. References IsVariableLengthLink(), and TLinkConf::l. Referenced by CheckCollisionSolid(), GetLinkConfTransform(), and MoveLinkFromTransform().
Defines a transformation that traverses the link, taking into account the possible link deformation..
Definition at line 643 of file link.c. References EmptyLinkConf(), GetLinkType(), HTransformIdentity(), HTransformScaleX(), HTransformTx(), TLinkConf::l, LINK_DeformX, LinkNBodies(), and TLinkConf::p. Referenced by CheckCollisionSolid(), and MoveLinkFromTransform().
Release memory.
Definition at line 662 of file link.c. References TLinkConf::p. Referenced by DeleteLinkTransforms().
Initializes a link structure with no bodies.
Definition at line 671 of file link.c. References Tlink::allSpheres, Tlink::axisID, Tlink::bodies, Tlink::c, CopyVoidPtr(), Tlink::csvID, DeleteVoidPtr(), Tlink::extForce, FALSE, Tlink::fixedDim, Tlink::force, Tlink::forceEquilibrium, Tlink::forceModel, HTransformIdentity(), INF, INIT_NUM_SHAPES, InitVector(), Tlink::iR, Tlink::length, LINK_FullRot, Tlink::maxCoord, Tlink::name, NEW, NewInterval(), NO_FORCE, NO_UINT, Tlink::nvID, Tlink::R, Tlink::rest, Tlink::s, Tlink::stiffness, TRUE, Tlink::type, Tlink::varLength, and Tlink::vID. Referenced by InitAxisXLink(), InitDeformXLink(), InitNoRotLink(), InitPrismaticXLink(), InitWorldFromMolecule(), and main().
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 722 of file link.c. References Tlink::forceEquilibrium, InitLink(), LINK_NoRot, TRUE, and Tlink::type.
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 isntance, when defining composite links (e.g. spherical-spherical) where the internal rotation of the link is not relevant.
Definition at line 794 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().
Initializes an axis X link that can elongate along the X axis (i.e., a deformable Axis X link).
Definition at line 835 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().
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 893 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(). Initializes a link copying the information from another link.
Definition at line 964 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(), INIT_NUM_SHAPES, InitVector(), Tlink::iR, Tlink::length, LinkNBodies(), Tlink::maxCoord, Tlink::name, NEW, Tlink::nvID, Tlink::R, Tlink::rest, Tlink::s, Tlink::stiffness, TRUE, Tlink::type, Tlink::varLength, and Tlink::vID. Referenced by AddLink2Mechanism().
Adds a body to the link.
Definition at line 1027 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(), InitWorldFromMolecule(), and main().
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 1050 of file link.c. References Tlink::extForce.
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 1057 of file link.c. References Error(), and Tlink::extForce. Referenced by GenerateForceEquilibriumEquations().
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 1064 of file link.c. References FALSE, and Tlink::forceEquilibrium. 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 1070 of file link.c. References Tlink::forceEquilibrium. Referenced by GenerateForceEquilibriumEquations().
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 1075 of file link.c. References Error(), and Tlink::fixedDim.
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 1082 of file link.c. References Error(), and Tlink::fixedDim. Referenced by FixLinks(). The length of the link. Only defined for Axis X links.
Definition at line 1089 of file link.c. References Tlink::length. Referenced by PrintMechanism().
Stiffness of the link. Only defined for some Axis X and Deform X links.
Definition at line 1094 of file link.c. References Error(), Tlink::forceModel, LINEAR_FORCE, and Tlink::stiffness. 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 1101 of file link.c. References Error(), Tlink::forceModel, LINEAR_FORCE, and Tlink::rest. The maximum range for compression, tension forces for this link.
Definition at line 1108 of file link.c. References Error(), Tlink::force, Tlink::forceModel, and NO_FORCE.
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 1115 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().
Gets the number of convex parts of the link.
Definition at line 1201 of file link.c. References Tlink::bodies, and VectorSize(). Referenced by AddLink2Mechanism(), AddLink2World(), CopyLink(), DeleteLink(), GetLinkConfTransform(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), MoveLinkFromTransform(), PlotLink(), PrintLink(), VisibleLink(), and WorldAtomJacobian().
Gets the number of atoms (i.e., spheres) in a link.
Definition at line 1206 of file link.c. References GetLinkBody(), GetPolyhedronType(), LinkNBodies(), SPHERE, and VisibleLink(). Referenced by MechanismStoreRigidAtoms().
Gets one of the convex parts of the link.
Definition at line 1227 of file link.c. References Tlink::bodies, and GetVectorElement(). Referenced by CopyLink(), DeleteLink(), GetMechanismDefiningPoint(), InitPQPCD(), InitSolidCD(), InitVcollideCD(), LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), MoveLinkFromTransform(), PlotLink(), PrintLink(), PrintMechanism(), VisibleLink(), and WorldAtomJacobian().
Gets the status of one of the convex parts of the link.
Definition at line 1238 of file link.c. References Tlink::bodies, GetPolyhedronStatus(), GetVectorElement(), and NO_UINT. Referenced by InitPQPCD(), InitSolidCD(), and InitVcollideCD().
Gets the name of a link.
Definition at line 1249 of file link.c. References Tlink::name. Referenced by AddLink2World(), GenerateEquationsFromBranch(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateJointSolution(), GenerateWorldSingularityEquations(), GetJointName(), GetJointTransSeq(), GetLinkID(), GetMechanismLinkID(), GetWorldDOFLabel(), JointForceEquation(), PrintCollisionInfoInt(), PrintCollisions(), PrintJoint(), PrintMechanism(), RegenerateJointBox(), RegenerateJointSolution(), StoreCollisionInfoInt(), WorldDOF2Sol(), and WorldFixTensegrityAddon().
Gets the type of a link.
Definition at line 1254 of file link.c. References Tlink::type. Referenced by AddLink2Mechanism(), GetLinkConfTransform(), NoCheckConnectedCollisions(), and PrintMechanism(). Used to determine wheter a link has variable length (up to now only Deform_X links have variable length).
Definition at line 1259 of file link.c. References Tlink::varLength. Referenced by EmptyLinkConf(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), NewRevUpJoint(), NewSphSphUpJoint(), and WorldCoupleTensegrityVariable().
Use to determine the force model of the link: NO_FORCE, VAR_FORCE, LINEAR_FORCE.
Definition at line 1264 of file link.c. References Tlink::forceModel. Referenced by GenerateForceEquilibriumEquations(), JointForceEquation(), and WorldCoupleTensegrityVariable().
Get the identifiers of the force-related of the link, if any.
Definition at line 1269 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_FORCE, NO_UINT, and VAR_FORCE. Referenced by GenerateForceEquilibriumEquations(), and WorldCoupleTensegrityVariable().
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 1310 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_UINT, Tlink::stiffness, and Tlink::varLength. Referenced by WorldPotentialEnergy().
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 1336 of file link.c. References Error(), Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_UINT, Tlink::stiffness, and Tlink::varLength. Referenced by WorldForceField().
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 1355 of file link.c. References AddVarTrans2TransSeq(), Error(), GetCSVariableID(), InitTransSeq(), LINK_LENGTH, Tlink::name, NEW, NO_UINT, TX, and Tlink::varLength. Referenced by GenerateMEquationFromBranch().
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 1376 of file link.c. References HTransformIdentity(), HTransformTx(), and Tlink::varLength. Referenced by GetLinkTransformFromConf(), and GetLinkTransformsFromDOF().
The same as GetLinkTransform but here the degrees of freedom are taken from the information stored in a link deformation structure.
Definition at line 1384 of file link.c. References GetLinkTransform(), and TLinkConf::p. Referenced by GetMechanismDOFsFromTransforms().
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 1389 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(). 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 1421 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().
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 1449 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(). 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 1478 of file link.c. References Error(), TLinkConf::l, TLinkConf::ndp, and TLinkConf::p. Referenced by GetMechanismDOFsFromTransforms().
Definition at line 1487 of file link.c. References Tlink::forceModel, LINEAR_FORCE, VAR_FORCE, and Tlink::varLength. Referenced by GenerateSolutionFromLinkConf(), GetLinkConfFromDOF(), GetLinkConfFromSolution(), GetLinkDOFLabel(), GetLinkDOFRange(), GetMechanismDOFsFromTransforms(), and WorldInitDOFInfo(). Returns a given link DOF range.
Definition at line 1497 of file link.c. References Error(), Tlink::force, Tlink::length, NumLinkDOF(), Tlink::rest, and Tlink::varLength. Referenced by GetWorldRangeDOF().
Creates a string with a label for a configuration parameter. This is used to create interfaces.
Definition at line 1532 of file link.c. References Error(), NEW, NumLinkDOF(), and Tlink::varLength. Referenced by GetWorldDOFLabel(). 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 1567 of file link.c. References Tlink::allSpheres. Referenced by AddBody2Mechanism(), and AddLink2Mechanism().
Sets to TRUE the translations/rotation variables for the given link in the given array of variables.
Definition at line 1572 of file link.c. References SetRotVars(), and SetTransVars().
Sets to TRUE the force variables for the given link in the given array of variables. Note that only the force variable is set. Not all the force related variables (like rest length, for instance).
Definition at line 1578 of file link.c. References Tlink::forceModel, GetRotVarID(), MAX_ROT_VARS, NO_FORCE, and TRUE. Referenced by WorldForceVars().
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 1596 of file link.c. References Tlink::forceModel, GetRotVarID(), LINEAR_FORCE, MAX_ROT_VARS, NO_FORCE, and TRUE. Referenced by WorldSimpKinematicVars().
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 1883 of file link.c. References CT_REPRESENTATION, Error(), GetCSVariableName(), GetParameter(), GetRotVarID(), IsSystemVarInSimpCS(), LINK_AxisX, 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().
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 1941 of file link.c. References CT_REPRESENTATION, Error(), GenerateLinkConf(), GenerateLinkRotAxisX(), GenerateLinkRotFLinks(), GenerateLinkRotLinks(), GenerateLinkRotQLinks(), GetParameter(), LINK_AxisX, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by InitWorldKinCS().
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 2405 of file link.c. References AddEquation2CS(), AddMonomial(), AddVariable2Monomial(), CT_REPRESENTATION, DeleteEquation(), DeleteMonomial(), EQU, Error(), GetParameter(), GetRotVarID(), InitEquation(), InitMonomial(), IsGroundLink, LINK_AxisX, LINK_DeformX, LINK_PrismaticX, MAX_ROT_VARS, NFUN, REP_JOINTS, SetEquationCmp(), SetEquationType(), SetEquationValue(), SYSTEM_EQ, and Tlink::type. Referenced by FixZToZero().
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 2441 of file link.c. References ApplyLinkRotAxisX(), ApplyLinkRotDeformX(), ApplyLinkRotFLinks(), ApplyLinkRotLinks(), ApplyLinkRotQLinks(), CT_REPRESENTATION, Error(), GetParameter(), LINK_AxisX, 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().
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 2498 of file link.c. References ApplyLinkRot(), ApplyLinkRotAxisX(), and Tlink::varLength. Referenced by JointForceEquation().
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 2881 of file link.c. References ApplyLinkRot(), CT_REPRESENTATION, DeleteEquation(), Error(), GetParameter(), GetRotVarID(), InitEquation(), LINK_AxisX, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, MAX_ROT_VARS, NO_UINT, Tlink::R, REP_JOINTS, Tlink::type, VarAccumulateEquations(), VarScaleEquation(), and ZERO.
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 2985 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().
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 3067 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().
Returns the homogeneous transform with the position and orientation of the link for a given solution point.
Definition at line 3172 of file link.c. References CT_REPRESENTATION, Error(), GetLinkConfFromSolution(), GetParameter(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransform2LinkQLinks(), HTransformTxyz(), LINK_AxisX, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by GetLinkTransformsFromSolution(), and PrintJointAxes().
Generate the solution variables form an homogenous transform giving the pose of the link and the internal link configuration.
Definition at line 3382 of file link.c. References CT_REPRESENTATION, Error(), GenerateLinkSolutionAxisX(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateLinkSolutionQLinks(), GenerateSolutionFromLinkConf(), GetParameter(), LINK_AxisX, LINK_DeformX, LINK_FullRot, LINK_NoRot, LINK_PrismaticX, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, and Tlink::type. Referenced by WorldDOF2Sol(). Checks if a links has some visible parts, i.e., if not all the parts of the link are HIDDEN.
Definition at line 3521 of file link.c. References FALSE, GetLinkBody(), GetPolyhedronStatus(), HIDDEN_SHAPE, LINK_NoRot, LinkNBodies(), and Tlink::type. Referenced by LinkNAtoms(), LinkPrintAtoms(), LinkStoreAtoms(), MoveLinkFromTransform(), and PlotLink().
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 3540 of file link.c. References Tlink::maxCoord. Referenced by AddBody2Mechanism(), and AddLink2Mechanism().
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 3545 of file link.c. References GetLinkBody(), LinkNBodies(), PolyhedronPrintCenter(), and VisibleLink(). Referenced by MechanismPrintAtoms().
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 3562 of file link.c. References GetLinkBody(), LinkNBodies(), PolyhedronPrintCenterAndRadius(), and VisibleLink(). Referenced by MechanismStoreRigidAtoms(). 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 3579 of file link.c. References Tlink::axisID, Close3dObject(), DeleteColor(), GetLinkBody(), LINK_AxisX, LINK_DeformX, LINK_PrismaticX, LinkNBodies(), NewColor(), NO_UINT, PlotPolyhedron(), PlotVect3d(), StartNew3dObject(), Tlink::type, and VisibleLink(). Referenced by PlotMechanism().
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 3615 of file link.c. References Tlink::axisID, EmptyLinkConf(), GetLinkBody(), GetLinkConfTransform(), HTransformDelete(), HTransformProduct(), LinkNBodies(), Move3dObject(), MovePolyhedron(), NO_UINT, and VisibleLink(). Referenced by MoveMechanismFromTransforms().
Stores the link information into a file in the format valid to be read by InitWorldFromFile.
Definition at line 3652 of file link.c. References GetLinkBody(), LINK_FullRot, LinkNBodies(), Tlink::name, NEW, PrintPolyhedron(), and Tlink::type. Referenced by PrintMechanism().
Deletes the information stored in a link and frees the allocated memory.
Definition at line 3694 of file link.c. References Tlink::bodies, Tlink::csvID, DeleteInterval(), DeletePolyhedron(), DeleteVector(), FALSE, Tlink::force, Tlink::forceModel, GetLinkBody(), HTransformDelete(), 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!