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.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
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 |
---|
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, addFrictionConstraints, addMasterBlocks, addTransformableDependencies, addUnilateralConstraints, computeConstraintMatrixA, computeConstraintMatrixB, connectToHierarchy, 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, printConnectedBodies, printConstraintInfo, 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
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 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()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class BodyConnector
public 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)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class BodyConnector
pmin
- minimum pointpmax
- maximum pointpublic 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 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
.public void scaleDistance(double s)
BodyConnector
scaleDistance
in interface ScalableUnits
scaleDistance
in class BodyConnector
s
- 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)
CopyableComponent
COPY_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 CopyableComponent
copy
in class BodyConnector
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
components