public abstract class JointBase extends BodyConnector
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SHAFT_LENGTH |
static double |
DEFAULT_SHAFT_RADIUS |
static PropertyList |
myProps |
debug, useOldDerivativeMethod
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
JointBase() |
Modifier and Type | Method and Description |
---|---|
void |
coordinatesToTCD(RigidTransform3d TCD,
VectorNd coords)
Computes the TCD transform for a set of coordinates, if coordinates are
supported.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
double |
getCoordinate(int idx)
Returns the
idx -th coordinate for this joint. |
DoubleInterval |
getCoordinateRange(int idx)
Queries the range for the
idx -th coordinate. |
DoubleInterval |
getCoordinateRangeDeg(int idx)
Queries the range for the
idx -th coordinate in degrees. |
void |
getCoordinates(VectorNd coords)
Returns the current coordinates, if any, for this joint.
|
double |
getMaxCoordinate(int idx)
Queries the maximum range value for the
idx -th coordinate. |
double |
getMaxCoordinateDeg(int idx)
Queries the maximum range value for the
idx -th coordinate in
degrees. |
double |
getMinCoordinate(int idx)
Queries the minimum range value for the
idx -th coordinate. |
double |
getMinCoordinateDeg(int idx)
Queries the minimum range value for the
idx -th coordinate in
degrees. |
void |
getPosition(Point3d pos) |
double |
getShaftLength()
Returns a length used for rendering shafts or axes associated with this
joint.
|
double |
getShaftRadius()
Returns a radius used for rendering shafts or axes associated this
joint.
|
void |
getStoredCoordinates(VectorNd coords)
Returns the coordinate values currently stored for this joint.
|
void |
getStoredTCD(RigidTransform3d TCD)
Returns the value of the TCD transform based on the coordinate values
currently stored for this joint.
|
int |
numCoordinates()
Returns the number of coordinates, if any, associated with this joint.
|
void |
setCoordinate(int idx,
double value)
Sets the
idx -th coordinate for this joint. |
void |
setCoordinateRange(int idx,
DoubleInterval range)
Sets the range for the
idx -th coordinate. |
void |
setCoordinateRangeDeg(int idx,
DoubleInterval range)
Sets the range for the
idx -th coordinate in degrees. |
void |
setCoordinates(VectorNd coords)
Sets the current coordinates, if any, for this joint.
|
void |
setDefaultValues()
Sets the attributes of this component to their default values.
|
void |
setShaftLength(double l)
Sets a length used for rendering shafts or axes associated with this
joint.
|
void |
setShaftRadius(double r)
Sets a radius used for rendering shafts or axes associated with this
joint.
|
addBilateralConstraints, addFrictionConstraints, addMasterBlocks, addTransformableDependencies, addUnilateralConstraints, advanceState, computeConstraintMatrixA, computeConstraintMatrixB, connectToHierarchy, copy, createRenderProps, disconnectFromHierarchy, findAttachedBodies, getActivation, getAxisLength, getBilateralForceInA, getBilateralForceInA, getBilateralForceInB, getBilateralForceInB, getBilateralForceInC, getBilateralForceInC, getBilateralForces, getBilateralInfo, getBilateralSizes, getBodyA, getBodyB, getCompliance, getConstrainedComponents, getConstraint, getConstraintFlags, getConstraintForce, getCopyReferences, getCoupling, getCurrentTCD, getCurrentTCW, getCurrentTCW, getCurrentTDW, getCurrentTDW, getDamping, getDrawFrameC, getDrawFrameD, getFrameAttachmentA, getFrameAttachmentB, getFrictionForces, getFrictionState, getHardReferences, getLinearCompliance, getPenetrationTol, getPenetrationTolMode, getPose, getRenderFrame, getRotaryCompliance, getRotaryLimitTol, getRotaryLimitTolMode, getState, getStateVersion, getUnilateralForceInA, getUnilateralForceInA, getUnilateralForceInB, getUnilateralForceInB, getUnilateralForceInC, getUnilateralForceInC, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, getUnilateralState, hasState, isActive, isConnectedToBodies, isDuplicatable, isEnabled, isNotAttached, maxFrictionConstraintSets, numBilateralConstraints, numConstraints, numEngagedUnilateralConstraints, numUnilateralConstraints, prerender, printConnectedBodies, printConstraintInfo, render, scaleDistance, scaleMass, setAlwaysAdjustBodyA, setAxisLength, setBilateralForces, setBodies, setBodies, setBodies, setBodies, setCompliance, setCurrentTCW, setCurrentTDW, setDamping, setDrawFrameC, setDrawFrameD, setEnabled, setFrictionForces, setFrictionState, setLinearCompliance, setPenetrationTol, setPenetrationTolMode, setRotaryCompliance, setRotaryLimitTol, setRotaryLimitTolMode, setState, setUnilateralForces, setUnilateralState, transformGeometry, transformGeometry, updateAttachments, updateBounds, updateConstraints, zeroForces
getRenderHints, getRenderProps, getSelection, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
public static final double DEFAULT_SHAFT_LENGTH
public static final double DEFAULT_SHAFT_RADIUS
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class BodyConnector
public void setDefaultValues()
ModelComponentBase
setDefaultValues
in class BodyConnector
public double getShaftLength()
setShaftLength(double)
for details.public void setShaftLength(double l)
axisLength
property.l
- shaft rendering lengthpublic double getShaftRadius()
getShaftRadius()
for details.public void setShaftRadius(double r)
getShaftLength()
.r
- shaft rendering radiuspublic DoubleInterval getCoordinateRange(int idx)
idx
-th coordinate.idx
- coordinate indexpublic double getMinCoordinate(int idx)
idx
-th coordinate.idx
- coordinate indexpublic double getMaxCoordinate(int idx)
idx
-th coordinate.idx
- coordinate indexpublic void setCoordinateRange(int idx, DoubleInterval range)
idx
-th coordinate. Specifying range
as null
will set the range to (-inf, inf)
.idx
- coordinate indexrange
- new range valuepublic DoubleInterval getCoordinateRangeDeg(int idx)
idx
-th coordinate in degrees.idx
- coordinate indexpublic double getMinCoordinateDeg(int idx)
idx
-th coordinate in
degrees.idx
- coordinate indexpublic double getMaxCoordinateDeg(int idx)
idx
-th coordinate in
degrees.idx
- coordinate indexpublic void setCoordinateRangeDeg(int idx, DoubleInterval range)
idx
-th coordinate in degrees. Specifying
range
as null
will set the range to (-inf, inf)
.idx
- coordinate indexrange
- new range value in degreespublic int numCoordinates()
public double getCoordinate(int idx)
idx
-th coordinate for this joint. If the joint is
connected to other bodies, the value is inferred from the current TCD
transform. Otherwise, it is obtained from a stored internal value.idx
- index of the coordinatepublic void getCoordinates(VectorNd coords)
coords
, whose size is set to the value returned by
numCoordinates()
. If the joint is connected to other bodies, the
coordinates are inferred from the current TCD transform. Otherwise, they
are obtained from stored internal values.coords
- returns the coordinate valuespublic void getStoredCoordinates(VectorNd coords)
coords
, whose size is set to
the value returned by numCoordinates()
.coords
- returns the coordinate valuespublic void getStoredTCD(RigidTransform3d TCD)
TCD
- returns the stored TCD transformpublic void setCoordinate(int idx, double value)
idx
-th coordinate for this joint. If the joint is
connected to other bodies, their poses are adjusted appropriately.idx
- index of the coordinatevalue
- new coordinate valuepublic void setCoordinates(VectorNd coords)
coords
supplies the coordinates and should have a length >=
numCoordinates()
. If the joint is connected to other bodies, their poses
are adjusted appropriately.coords
- new coordinate valuespublic void coordinatesToTCD(RigidTransform3d TCD, VectorNd coords)
TCD
- returns the TCD transformcoords
- supplies the coordinate values and
must have a length >= numCoordinates()
.public void getPosition(Point3d pos)