artisynth.core.mechmodels

## Class EllipsoidJoint

• All Implemented Interfaces:
Constrainer, CopyableComponent, HasCoordinateFrame, HasNumericState, ModelComponent, PostScannable, RenderableComponent, TransformableGeometry, ScalableUnits, java.lang.Cloneable, HasProperties, HierarchyNode, HasRenderProps, IsRenderable, IsSelectable, Renderable, Scannable

```public class EllipsoidJoint
extends JointBase
implements CopyableComponent```
Implements a 4 DOF joint, in which the origin of frame C is constrained to lie on the surface of an ellipsoid in frame D, while being free to rotate about the axis normal to the ellipsoid surface and a second axis in the surface tangent plane. The origin of C with respect to D is described by two coordinate angles, `longitude` and `latitude`, which describe a point on the ellipsoid in polar coordinates. If `c1`, `s1` `c2`, and `s2` are the cosine and sine of `longitude` and `latitude`, respectively, the semi-axis lengths of the ellipsoid are `rx`, `ry`, and `rz`, and the origin of C is given with respect to D by a vector `p`, then
```     [   rx s2   ]
p = [ -ry s1 c2 ]
[  rz c1 c2 ]
```
which is the equation of an ellipsoid in polar coordinates, with longitude giving the rotation angle about the x axis.

The longitude and latitude coordinates define a frame with respect to D known as "frame 2". With respect to D, the origin of frame 2 is `p` described above, while the orientation of frame 2 is determined in one of two ways:

• By default, the z axis is set to point outward from the surface normal, while the x axis is the surface tangent direction imparted by the `latitude` angle.
• If the joint is set to be compatible with the OpenSim ellipsoid joint, then the z axis is instead set to an approximation of the surface normal given by `(p.x/rx, p.y/ry, p.z/rz)`, while the x direction is the same as that which would result by treating the longitude and latitude coordinates as the first two joints of an XYZ GimbalCoupling.
Two additional angles, `theta` and `phi`, provide two additional rotational degrees of freedom between frame 2 and frame C, consisting of a rotation by `theta` about the frame 2 z axis, followed by an additional rotation about a ``wing'' axis in the (rotated) x-y plane, where the wing axis is defined by an angle `alpha` with respect to the x axis. The default wing axis corresponds to the x axis (i.e., `alpha` = 0).

The `longitude`, `latitude` `theta` `phi` 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.

• ### Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent

`ModelComponent.NavpanelVisibility`
• ### Field Summary

Fields
Modifier and Type Field and Description
`static int` `LATITUDE_IDX`
`static int` `LONGITUDE_IDX`
`static PropertyList` `myProps`
`static int` `PHI_IDX`
`static int` `THETA_IDX`
• ### Fields inherited from class artisynth.core.mechmodels.JointBase

`DEFAULT_SHAFT_LENGTH, DEFAULT_SHAFT_RADIUS`
• ### Fields inherited from class artisynth.core.mechmodels.BodyConnector

`debug, useOldDerivativeMethod`
• ### Fields inherited from class artisynth.core.modelbase.ModelComponentBase

`enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames`
• ### Fields inherited from interface artisynth.core.modelbase.CopyableComponent

`COPY_REFERENCES, REST_POSITION`
• ### Fields inherited from interface artisynth.core.modelbase.TransformableGeometry

`TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING`
• ### Fields inherited from interface maspack.render.IsRenderable

`TRANSPARENT, TWO_DIMENSIONAL`
• ### Constructor Summary

Constructors
Constructor and Description
`EllipsoidJoint()`
No-args constructor needed for writing/scanning.
```EllipsoidJoint(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TCW, RigidTransform3d TDW, double A, double B, double C)```
Creates a `EllipsoidJoint` connecting two connectable bodies, `bodyA` and `bodyB`.
```EllipsoidJoint(double A, double B, double C, double alpha, boolean useOpenSimApprox)```
Creates an `EllipsoidJoint` which is not attached to any bodies.
```EllipsoidJoint(RigidBody bodyA, RigidTransform3d TCA, RigidBody bodyB, RigidTransform3d TDB, double A, double B, double C, double alpha, boolean openSimCompatible)```
Creates a `EllipsoidJoint` connecting two rigid bodies, `bodyA` and `bodyB`.
• ### Method Summary

All Methods
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.
`double` `getAlpha()`
`EllipsoidCoupling` `getCoupling()`
Returns the coupling used by this connector.
`boolean` `getDrawEllipsoid()`
`double` `getLatitude()`
Queries this joint's latitude angle.
`DoubleInterval` `getLatitudeRange()`
Queries the latitude range limits for this joint.
`double` `getLongitude()`
Queries this joint's longitude angle.
`DoubleInterval` `getLongitudeRange()`
Queries the longitude angle range limits for this joint.
`double` `getMaxLatitude()`
Queries the upper latitude range limit for this joint.
`double` `getMaxLongitude()`
Queries the upper longitude range limit for this joint.
`double` `getMaxPhi()`
Queries the upper phi range limit for this joint, in degrees.
`double` `getMaxTheta()`
Queries the upper theta range limit for this joint.
`double` `getMinLatitude()`
Queries the lower latitude range limit for this joint.
`double` `getMinLongitude()`
Queries the lower longitude range limit for this joint.
`double` `getMinPhi()`
Queries the lower phi range limit for this joint, in degrees.
`double` `getMinTheta()`
Queries the lower theta range limit for this joint.
`double` `getPhi()`
Queries this joint's phi angle.
`DoubleInterval` `getPhiRange()`
Queries the phi angle range limits for this joint.
`Vector3d` `getSemiAxisLengths()`
Queries the semi-axis lengths for this ellipsoid.
`double` `getTheta()`
Queries this joint's theta angle.
`DoubleInterval` `getThetaRange()`
Queries the theta angle range limits for this joint.
`boolean` `isLatitudeLocked()`
Queries whether the latitude coordinate for this joint is locked.
`boolean` `isLongitudeLocked()`
Queries whether the longitude coordinate for this joint is locked.
`boolean` `isOpenSimCompatible()`
`boolean` `isPhiLocked()`
Queries whether the phi coordinate for this joint is locked.
`boolean` `isThetaLocked()`
Queries whether the theta 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` `setDrawEllipsoid(boolean enable)`
`void` `setLatitude(double latitude)`
Sets this joint's latitude angle.
`void` `setLatitudeLocked(boolean locked)`
Set whether the latitude coordinate for this joint is locked.
`void` ```setLatitudeRange(double min, double max)```
Sets the latitude range limits for this joint.
`void` `setLatitudeRange(DoubleInterval range)`
Sets the range limits of the latitude for this joint.
`void` `setLongitude(double longitude)`
Sets this joint's longitude angle.
`void` `setLongitudeLocked(boolean locked)`
Set whether the longitude coordinate for this joint is locked.
`void` ```setLongitudeRange(double min, double max)```
Sets the longitude range limits for this joint.
`void` `setLongitudeRange(DoubleInterval range)`
Sets the range limits of the longitude for this joint.
`void` `setMaxLatitude(double max)`
Sets the upper latitude range limit for this joint.
`void` `setMaxLongitude(double max)`
Sets the upper longitude range limit for this joint.
`void` `setMaxPhi(double max)`
Sets the upper phi range limit for this joint.
`void` `setMaxTheta(double max)`
Sets the upper theta range limit for this joint.
`void` `setMinLatitude(double min)`
Sets the lower latitude range limit for this joint.
`void` `setMinLongitude(double min)`
Sets the lower longitude range limit for this joint.
`void` `setMinPhi(double min)`
Sets the lower phi range limit for this joint.
`void` `setMinTheta(double min)`
Sets the lower theta range limit for this joint.
`void` `setPhi(double phi)`
Sets this joint's phi angle.
`void` `setPhiLocked(boolean locked)`
Set whether the phi coordinate for this joint is locked.
`void` ```setPhiRange(double min, double max)```
Sets the phi range limits for this joint.
`void` `setPhiRange(DoubleInterval range)`
Sets the range limits of phi for this joint.
`void` `setTheta(double theta)`
Sets this joint's theta angle.
`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 range limits of theta for this joint.
`void` ```updateBounds(Vector3d pmin, Vector3d pmax)```
Update the minimum and maximum points for this object.
• ### Methods inherited from class artisynth.core.mechmodels.JointBase

`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`
• ### Methods inherited from class artisynth.core.mechmodels.BodyConnector

`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`
• ### Methods inherited from class artisynth.core.modelbase.RenderableComponentBase

`defaultRenderPropsAreNull, getRenderHints, getRenderProps, getSelection, isSelectable, isVisible, numSelectionQueriesNeeded, setRenderProps, setVisible, updateRenderProps`
• ### Methods inherited from class artisynth.core.modelbase.ModelComponentBase

`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`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Methods inherited from interface artisynth.core.modelbase.CopyableComponent

`copy, getCopyReferences, isDuplicatable`
• ### Methods inherited from interface artisynth.core.modelbase.ModelComponent

`connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences`
• ### Methods inherited from interface maspack.properties.HasProperties

`getProperty`
• ### Methods inherited from interface maspack.properties.HierarchyNode

`getChildren, hasChildren`
• ### Methods inherited from interface artisynth.core.modelbase.PostScannable

`postscan`
• ### Methods inherited from interface maspack.util.Scannable

`isWritable, write`
• ### Methods inherited from interface artisynth.core.modelbase.TransformableGeometry

`transformPriority`
• ### Methods inherited from interface artisynth.core.modelbase.HasNumericState

`advanceState, getAuxVarDerivative, getAuxVarState, numAuxVars, requiresAdvance, setAuxVarState`
• ### Field Detail

• #### LONGITUDE_IDX

`public static final int LONGITUDE_IDX`
Constant Field Values
• #### LATITUDE_IDX

`public static final int LATITUDE_IDX`
Constant Field Values
• #### THETA_IDX

`public static final int THETA_IDX`
Constant Field Values
• #### PHI_IDX

`public static final int PHI_IDX`
Constant Field Values
• #### myProps

`public static PropertyList myProps`
• ### Constructor Detail

• #### EllipsoidJoint

`public EllipsoidJoint()`
No-args constructor needed for writing/scanning.
• #### EllipsoidJoint

```public EllipsoidJoint(double A,
double B,
double C,
double alpha,
boolean useOpenSimApprox)```
Creates an `EllipsoidJoint` which is not attached to any bodies. It can subsequently be connected using one of the `setBodies` methods.
• #### EllipsoidJoint

```public EllipsoidJoint(RigidBody bodyA,
RigidTransform3d TCA,
RigidBody bodyB,
RigidTransform3d TDB,
double A,
double B,
double C,
double alpha,
boolean openSimCompatible)```
Creates a `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`.

Parameters:
`bodyA` - rigid body A
`TCA` - transform from joint frame C to body frame A
`bodyB` - rigid body B (or `null`)
`TDB` - transform from joint frame D to body frame B
`A` - semi-axis length along x
`B` - semi-axis length along y
`C` - semi-axis length along z
`alpha` - angle of the second rotation axis, with respect to the x axis of frame 2, as described in this class's Javadoc header
`openSimCompatible` - if `true`, make this joint compatible with the OpenSim ellispoid joint, as described in this class's Javadoc header.
• #### EllipsoidJoint

