|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.mechmodels.SoftPlaneCollider
public class SoftPlaneCollider
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary | |
---|---|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Fields inherited from interface artisynth.core.util.TransformableGeometry |
---|
ARTICULATED, SIMULATING |
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
SoftPlaneCollider()
|
|
SoftPlaneCollider(java.lang.String name,
Vector3d normal,
Point3d center,
double k,
double d)
|
Method Summary | |
---|---|
void |
addMechModel(MechModel ms)
|
void |
addPosJacobian(SparseNumberedBlockMatrix M,
double h)
Scales the components of the position Jacobian associated with this force effector and adds it to the supplied solve matrix M. |
void |
addSolveBlocks(SparseNumberedBlockMatrix M)
Adds any needed blocks to a solve matrix in order to accomodate the Jacobian terms associated with this force effector. |
void |
addVelJacobian(SparseNumberedBlockMatrix M,
double h)
Scales the components of the velocity Jacobian associated with this force effector and adds it to the supplied solve matrix M. |
void |
applyForces(double t)
Adds forces to the components affected by this force effector at a particular time. |
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. |
Point3d |
getCenter()
|
double |
getDamping()
|
int |
getJacobianType()
Returns a code indicating the matrix type that results when the Jacobian terms of this force effector are added to the solve matrix. |
Vector3d |
getNormal()
|
double |
getSize()
|
double |
getStiffness()
|
void |
removeMechModel(MechModel ms)
|
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL. |
void |
scaleDistance(double s)
Scales all distance coordinates. |
void |
scaleMass(double s)
Scales all mass units. |
void |
setCenter(Point3d center)
|
void |
setDamping(double damping)
|
void |
setNormal(Vector3d normal)
|
void |
setRenderPosition(Point3d center,
double size)
|
void |
setSize(double size)
|
void |
setStiffness(double stiffness)
|
void |
transformGeometry(AffineTransform3dBase X)
Applies an affine transformation to the geometry of this object. |
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topComponent,
int flags)
Applies an affine transformation to the geometry of this object. |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object. |
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
---|
copy, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps, updateRenderProps |
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 |
Methods inherited from interface maspack.properties.HasProperties |
---|
getProperty |
Methods inherited from interface maspack.properties.HierarchyNode |
---|
getChildren, hasChildren |
Methods inherited from interface maspack.util.Scannable |
---|
isWritable, write |
Field Detail |
---|
public static PropertyList myProps
Constructor Detail |
---|
public SoftPlaneCollider()
public SoftPlaneCollider(java.lang.String name, Vector3d normal, Point3d center, double k, double d)
Method Detail |
---|
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
in class RenderableComponentBase
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public void addMechModel(MechModel ms)
public void removeMechModel(MechModel ms)
public void setRenderPosition(Point3d center, double size)
public void setCenter(Point3d center)
public Point3d getCenter()
public void setNormal(Vector3d normal)
public Vector3d getNormal()
public void setSize(double size)
public double getSize()
public void setStiffness(double stiffness)
public double getStiffness()
public void setDamping(double damping)
public double getDamping()
public void applyForces(double t)
ForceEffector
applyForces
in interface ForceEffector
t
- time (seconds)public void addSolveBlocks(SparseNumberedBlockMatrix M)
ForceEffector
getSolveIndex
) for all dynamic or attached components affected by this
force effector.
addSolveBlocks
in interface ForceEffector
M
- solve matrix to which blocks should be addedpublic void addVelJacobian(SparseNumberedBlockMatrix M, double h)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addVelJacobian
in interface ForceEffector
M
- solve matrix to which scaled velocity Jacobian is to be addedh
- scaling factor for velocity Jacobianpublic void addPosJacobian(SparseNumberedBlockMatrix M, double h)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addPosJacobian
in interface ForceEffector
M
- solve matrix to which scaled position Jacobian is to be addedh
- scaling factor for position Jacobianpublic int getJacobianType()
ForceEffector
Matrix.SYMMETRIC
or Matrix.POSITIVE_DEFINITE
. The former should be set if adding the Jacobian
terms preserves symmetry, and the latter should be set if positive
definiteness if preserved. Both should be set if there is no Jacobian for
this effector (i.e., the Jacobian methods are not implemented). Matrix
types from all the force effectors are logically and-ed together to
determine the type for the entire solve matrix.
getJacobianType
in interface ForceEffector
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableComponentBase
pmin
- minimum pointpmax
- maximum pointpublic 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 transformGeometry(AffineTransform3dBase X)
TransformableGeometry
transformGeometry (X, this, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformationpublic void transformGeometry(AffineTransform3dBase X, TransformableGeometry topComponent, int flags)
TransformableGeometry
topComponent
should be the component for which the method
was initially invoked. The variable flags
provides
information about the context in which the transformation is
being applied. At present, the available flags are
TransformableGeometry.SIMULATING
and TransformableGeometry.ARTICULATED
.
transformGeometry
in interface TransformableGeometry
X
- affine transformationtopComponent
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |