|
|||||||||
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.ConstrainerBase
artisynth.core.mechmodels.ParticleMeshConstraint
public class ParticleMeshConstraint
NOTE: This class is still under construction. scaleDistance(), transformGeometry(), and scan() and write() are unlikely to work properly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.HasAuxState |
---|
HasAuxState.StateContext |
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 | |
---|---|
ParticleMeshConstraint()
|
|
ParticleMeshConstraint(Particle p,
PolygonalMesh mesh)
|
|
ParticleMeshConstraint(Particle p,
PolygonalMesh mesh,
java.lang.String fileName)
|
Method Summary | |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
|
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
IntHolder changeCnt)
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by this object. |
void |
getAuxState(DataBuffer data)
Saves state information for this component by adding data to the supplied DataBuffer. |
int |
getBilateralImpulses(VectorNd lam,
int idx)
|
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
|
void |
getBilateralSizes(VectorNi sizes)
|
double |
getCompliance()
|
double |
getDamping()
|
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list. |
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data to the supplied data buffer. |
PolygonalMesh |
getMesh()
|
boolean |
getNagataInterpolation()
|
Particle |
getParticle()
|
double |
getPenetrationTol()
|
int |
getUnilateralImpulses(VectorNd the,
int idx)
|
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
|
void |
getUnilateralSizes(VectorNi sizes)
|
boolean |
isUnilateral()
|
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 |
setAuxState(DataBuffer data)
Restores the state for this component by reading from the supplied data buffer, starting at the current buffer offsets. |
int |
setBilateralImpulses(VectorNd lam,
double h,
int idx)
|
void |
setCompliance(double c)
|
void |
setDamping(double d)
|
void |
setDefaultValues()
Sets the attributes of this component to their default values. |
void |
setMesh(PolygonalMesh mesh,
java.lang.String fileName,
AffineTransform3dBase X)
|
void |
setNagataInterpolation(NagataInterpolator interp)
|
void |
setPenetrationTol(double tol)
|
void |
setUnilateral(boolean unilateral)
|
int |
setUnilateralImpulses(VectorNd the,
double h,
int idx)
|
void |
skipAuxState(DataBuffer data)
Skips over the state information for this component contained in the supplied data buffer, starting at the current buffer offsets. |
void |
transformGeometry(AffineTransform3dBase X)
Applies an affine transformation to the geometry of this object. |
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
Applies an affine transformation to the geometry of this object. |
void |
updateBounds(Point3d min,
Point3d max)
Update the minimum and maximum points for this object. |
double |
updateConstraints(double t,
int flags)
|
void |
zeroImpulses()
|
Methods inherited from class artisynth.core.mechmodels.ConstrainerBase |
---|
addFrictionConstraints, advanceAuxState, hasState, maxFrictionConstraintSets |
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
---|
copy, createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps, updateRenderProps |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, 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, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, 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 ParticleMeshConstraint()
public ParticleMeshConstraint(Particle p, PolygonalMesh mesh)
public ParticleMeshConstraint(Particle p, PolygonalMesh mesh, java.lang.String fileName)
Method Detail |
---|
public boolean getNagataInterpolation()
public void setNagataInterpolation(NagataInterpolator interp)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public void setDefaultValues()
ModelComponentBase
public double getDamping()
public void setDamping(double d)
public double getCompliance()
public void setCompliance(double c)
public double getPenetrationTol()
public void setPenetrationTol(double tol)
public boolean isUnilateral()
public void setUnilateral(boolean unilateral)
public void setMesh(PolygonalMesh mesh, java.lang.String fileName, AffineTransform3dBase X)
public PolygonalMesh getMesh()
public Particle getParticle()
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface Constrainer
getBilateralSizes
in class ConstrainerBase
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb, IntHolder changeCnt)
addBilateralConstraints
in interface Constrainer
addBilateralConstraints
in class ConstrainerBase
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface Constrainer
getBilateralInfo
in class ConstrainerBase
public int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses
in interface Constrainer
setBilateralImpulses
in class ConstrainerBase
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface Constrainer
getBilateralImpulses
in class ConstrainerBase
public void zeroImpulses()
zeroImpulses
in interface Constrainer
zeroImpulses
in class ConstrainerBase
public void getUnilateralSizes(VectorNi sizes)
getUnilateralSizes
in interface Constrainer
getUnilateralSizes
in class ConstrainerBase
public int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu, IntHolder changeCnt)
addUnilateralConstraints
in interface Constrainer
addUnilateralConstraints
in class ConstrainerBase
public int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
getUnilateralInfo
in interface Constrainer
getUnilateralInfo
in class ConstrainerBase
public int getUnilateralImpulses(VectorNd the, int idx)
getUnilateralImpulses
in interface Constrainer
getUnilateralImpulses
in class ConstrainerBase
public int setUnilateralImpulses(VectorNd the, double h, int idx)
setUnilateralImpulses
in interface Constrainer
setUnilateralImpulses
in class ConstrainerBase
public double updateConstraints(double t, int flags)
updateConstraints
in interface Constrainer
updateConstraints
in class ConstrainerBase
public void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appendedpublic void updateBounds(Point3d min, Point3d max)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableComponentBase
min
- minimum pointmax
- 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 scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void transformGeometry(AffineTransform3dBase X)
TransformableGeometry
transformGeometry (X, this, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformationpublic void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, 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 transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.public void skipAuxState(DataBuffer data)
skipAuxState
in interface HasAuxState
skipAuxState
in class ConstrainerBase
data
- buffer containing the state informationpublic void getAuxState(DataBuffer data)
HasAuxState
getAuxState
in interface HasAuxState
getAuxState
in class ConstrainerBase
data
- buffer for storing the state values.public void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
HasAuxState
If oldData
is non-null, then this contains
previously stored initial state information (starting at its current
buffer offsets), which should be stored into
newData
in place of the current component state data.
This may only be partially possible if the component's state structure
has changed since oldData
was written.
getInitialAuxState
in interface HasAuxState
getInitialAuxState
in class ConstrainerBase
newData
- buffer for storing the state values.oldData
- if non-null, contains old state information that should be
written into newData
in place of the current state
information.public void setAuxState(DataBuffer data)
HasAuxState
setAuxState
in interface HasAuxState
setAuxState
in class ConstrainerBase
data
- buffer containing the state information
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |