public class SlottedHingeJoint extends JointBase implements CopyableComponent
theta, and
also translates along the x axis of D by a distance x.
The theta and x values are available as properties (with
theta given in degrees) which can be read and also, under
appropriate circumstances, set. Setting these values causes an adjustment
in the positions of one or both bodies connected to this joint, along with
adjacent bodies connected to them, with preference given to bodies that are
not attached to ``ground''. If this is done during simulation, and
particularly if one or both of the bodies connected to this joint are moving
dynamically, the results will be unpredictable and will likely conflict with
the simulation.
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
static int |
THETA_IDX |
static int |
X_IDX |
DEFAULT_SHAFT_LENGTH, DEFAULT_SHAFT_RADIUSdebug, useOldDerivativeMethodenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITIONTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
SlottedHingeJoint()
Creates a
SlottedRevoluteJoint which is not attached to any
bodies. |
SlottedHingeJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TDW)
Creates a
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. |
SlottedHingeJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TCW,
RigidTransform3d TDW)
Creates a
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. |
SlottedHingeJoint(ConnectableBody bodyA,
RigidTransform3d TDW)
Creates a
SlottedRevoluteJoint connecting a single connectable
body, bodyA, to ground. |
SlottedHingeJoint(RigidBody bodyA,
ConnectableBody bodyB,
Point3d originD,
Vector3d zaxis)
Creates a
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. |
SlottedHingeJoint(RigidBody bodyA,
RigidTransform3d TCA,
RigidBody bodyB,
RigidTransform3d TDB)
Creates a
SlottedRevoluteJoint connecting two rigid bodies,
bodyA and bodyB. |
| Modifier and Type | Method and Description |
|---|---|
SlottedHingeJoint |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
double |
getMaxTheta()
Queries the upper theta range limit for this joint, in degrees.
|
double |
getMaxX()
Queries the upper x range limit for this joint, in degrees.
|
double |
getMinTheta()
Queries the lower theta range limit for this joint, in degrees.
|
double |
getMinX()
Queries the lower x range limit for this joint, in degrees.
|
double |
getSlotDepth() |
DoubleInterval |
getSlotRange() |
double |
getSlotWidth() |
double |
getTheta()
Queries this joint's theta value, in degrees.
|
DoubleInterval |
getThetaRange()
Queries the theta range limits for this joint, in degrees.
|
double |
getX()
Queries this joint's x value.
|
DoubleInterval |
getXRange()
Queries the x range limits for this joint.
|
boolean |
isThetaLocked()
Queries whether the theta coordinate for this joint is locked.
|
boolean |
isXLocked()
Queries whether the x coordinate for this joint is locked.
|
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer. |
void |
setMaxTheta(double max)
Sets the upper theta range limit for this joint, in degrees.
|
void |
setMaxX(double max)
Sets the upper x range limit for this joint.
|
void |
setMinTheta(double min)
Sets the lower theta range limit for this joint, in degrees.
|
void |
setMinX(double min)
Sets the lower x range limit for this joint.
|
void |
setSlotDepth(double d) |
void |
setSlotRange(DoubleInterval range) |
void |
setSlotWidth(double w) |
void |
setTheta(double theta)
Sets this joint's theta value, in degrees.
|
void |
setThetaLocked(boolean locked)
Set whether the theta coordinate for this joint is locked.
|
void |
setThetaRange(double min,
double max)
Sets the theta range limits for this joint.
|
void |
setThetaRange(DoubleInterval range)
Sets the theta range limits for this joint, in degrees.
|
void |
setX(double x)
Sets this joint's x value.
|
void |
setXLocked(boolean locked)
Set whether the x coordinate for this joint is locked.
|
void |
setXRange(double min,
double max)
Sets the x range limits for this joint.
|
void |
setXRange(DoubleInterval range)
Sets the x range limits for this joint.
|
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
addCoordinateMobilities, addCoordinateSolveBlocks, addCoordinateVelJacobian, applyCoordinateForce, coordinatesToTCD, getCoordinate, getCoordinateDeg, getCoordinateIndex, getCoordinateMotionType, getCoordinateName, getCoordinateRange, getCoordinateRangeDeg, getCoordinates, getCoordinateSpeed, getCoordinateValue, getCoordinateValueDeg, getMaxCoordinate, getMaxCoordinateDeg, getMinCoordinate, getMinCoordinateDeg, getPosition, getRangeLimitCompliance, getRangeLimitDamping, getRangeLimitForce, getShaftLength, getShaftRadius, getStoredCoordinates, getStoredTCD, getStoredTCD, isCoordinateLocked, numCoordinates, setCoordinate, setCoordinateDeg, setCoordinateLocked, setCoordinateName, setCoordinateRange, setCoordinateRangeDeg, setCoordinates, setRangeLimitCompliance, setShaftLength, setShaftRadiusaddBilateralConstraints, addBilateralConstraints, addFrictionConstraints, addMasterBlocks, addTransformableDependencies, addUnilateralConstraints, addUnilateralConstraints, computeConstraintMatrixA, computeConstraintMatrixB, connectToHierarchy, disconnectFromHierarchy, findAttachedBodies, findConnectedBodies, 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, getOtherBody, 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, printConnectedBodies, printConstraintInfo, scaleDistance, scaleMass, setAlwaysAdjustBodyA, setAxisLength, setBilateralForces, setBodies, setBodies, setBodies, setBodies, setBodyA, setBodyA, setBodyB, setBodyB, setCompliance, setCurrentTCW, setCurrentTDW, setDamping, setDrawFrameC, setDrawFrameD, setEnabled, setFrictionForces, setFrictionState, setLinearCompliance, setPenetrationTol, setPenetrationTolMode, setRotaryCompliance, setRotaryLimitTol, setRotaryLimitTolMode, setState, setTransformDGeometryOnly, setTransformPositionOnly, setUnilateralForces, setUnilateralState, transformGeometry, transformGeometry, updateAttachments, updateConstraints, withinLoop, zeroForcescreateRenderProps, defaultRenderPropsAreNull, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderPropscheckFlag, 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, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCopyReferences, isDuplicatableconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writetransformPriorityadvanceState, getAuxVarDerivative, getAuxVarState, numAuxVars, requiresAdvance, setAuxVarStatepublic static final int X_IDX
public static final int THETA_IDX
public static PropertyList myProps
public SlottedHingeJoint()
SlottedRevoluteJoint which is not attached to any
bodies. It can subsequently be connected using one of the setBodies methods.public SlottedHingeJoint(RigidBody bodyA, RigidTransform3d TCA, RigidBody bodyB, RigidTransform3d TDB)
SlottedRevoluteJoint connecting two rigid bodies,
bodyA and bodyB. If A and B describe the coordinate
frames of bodyA and bodyB, then TCA and TDB give the (fixed) transforms from the joint's C and D frames to A and
B, respectively. Since C and D are specified independently, the joint
transform TCD may not necessarily be initialized to the identity.
Specifying bodyB as null will cause bodyA to
be connected to ground, with TDB then being the same as TDW.
bodyA - rigid body ATCA - transform from joint frame C to body frame AbodyB - rigid body B (or null)TDB - transform from joint frame D to body frame Bpublic SlottedHingeJoint(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TCW, RigidTransform3d TDW)
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. The joint frames C and D are located
independently with respect to world coordinates by TCW and TDW.
Specifying bodyB as null will cause bodyA to
be connected to ground.
bodyA - body AbodyB - body B (or null)TCW - initial transform from joint frame C to worldTDW - initial transform from joint frame D to worldpublic SlottedHingeJoint(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TDW)
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. The joint frames D and C are assumed to
be initially coincident, so that theta and x will have
initial values of 0. D (and C) is located by TDW, which gives the
transform from D to world coordinates.bodyA - body AbodyB - body BTDW - initial transform from joint frames D and C to worldpublic SlottedHingeJoint(ConnectableBody bodyA, RigidTransform3d TDW)
SlottedRevoluteJoint connecting a single connectable
body, bodyA, to ground. The joint frames D and C are assumed to
be initially coincident, so that theta and x will have
initial values of 0. D (and C) is located by TDW, which gives the
transform from D to world coordinates.bodyA - body ATDW - initial transform from joint frames D and C to worldpublic SlottedHingeJoint(RigidBody bodyA, ConnectableBody bodyB, Point3d originD, Vector3d zaxis)
SlottedRevoluteJoint connecting two connectable bodies,
bodyA and bodyB. The joint frames D and C are assumed to
be initially coincident, so that theta and x will have
initial values of 0. D (and C) is located (with respect to world) so that
its origin is at pd and its z axis in the direction of zaxis.
Specifying bodyB as null will cause bodyA to
be connected to ground.
bodyA - body AbodyB - body B, or null if bodyA is connected
to ground.originD - origin of frame D (world coordinates)zaxis - direction of frame D's z axis (world coordinates)public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class JointBasepublic double getTheta()
setTheta(double) for
more details.public void setTheta(double theta)
theta - new theta valuepublic DoubleInterval getThetaRange()
setThetaRange(DoubleInterval) for more details.public double getMinTheta()
public double getMaxTheta()
public void setThetaRange(DoubleInterval range)
[-inf, inf], which implies no limits. If theta travels beyond
these limits during dynamic simulation, unilateral constraints will be
activated to enforce them. Setting the lower limit to -inf or the
upper limit to inf removes the lower or upper limit,
respectively. Specifying range as null will set the range
to (-inf, inf).range - theta range limits for this jointpublic void setThetaRange(double min,
double max)
setThetaRange(DoubleInterval).min - minimum theta valuemax - maximum theta valuepublic void setMaxTheta(double max)
inf removes the upper limit.max - upper theta range limitpublic void setMinTheta(double min)
-inf removes the lower limit.min - lower theta range limitpublic boolean isThetaLocked()
true if theta is lockedpublic void setThetaLocked(boolean locked)
locked - if true, locks thetapublic double getX()
setX(double) for more details.public void setX(double x)
x - new x valuepublic DoubleInterval getXRange()
setXRange(DoubleInterval) for more details.public double getMinX()
public double getMaxX()
public void setXRange(DoubleInterval range)
[-inf, inf], which implies no limits. If x travels beyond these limits
during dynamic simulation, unilateral constraints will be activated to
enforce them. Setting the lower limit to -inf or the upper limit
to inf removes the lower or upper limit, respectively. Specifying
range as null will set the range to (-inf, inf).range - x range limits for this jointpublic void setXRange(double min,
double max)
setXRange(DoubleInterval).min - minimum x valuemax - maximum x valuepublic void setMaxX(double max)
inf removes the upper limit.max - upper x range limitpublic void setMinX(double min)
-inf removes the lower limit.min - lower x range limitpublic boolean isXLocked()
true if x is lockedpublic void setXLocked(boolean locked)
locked - if true, locks xpublic double getSlotDepth()
public void setSlotDepth(double d)
public double getSlotWidth()
public void setSlotWidth(double w)
public DoubleInterval getSlotRange()
public void setSlotRange(DoubleInterval range)
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class BodyConnectorpmin - minimum pointpmax - maximum pointpublic void prerender(RenderList list)
IsRenderablelist.addIfVisible (obj);
for each of the objects in question.prerender in interface IsRenderableprerender in class BodyConnectorlist - list of objects to be renderedpublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class BodyConnectorrenderer - provides the functionality used to perform the rendering.flags - flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT and
Renderer.SORT_FACES.public SlottedHingeJoint copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_REFERENCES
is set in flags, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap.copy in interface CopyableComponentcopy in class BodyConnectorflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
components