```public EllipsoidJoint(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TCW,
RigidTransform3d TDW,
double A,
double B,
double C)```
Creates a `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.
Parameters:
`bodyA` - body A
`bodyB` - body B (or `null`)
`TCW` - initial transform from joint frame C to world
`TDW` - initial transform from joint frame D to world
`A` - semi-axis length along x
`B` - semi-axis length along y
`C` - semi-axis length along z
• ### Method Detail

• #### getAllPropertyInfo

`public PropertyList getAllPropertyInfo()`
Description copied from interface: `HasProperties`
Returns a list giving static information about all properties exported by this object.
Specified by:
`getAllPropertyInfo` in interface `HasProperties`
Overrides:
`getAllPropertyInfo` in class `JointBase`
Returns:
static information for all exported properties
• #### getDrawEllipsoid

`public boolean getDrawEllipsoid()`
• #### setDrawEllipsoid

`public void setDrawEllipsoid(boolean enable)`
• #### getCoupling

`public EllipsoidCoupling getCoupling()`
Description copied from class: `BodyConnector`
Returns the coupling used by this connector.
Overrides:
`getCoupling` in class `BodyConnector`
Returns:
coupling used by this connector
• #### isOpenSimCompatible

`public boolean isOpenSimCompatible()`
• #### getAlpha

`public double getAlpha()`
• #### getLongitude

`public double getLongitude()`
Queries this joint's longitude angle. See this class's Javadoc header for a description of this coordinate.
Returns:
longitude angle (in degrees)
• #### setLongitude

`public void setLongitude(double longitude)`
Sets this joint's longitude angle. See this class's Javadoc header for a description of this coordinate.
Parameters:
`longitude` - new longitude angle (in degrees)
• #### getLongitudeRange

`public DoubleInterval getLongitudeRange()`
Queries the longitude angle range limits for this joint. See `setLongitudeRange(DoubleInterval)` for more details.
Returns:
longitude range limits for this joint (in degrees)
• #### getMinLongitude

`public double getMinLongitude()`
Queries the lower longitude range limit for this joint.
Returns:
lower longitude range limit (in degrees)
• #### getMaxLongitude

`public double getMaxLongitude()`
Queries the upper longitude range limit for this joint.
Returns:
upper longitude range limit (in degrees)
• #### setLongitudeRange

`public void setLongitudeRange(DoubleInterval range)`
Sets the range limits of the longitude for this joint. The default range is `[-inf, inf]`, which implies no limits. If the longitude 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)`.
Parameters:
`range` - longitude range limits for this joint (in degrees)
• #### setLongitudeRange

```public void setLongitudeRange(double min,
double max)```
Sets the longitude range limits for this joint. This is a convenience wrapper for `setLongitudeRange(DoubleInterval)`.
Parameters:
`min` - minimum longitude angle (in degrees)
`max` - maximum longitude angle (in degrees)
• #### setMaxLongitude

`public void setMaxLongitude(double max)`
Sets the upper longitude range limit for this joint. Setting a value of `inf` removes the upper limit.
Parameters:
`max` - upper longitude range limit (in degrees)
• #### setMinLongitude

`public void setMinLongitude(double min)`
Sets the lower longitude range limit for this joint. Setting a value of `-inf` removes the lower limit.
Parameters:
`min` - lower longitude range limit (in degrees)
• #### isLongitudeLocked

`public boolean isLongitudeLocked()`
Queries whether the longitude coordinate for this joint is locked.
Returns:
`true` if longitude is locked
• #### setLongitudeLocked

`public void setLongitudeLocked(boolean locked)`
Set whether the longitude coordinate for this joint is locked.
Parameters:
`locked` - if `true`, locks longitude
• #### getLatitude

`public double getLatitude()`
Queries this joint's latitude angle. See this class's Javadoc header for a description of this coordinate.
Returns:
latitude angle (in degrees)
• #### setLatitude

`public void setLatitude(double latitude)`
Sets this joint's latitude angle. See this class's Javadoc header for a description of this coordinate.
Parameters:
`latitude` - new latitude angle (in degrees)
• #### getLatitudeRange

`public DoubleInterval getLatitudeRange()`
Queries the latitude range limits for this joint. See `setLatitudeRange(DoubleInterval)` for more details.
Returns:
latitude range limits for this joint (in degrees)
• #### getMinLatitude

