public class EllipsoidJoint3d extends JointBase implements CopyableComponent
x
and y
, while the (counter-clockwise) rotation
of C about z is given by the coordinate theta
.
The x
, y
theta
values are available as
properties (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.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
static int |
THETA_IDX |
static int |
X_IDX |
static int |
Y_IDX |
DEFAULT_SHAFT_LENGTH, DEFAULT_SHAFT_RADIUS
debug, useOldDerivativeMethod
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
EllipsoidJoint3d(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TCW,
RigidTransform3d TDW,
double a,
double b,
double c,
boolean useOpenSimApprox)
Creates a
EllipsoidJoint connecting two connectable bodies, bodyA and bodyB . |
EllipsoidJoint3d(double a,
double b,
double c,
boolean useOpenSimApprox)
Creates a
PlanarJoint which is not attached to any
bodies. |
EllipsoidJoint3d(RigidBody bodyA,
RigidTransform3d TCA,
RigidBody bodyB,
RigidTransform3d TDB,
double a,
double b,
double c,
boolean useOpenSimApprox)
Creates a
EllipsoidJoint connecting two rigid bodies, bodyA
and bodyB . |
Modifier and Type | Method and Description |
---|---|
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
EllipsoidCoupling3d |
getCoupling()
Returns the coupling used by this connector.
|
boolean |
getDrawEllipsoid() |
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 |
getMaxY()
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 |
getMinY()
Queries the lower x range limit for this joint, in degrees.
|
double |
getPlaneSize()
Queries the size used to render this joint's tangent plane as a square.
|
double |
getTheta()
Queries this joint's theta value, in degrees.
|
DoubleInterval |
getThetaRange()
Queries the theta range limits for this joint, in degrees.
|
boolean |
getUseOpenSimApprox() |
double |
getX()
Queries the x range limits for this joint.
|
DoubleInterval |
getXRange()
Queries the x range limits for this joint.
|
double |
getY()
Queries this joint's y value.
|
DoubleInterval |
getYRange()
Queries the y range limits for this joint.
|
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 |
setDrawEllipsoid(boolean enable) |
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 |
setMaxY(double max)
Sets the upper y 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 |
setMinY(double min)
Sets the lower y range limit for this joint.
|
void |
setPlaneSize(double size)
Sets the size used to render this joint's tangent plane as a square.
|
void |
setTheta(double theta)
Sets this joint's theta value, in degrees.
|
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 |
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 |
setY(double y)
Sets this joint's y value.
|
void |
setYRange(double min,
double max)
Sets the y range limits for this joint.
|
void |
setYRange(DoubleInterval range)
Sets the y range limits for this joint.
|
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
addCoordinateSolveBlocks, addCoordinateVelJacobian, applyCoordinateForce, coordinatesToTCD, getCoordinate, getCoordinateDeg, getCoordinateIndex, getCoordinateMotionType, getCoordinateName, getCoordinateRange, getCoordinateRangeDeg, getCoordinates, getCoordinateSpeed, getCoordinateValue, getMaxCoordinate, getMaxCoordinateDeg, getMinCoordinate, getMinCoordinateDeg, getPosition, getShaftLength, getShaftRadius, getStoredCoordinates, getStoredTCD, getStoredTCD, isCoordinateLocked, numCoordinates, setCoordinate, setCoordinateDeg, setCoordinateLocked, setCoordinateName, setCoordinateRange, setCoordinateRangeDeg, setCoordinates, setShaftLength, setShaftRadius
addBilateralConstraints, addFrictionConstraints, addMasterBlocks, addTransformableDependencies, addUnilateralConstraints, computeConstraintMatrixA, computeConstraintMatrixB, connectToHierarchy, copy, disconnectFromHierarchy, findAttachedBodies, getActivation, getAxisLength, getBilateralForceInA, getBilateralForceInA, getBilateralForceInB, getBilateralForceInB, getBilateralForceInC, getBilateralForceInC, getBilateralForces, getBilateralInfo, getBilateralSizes, getBodyA, getBodyB, getCompliance, getConstrainedComponents, getConstraint, getConstraintFlags, getConstraintForce, getCopyReferences, 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, printConnectedBodies, printConstraintInfo, 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, updateConstraints, zeroForces
defaultRenderPropsAreNull, 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
copy, getCopyReferences, isDuplicatable
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
postscan
isWritable, write
transformPriority
advanceState, getAuxVarDerivative, getAuxVarState, numAuxVars, requiresAdvance, setAuxVarState
public static final int X_IDX
public static final int Y_IDX
public static final int THETA_IDX
public static PropertyList myProps
public EllipsoidJoint3d(double a, double b, double c, boolean useOpenSimApprox)
PlanarJoint
which is not attached to any
bodies. It can subsequently be connected using one of the setBodies
methods.public EllipsoidJoint3d(RigidBody bodyA, RigidTransform3d TCA, RigidBody bodyB, RigidTransform3d TDB, double a, double b, double c, boolean useOpenSimApprox)
EllipsoidJoint
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 EllipsoidJoint3d(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TCW, RigidTransform3d TDW, double a, double b, double c, boolean useOpenSimApprox)
EllipsoidJoint
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 PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class JointBase
public boolean getDrawEllipsoid()
public void setDrawEllipsoid(boolean enable)
public EllipsoidCoupling3d getCoupling()
BodyConnector
getCoupling
in class BodyConnector
public boolean getUseOpenSimApprox()
public double getX()
setXRange(DoubleInterval)
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 double getY()
setY(double)
for more details.public void setY(double y)
y
- new y valuepublic DoubleInterval getYRange()
setYRange(DoubleInterval)
for more details.public double getMinY()
public double getMaxY()
public void setYRange(DoubleInterval range)
[-inf, inf]
, which implies no limits. If y 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
- y range limits for this jointpublic void setYRange(double min, double max)
setYRange(DoubleInterval)
.min
- minimum y valuemax
- maximum y valuepublic void setMaxY(double max)
inf
removes the upper limit.max
- upper y range limitpublic void setMinY(double min)
-inf
removes the lower limit.min
- lower y range limitpublic 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 double getPlaneSize()
public void setPlaneSize(double size)
size
- used to render the planepublic RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class BodyConnector
list
- list of objects to be renderedpublic void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class BodyConnector
pmin
- minimum pointpmax
- maximum pointpublic void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class BodyConnector
renderer
- 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
.