public class SegmentedPlanarConnector extends RigidBodyConnector implements CopyableComponent
ModelComponent.NavpanelVisibility
HasAuxState.StateContext
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES
ARTICULATED, SIMULATING
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
SegmentedPlanarConnector() |
SegmentedPlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d XPB,
double[] segs) |
SegmentedPlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d XPW,
double[] segs) |
Modifier and Type | Method and Description |
---|---|
ModelComponent |
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.
|
double |
getPlanarActivation() |
double |
getPlaneSize() |
boolean |
isRenderNormalReversed() |
boolean |
isUnilateral() |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
set(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d XDB,
double[] segs)
Sets this SegmentedPlanarConnectorX to connect two rigid bodies.
|
void |
set(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d XDW,
double[] segs)
Sets this SegmentedPlanarConnectorX to connect a rigid body with the world
frame.
|
void |
setDefaultValues()
Sets the attributes of this component to their default values.
|
void |
setPlaneSize(double len) |
void |
setRenderNormalReversed(boolean reversed) |
void |
setUnilateral(boolean unilateral) |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
addBilateralConstraints, addFrictionConstraints, addFrictionConstraints, addUnilateralConstraints, advanceAuxState, connectToHierarchy, disconnectFromHierarchy, getActivation, getAuxState, getBilateralBlockA, getBilateralBlockB, getBilateralConstraints, getBilateralForceInA, getBilateralForceInA, getBilateralImpulses, getBilateralInfo, getBilateralSizes, getBodyA, getBodyB, getBreakAccel, getBreakSpeed, getCompliance, getContactDistance, getCopyReferences, getCurrentXDB, getCurrentXDW, getCurrentXFA, getCurrentXFW, getDamping, getHardReferences, getInitialAuxState, getLinearCompliance, getPenetrationTol, getPenetrationTolMode, getPose, getRotaryCompliance, getUnilateralBlockA, getUnilateralBlockB, getUnilateralConstraints, getUnilateralForceInA, getUnilateralForceInA, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, getXCA, getXCB, getXDB, getXFA, hasState, hasUnilateralConstraints, isActive, isDuplicatable, isEnabled, maxFrictionConstraintSets, numBilateralConstraints, numBodies, numUnilateralConstraints, scaleMass, setAuxState, setBilateralImpulses, setBodies, setBreakAccel, setBreakSpeed, setCompliance, setContactDistance, setDamping, setEnabled, setLinearCompliance, setPenetrationTol, setPenetrationTolMode, setRotaryCompliance, setUnilateralImpulses, setXDB, setXFA, skipAuxState, transformGeometry, transformGeometry, updateBodyStates, updateConstraints, updateForBodyPositionChange, updateUnilateralConstraints, zeroImpulses
getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, 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, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static PropertyList myProps
public SegmentedPlanarConnector()
public SegmentedPlanarConnector(RigidBody bodyA, Vector3d pCA, RigidBody bodyB, RigidTransform3d XPB, double[] segs)
public SegmentedPlanarConnector(RigidBody bodyA, Vector3d pCA, RigidTransform3d XPW, double[] segs)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RigidBodyConnector
public void setDefaultValues()
ModelComponentBase
public double getPlaneSize()
public void setPlaneSize(double len)
public double getPlanarActivation()
public void set(RigidBody bodyA, Vector3d pCA, RigidBody bodyB, RigidTransform3d XDB, double[] segs)
The plane 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.
bodyA
- first rigid bodypCA
- location of contact point relative to body AbodyB
- second rigid bodyXDB
- 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 XDW, double[] segs)
set
routine.bodyA
- rigid bodypCA
- location of contact point relative to bodyXDW
- transformation from frame D to world coordinatessegs
- segment boundaries, given as pairs of coordinates in the x-z plane.public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RigidBodyConnector
pmin
- minimum pointpmax
- maximum pointpublic RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
prerender
in class RenderableComponentBase
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class RenderableComponentBase
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
scaleDistance
in class RigidBodyConnector
s
- scaling factorpublic boolean isRenderNormalReversed()
public void setRenderNormalReversed(boolean reversed)
public boolean isUnilateral()
public void setUnilateral(boolean unilateral)
public ModelComponent 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 RigidBodyConnector