artisynth.core.mechmodels
Class ParticlePlaneConstraint
java.lang.Object
artisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.mechmodels.ConstrainerBase
artisynth.core.mechmodels.ParticlePlaneConstraint
- All Implemented Interfaces:
- Constrainer, HasAuxState, ModelComponent, RenderableComponent, ScalableUnits, TransformableGeometry, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable
public class ParticlePlaneConstraint
- extends ConstrainerBase
- implements ScalableUnits, TransformableGeometry
Method Summary |
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
|
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
double t)
|
int |
getBilateralImpulses(VectorNd lam,
int idx)
|
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
|
void |
getBilateralSizes(VectorNi sizes)
|
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list. |
Particle |
getParticle()
|
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
|
void |
getUnilateralSizes(VectorNi sizes)
|
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. |
int |
setBilateralImpulses(VectorNd lam,
double h,
int idx)
|
int |
setUnilateralImpulses(VectorNd the,
double h,
int idx)
|
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. |
double |
updateConstraints(double t,
int flags)
|
void |
zeroImpulses()
|
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
copy, createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps, updateBounds, updateRenderProps |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getAllPropertyInfo, 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 |
ParticlePlaneConstraint
public ParticlePlaneConstraint()
ParticlePlaneConstraint
public ParticlePlaneConstraint(Particle p,
Plane plane)
getParticle
public Particle getParticle()
getBilateralSizes
public void getBilateralSizes(VectorNi sizes)
- Specified by:
getBilateralSizes
in interface Constrainer
- Specified by:
getBilateralSizes
in class ConstrainerBase
addBilateralConstraints
public int addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
- Specified by:
addBilateralConstraints
in interface Constrainer
- Specified by:
addBilateralConstraints
in class ConstrainerBase
getBilateralInfo
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
- Specified by:
getBilateralInfo
in interface Constrainer
- Specified by:
getBilateralInfo
in class ConstrainerBase
setBilateralImpulses
public int setBilateralImpulses(VectorNd lam,
double h,
int idx)
- Specified by:
setBilateralImpulses
in interface Constrainer
- Specified by:
setBilateralImpulses
in class ConstrainerBase
getBilateralImpulses
public int getBilateralImpulses(VectorNd lam,
int idx)
- Specified by:
getBilateralImpulses
in interface Constrainer
- Specified by:
getBilateralImpulses
in class ConstrainerBase
zeroImpulses
public void zeroImpulses()
- Specified by:
zeroImpulses
in interface Constrainer
- Specified by:
zeroImpulses
in class ConstrainerBase
getUnilateralSizes
public void getUnilateralSizes(VectorNi sizes)
- Specified by:
getUnilateralSizes
in interface Constrainer
- Overrides:
getUnilateralSizes
in class ConstrainerBase
addUnilateralConstraints
public int addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
double t)
getUnilateralInfo
public int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
- Specified by:
getUnilateralInfo
in interface Constrainer
- Overrides:
getUnilateralInfo
in class ConstrainerBase
setUnilateralImpulses
public int setUnilateralImpulses(VectorNd the,
double h,
int idx)
- Specified by:
setUnilateralImpulses
in interface Constrainer
- Overrides:
setUnilateralImpulses
in class ConstrainerBase
updateConstraints
public double updateConstraints(double t,
int flags)
- Specified by:
updateConstraints
in interface Constrainer
- Specified by:
updateConstraints
in class ConstrainerBase
getHardReferences
public void getHardReferences(java.util.List<ModelComponent> refs)
- Description copied from class:
ModelComponentBase
- Appends all hard references for this component to a list.
References are other components, outside of this component's
immediate ancestry, on which this component depends. For
example, an AxialSpring refers to two Point components as
for it's end points. A hard reference is one which
the referring component must have, and which if deleted, implies
that the referring component should be deleted too.
- Specified by:
getHardReferences
in interface ModelComponent
- Overrides:
getHardReferences
in class ModelComponentBase
- Parameters:
refs
- list to which hard references are appended
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
.
scaleMass
public void scaleMass(double s)
- Description copied from interface:
ScalableUnits
- Scales all mass units.
- Specified by:
scaleMass
in interface ScalableUnits
- Parameters:
s
- scaling factor
scaleDistance
public void scaleDistance(double s)
- Description copied from interface:
ScalableUnits
- Scales all distance coordinates.
- Specified by:
scaleDistance
in interface ScalableUnits
- Parameters:
s
- scaling factor
transformGeometry
public void transformGeometry(AffineTransform3dBase X)
- Description copied from interface:
TransformableGeometry
- Applies an affine transformation to the geometry of this object. This
method should be equivalent to
transformGeometry (X, this, 0);
- Specified by:
transformGeometry
in interface TransformableGeometry
- Parameters:
X
- affine transformation
transformGeometry
public void transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
- Description copied from interface:
TransformableGeometry
- Applies an affine transformation to the geometry of this object. If
recursively invoked within a component hierarchy, then
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
.
- Specified by:
transformGeometry
in interface TransformableGeometry
- Parameters:
X
- affine transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.