public class SegmentedPlanarConnector extends BodyConnector implements CopyableComponent
The planar segments are defined by a sequence of x-z coordinate pairs in the D coordinate frame. The number of segments equals the number of pairs minus one, so there must be at least two pairs (which would define a single plane). Segments are assumed to be contiguous, and the normal for each is defined by u X y, where u is a vector in the direction of the segment (from first to last coordinate pair) and y is the direction of the y axis. The first and last plane segments are assumed to extend to infinity.
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
debug, useOldDerivativeMethodenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITIONTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
SegmentedPlanarConnector()
Creates a
SegmentedPlanarConnector which is not attached to any
bodies. |
SegmentedPlanarConnector(ConnectableBody bodyA,
ConnectableBody bodyB,
RigidTransform3d TDW,
double[] segs)
Creates a
SegmentedPlanarConnector connecting two connectable
bodies, bodyA and bodyB. |
SegmentedPlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d TDB,
double[] segs)
Creates a
SegmentedPlanarConnector connecting two rigid bodies,
bodyA and bodyB. |
SegmentedPlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d TDW,
double[] segs)
Creates a
SegmentedPlanarConnector connecting a single rigid
body, bodyA, to ground. |
| Modifier and Type | Method and Description |
|---|---|
SegmentedPlanarConnector |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
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.
|
int |
getEngaged() |
double |
getPlanarActivation() |
double |
getPlaneSize() |
boolean |
isRenderNormalReversed() |
boolean |
isUnilateral() |
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 |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
set(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d TDB,
double[] segs)
Sets this SegmentedPlanarConnector to connect two rigid bodies.
|
void |
set(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d TDW,
double[] segs)
Sets this SegmentedPlanarConnector to connect a rigid body with the world
frame.
|
void |
setPlaneSize(double len) |
void |
setRenderNormalReversed(boolean reversed) |
void |
setUnilateral(boolean unilateral) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
addBilateralConstraints, 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, 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, zeroForcesdefaultRenderPropsAreNull, 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 PropertyList myProps
public SegmentedPlanarConnector()
SegmentedPlanarConnector which is not attached to any
bodies. It can subsequently be connected using one of the set
methods.public SegmentedPlanarConnector(RigidBody bodyA, Vector3d pCA, RigidBody bodyB, RigidTransform3d TDB, double[] segs)
SegmentedPlanarConnector connecting two rigid bodies,
bodyA and bodyB. If A and B describe the coordinate
frames of bodyA and bodyB, and then pCA gives the
origin of C with respect to A and TDB gives the pose of D with
respect to B. The planar segments are defined by segs, as
described in the header documentation for this class.bodyA - rigid body ApCA - origin of C with respect to A, as seen in AbodyB - rigid body B (or null)TDB - transform from frame D to body frame Bsegs - segment boundaries, given as pairs of coordinates in the x-z planepublic SegmentedPlanarConnector(RigidBody bodyA, Vector3d pCA, RigidTransform3d TDW, double[] segs)
SegmentedPlanarConnector connecting a single rigid
body, bodyA, to ground. If A describes the coordinate frame of
bodyA, then pCA gives the origin of C with respect to A
and TDW gives the pose of D with respect to world. The planar
segments are defined by segs, as described in the header
documentation for this class.bodyA - rigid body ApCA - origin of C with respect to A, as seen in ATDW - transform from frame D to world coordinatessegs - segment boundaries, given as pairs of coordinates in the x-z planepublic SegmentedPlanarConnector(ConnectableBody bodyA, ConnectableBody bodyB, RigidTransform3d TDW, double[] segs)
SegmentedPlanarConnector connecting two connectable
bodies, bodyA and bodyB. The joint frames D and C are
assumed to be initially coincident. The planar segments are defined by
segs, as described in the header documentation for this class.
Specifying bodyB as null will cause bodyA to
be connected to ground.
bodyA - body AbodyB - body BTDW - initial transform from connector frames D and C to worldsegs - segment boundaries, given as pairs of coordinates in the x-z planepublic PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class BodyConnectorpublic double getPlaneSize()
public void setPlaneSize(double len)
public double getPlanarActivation()
public int getEngaged()
public void set(RigidBody bodyA, Vector3d pCA, RigidBody bodyB, RigidTransform3d TDB, double[] segs)
segs, as described in the header documentation
for this class.bodyA - first rigid bodypCA - location of contact point relative to body AbodyB - second rigid bodyTDB - transformation from frame D to body Bsegs - segment boundaries, given as pairs of coordinates in the x-z plane.public void set(RigidBody bodyA, Vector3d pCA, RigidTransform3d TDW, double[] segs)
segs, as described in the header documentation for this class.bodyA - rigid bodypCA - location of contact point relative to bodyTDW - transformation from frame D to world coordinatessegs - segment boundaries, given as pairs of coordinates in the x-z plane.public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class BodyConnectorpmin - minimum pointpmax - maximum pointpublic RenderProps createRenderProps()
HasRenderPropscreateRenderProps in interface HasRenderPropscreateRenderProps in class RenderableConstrainerBasepublic 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 void scaleDistance(double s)
BodyConnectorscaleDistance in interface ScalableUnitsscaleDistance in class BodyConnectors - scaling factorpublic boolean isRenderNormalReversed()
public void setRenderNormalReversed(boolean reversed)
public boolean isUnilateral()
public void setUnilateral(boolean unilateral)
public SegmentedPlanarConnector 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