artisynth.core.mechmodels
Class PlanarConnector
java.lang.Object
artisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.mechmodels.RigidBodyConnector
artisynth.core.mechmodels.PlanarConnector
- All Implemented Interfaces:
- Constrainer, HasAuxState, RigidBodyConstrainer, CopyableComponent, HasCoordinateFrame, ModelComponent, RenderableComponent, ScalableUnits, TransformableGeometry, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable
- Direct Known Subclasses:
- MarkerPlanarConnector
public class PlanarConnector
- extends RigidBodyConnector
- implements CopyableComponent
Auxiliary class used to solve constrained rigid body problems.
Method Summary |
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 |
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 XPB)
Sets this PlanarConnectorX to connect two rigid bodies. |
void |
set(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d XPW)
Sets this PlanarConnectorX 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 |
setUnilateral(boolean unilateral)
|
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object. |
Methods inherited from class artisynth.core.mechmodels.RigidBodyConnector |
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 |
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, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, 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.ModelComponent |
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
myProps
public static PropertyList myProps
PlanarConnector
public PlanarConnector()
PlanarConnector
public PlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d XPB)
PlanarConnector
public PlanarConnector(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d XPW)
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 RigidBodyConnector
- Returns:
- static information for all exported properties
setDefaultValues
public void setDefaultValues()
- Description copied from class:
ModelComponentBase
- Sets the attributes of this component to their default values.
getPlaneSize
public double getPlaneSize()
setPlaneSize
public void setPlaneSize(double len)
set
public void set(RigidBody bodyA,
Vector3d pCA,
RigidBody bodyB,
RigidTransform3d XPB)
- Sets this PlanarConnectorX to connect two rigid bodies. The first body (A)
is the one in which the contact point is fixed, while the second body (B)
is the one in which the plane is fixed.
- Parameters:
bodyA
- first rigid bodypCA
- location of contact point relative to body AbodyB
- second rigid bodyXPB
- plane coordinate frame with respect to body B. The plane normal is given
by the z axis of this frame, and the plane's origin is given by XPB.p
set
public void set(RigidBody bodyA,
Vector3d pCA,
RigidTransform3d XPW)
- Sets this PlanarConnectorX to connect a rigid body with the world frame.
The contact point is fixed in the body frame, while the plane is fixed in
the world frame.
- Parameters:
bodyA
- rigid bodypCA
- location of contact point relative to bodyXPW
- plane coordinate frame with respect to the world. The plane normal is
given by the z axis of this frame, and the plane's origin is given by
XPB.p
updateBounds
public void updateBounds(Point3d pmin,
Point3d pmax)
- Description copied from interface:
GLRenderable
- 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 GLRenderable
- Overrides:
updateBounds
in class RigidBodyConnector
- Parameters:
pmin
- minimum pointpmax
- maximum point
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:
GLRenderable
- Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
- Specified by:
prerender
in interface GLRenderable
- Overrides:
prerender
in class RenderableComponentBase
render
public void render(GLRenderer renderer,
int flags)
- Description copied from interface:
GLRenderable
- Render this object using Open GL via the JOGL.
- Specified by:
render
in interface GLRenderable
- Specified by:
render
in class RenderableComponentBase
- Parameters:
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
.
scaleDistance
public void scaleDistance(double s)
- Description copied from interface:
ScalableUnits
- Scales all distance coordinates.
- Specified by:
scaleDistance
in interface ScalableUnits
- Overrides:
scaleDistance
in class RigidBodyConnector
- Parameters:
s
- scaling factor
getPlanarActivation
public double getPlanarActivation()
isUnilateral
public boolean isUnilateral()
setUnilateral
public void setUnilateral(boolean unilateral)
copy
public ModelComponent copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
- Description copied from interface:
CopyableComponent
- Create a copy of this component. If
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
.
- Specified by:
copy
in interface CopyableComponent
- Overrides:
copy
in class RigidBodyConnector