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 |
addCoordinateSolveBlocks(SparseNumberedBlockMatrix M,
int idx) |
void |
addCoordinateVelJacobian(SparseNumberedBlockMatrix M,
int idx,
double s) |
void |
applyCoordinateForce(int idx,
double f)
Applies a generalized force to the
idx -th coordinate for this
joint. |
void |
coordinatesToTCD(RigidTransform3d TCD,
VectorNd coords)
Computes the TCD transform for a set of coordinates, if coordinates are
supported.
|
PropertyInfoList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
double |
getCoordinate(int idx)
Returns the
idx -th coordinate value for this joint. |
double |
getCoordinateDeg(int idx)
Returns the
idx -th coordinate value for this joint, converted
to degrees. |
RigidBodyConstraint.MotionType |
getCoordinateMotionType(int idx)
Returns the motion type of 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 |
getCoordinateSpeed(int idx)
Returns the current speed of the
idx -th coordinate for this joint. |
double |
getCoordinateValue(int idx)
Returns the current stored value of the
idx -th coordinate 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.
|
boolean |
isCoordinateLocked(int idx)
Queries whether the
idx -th coordinate for this joint is locked. |
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 |
setCoordinateDeg(int idx,
double value)
Sets the
idx -th coordinate for this joint, with the value
specified in degrees. |
void |
setCoordinateLocked(int idx,
boolean locked)
Sets whether the
idx -th coordinate for this joint is locked,
meaning that it will hold its current value. |
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, 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, getTransformDGeometryOnly, getTransformPositionOnly, 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, setTransformDGeometryOnly, setTransformPositionOnly, 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
advanceState, getAuxVarDerivative, getAuxVarState, numAuxVars, requiresAdvance, setAuxVarState
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 PropertyInfoList 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 getCoordinateDeg(int idx)
idx
-th coordinate value for this joint, converted
to degrees.idx
- index of the coordinatepublic double getCoordinate(int idx)
idx
-th coordinate value 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 double getCoordinateValue(int idx)
idx
-th coordinate for
this joint.idx
- index of the coordinatepublic double getCoordinateSpeed(int idx)
idx
-th coordinate for this joint.idx
- index of the coordinatepublic RigidBodyConstraint.MotionType getCoordinateMotionType(int idx)
idx
-th coordinate for this joint.idx
- index of the coordinatepublic void applyCoordinateForce(int idx, double f)
idx
-th coordinate for this
joint.idx
- index of the coordinatef
- generalized force to applypublic void addCoordinateSolveBlocks(SparseNumberedBlockMatrix M, int idx)
public void addCoordinateVelJacobian(SparseNumberedBlockMatrix M, int idx, double s)
public 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 setCoordinateDeg(int idx, double value)
idx
-th coordinate for this joint, with the value
specified in degrees.idx
- index of the coordinatevalue
- new coordinate value, in degreespublic 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 boolean isCoordinateLocked(int idx)
idx
-th coordinate for this joint is locked.
See setCoordinateLocked(int, boolean)
for details.idx
- index of the coordinatetrue
if the coordinate is lockedpublic void setCoordinateLocked(int idx, boolean locked)
idx
-th coordinate for this joint is locked,
meaning that it will hold its current value. Locking a coordinate will
reduce the number of joint DOFs by one.idx
- index of the coordinatelocked
- if true
, sets the coordinate to be lockedpublic 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)