`public double getMinLatitude()`
Queries the lower latitude range limit for this joint.
Returns:
lower latitude range limit (in degrees)
• #### getMaxLatitude

`public double getMaxLatitude()`
Queries the upper latitude range limit for this joint.
Returns:
upper latitude range limit (in degrees)
• #### setLatitudeRange

`public void setLatitudeRange(DoubleInterval range)`
Sets the range limits of the latitude for this joint. The default range is `[-inf, inf]`, which implies no limits. If the latitude 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)`.
Parameters:
`range` - latitude range limits for this joint (in degrees)
• #### setLatitudeRange

```public void setLatitudeRange(double min,
double max)```
Sets the latitude range limits for this joint. This is a convenience wrapper for `setLatitudeRange(DoubleInterval)`.
Parameters:
`min` - minimum latitude angle (in degrees)
`max` - maximum latitude angle (in degrees)
• #### setMaxLatitude

`public void setMaxLatitude(double max)`
Sets the upper latitude range limit for this joint. Setting a value of `inf` removes the upper limit.
Parameters:
`max` - upper latitude range limit (in degrees)
• #### setMinLatitude

`public void setMinLatitude(double min)`
Sets the lower latitude range limit for this joint. Setting a value of `-inf` removes the lower limit.
Parameters:
`min` - lower latitude range limit (in degrees)
• #### isLatitudeLocked

`public boolean isLatitudeLocked()`
Queries whether the latitude coordinate for this joint is locked.
Returns:
`true` if latitude is locked
• #### setLatitudeLocked

`public void setLatitudeLocked(boolean locked)`
Set whether the latitude coordinate for this joint is locked.
Parameters:
`locked` - if `true`, locks latitude
• #### getTheta

`public double getTheta()`
Queries this joint's theta angle. See this class's Javadoc header for a description of this coordinate. more details.
Returns:
theta angle (in degrees)
• #### setTheta

`public void setTheta(double theta)`
Sets this joint's theta angle. See this class's Javadoc header for a description of this coordinate.
Parameters:
`theta` - new theta angle (in degrees)
• #### getThetaRange

`public DoubleInterval getThetaRange()`
Queries the theta angle range limits for this joint. See `setThetaRange(DoubleInterval)` for more details.
Returns:
theta range limits for this joint (in degrees)
• #### getMinTheta

`public double getMinTheta()`
Queries the lower theta range limit for this joint.
Returns:
lower theta range limit (in degrees)
• #### getMaxTheta

`public double getMaxTheta()`
Queries the upper theta range limit for this joint.
Returns:
upper theta range limit (in degrees)
• #### setThetaRange

`public void setThetaRange(DoubleInterval range)`
Sets the range limits of theta for this joint. The default range is `[-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)`.
Parameters:
`range` - theta range limits for this joint (in degrees)
• #### setThetaRange

```public void setThetaRange(double min,
double max)```
Sets the theta range limits for this joint. This is a convenience wrapper for `setThetaRange(DoubleInterval)`.
Parameters:
`min` - minimum theta angle (in degrees)
`max` - maximum theta angle (in degrees)
• #### setMaxTheta

`public void setMaxTheta(double max)`
Sets the upper theta range limit for this joint. Setting a value of `inf` removes the upper limit.
Parameters:
`max` - upper theta range limit (in degrees)
• #### setMinTheta

`public void setMinTheta(double min)`
Sets the lower theta range limit for this joint. Setting a value of `-inf` removes the lower limit.
Parameters:
`min` - lower theta range limit (in degrees)
• #### isThetaLocked

`public boolean isThetaLocked()`
Queries whether the theta coordinate for this joint is locked.
Returns:
`true` if theta is locked
• #### setThetaLocked

`public void setThetaLocked(boolean locked)`
Set whether the theta coordinate for this joint is locked.
Parameters:
`locked` - if `true`, locks theta
• #### getPhi

`public double getPhi()`
Queries this joint's phi angle. See this class's Javadoc header for a description of this coordinate.
Returns:
phi angle (in degrees)
• #### setPhi

`public void setPhi(double phi)`
Sets this joint's phi angle. See this class's Javadoc header for a description of this coordinate.
Parameters:
`phi` - new phi angle (in degrees)
• #### getPhiRange

`public DoubleInterval getPhiRange()`
Queries the phi angle range limits for this joint. See `setPhiRange(DoubleInterval)` for more details.
Returns:
phi range limits for this joint (in degrees)
• #### getMinPhi

`public double getMinPhi()`
Queries the lower phi range limit for this joint, in degrees.
Returns:
lower phi range limit (in degrees)
• #### getMaxPhi

`public double getMaxPhi()`
Queries the upper phi range limit for this joint, in degrees.
Returns:
upper phi range limit (in degrees)
• #### setPhiRange

`public void setPhiRange(DoubleInterval range)`
Sets the range limits of phi for this joint. The default range is `[-inf, inf]`, which implies no limits. If phi 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)`.
Parameters:
`range` - phi range limits for this joint (in degrees)
• #### setPhiRange

```public void setPhiRange(double min,
double max)```
Sets the phi range limits for this joint. This is a convenience wrapper for `setPhiRange(DoubleInterval)`.
Parameters:
`min` - minimum phi angle (in degrees)
`max` - maximum phi angle (in degrees)
• #### setMaxPhi

`public void setMaxPhi(double max)`
Sets the upper phi range limit for this joint. Setting a value of `inf` removes the upper limit.
Parameters:
`max` - upper phi range limit (in degrees)
• #### setMinPhi

`public void setMinPhi(double min)`
Sets the lower phi range limit for this joint. Setting a value of `-inf` removes the lower limit.
Parameters:
`min` - lower phi range limit (in degrees)
• #### isPhiLocked

`public boolean isPhiLocked()`
Queries whether the phi coordinate for this joint is locked.
Returns:
`true` if phi is locked
• #### setPhiLocked

`public void setPhiLocked(boolean locked)`
Set whether the phi coordinate for this joint is locked.
Parameters:
`locked` - if `true`, locks phi
• #### getSemiAxisLengths

`public Vector3d getSemiAxisLengths()`
Queries the semi-axis lengths for this ellipsoid.
Returns:
3-vector containing the semi-axis lengths
• #### createRenderProps

`public RenderProps createRenderProps()`
Description copied from interface: `HasRenderProps`
Factory method to create render properties appropriate to this object.
Specified by:
`createRenderProps` in interface `HasRenderProps`
Overrides:
`createRenderProps` in class `RenderableComponentBase`
Returns:
new render properties for this object
• #### prerender

`public void prerender(RenderList list)`
Description copied from interface: `IsRenderable`
Called prior to rendering to allow this object to update the internal state required for rendering (such as by caching rendering coordinates). The object may add internal objects to the list of objects being rendered, by calling

for each of the objects in question.
Specified by:
`prerender` in interface `IsRenderable`
Overrides:
`prerender` in class `BodyConnector`
Parameters:
`list` - list of objects to be rendered
• #### updateBounds

```public void updateBounds(Vector3d pmin,
Vector3d pmax)```
Description copied from interface: `IsRenderable`
Update the minimum and maximum points for this object. In an x-y-z coordinate system with x directed to the right and y directed upwards, the minimum and maximum points can be thought of as defining the left-lower-far and right-upper-near corners of a bounding cube. This method should only reduce the elements of the minimum point and increase the elements of the maximum point, since it may be used as part of an iteration to determine the bounding cube for several different objects.
Specified by:
`updateBounds` in interface `IsRenderable`
Overrides:
`updateBounds` in class `BodyConnector`
Parameters:
`pmin` - minimum point
`pmax` - maximum point
• #### render

```public void render(Renderer renderer,
int flags)```
Description copied from interface: `IsRenderable`
Render this object using the functionality of the supplied `Renderer`.
Specified by:
`render` in interface `IsRenderable`
Overrides:
`render` in class `BodyConnector`
Parameters:
`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`.