public class CollisionHandlerOld extends CollisionHandler implements Constrainer
HasAuxState.StateContext
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
myIgnoreRBForGS |
static boolean |
renderContactNormals |
computeTimings, doBodyFaceContact, myProps, reduceConstraints, useSignedDistanceCollider
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSLUCENT, TWO_DIMENSIONAL
Modifier and Type | Method and Description |
---|---|
void |
activateContact(FemContactConstraint cons,
double dist,
artisynth.core.mechmodels.CollisionHandlerOld.FemData data) |
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt) |
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf) |
void |
autoComputeCompliance(double acc,
double tol)
Automatically compute compliance and damping for a given
penetration tolerance and acceleration.
|
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
boolean |
equals(Collidable c0,
Collidable c1) |
boolean |
equals(java.lang.Object obj) |
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) |
Collidable |
getCollidable(int idx) |
Collidable |
getCollidable0() |
Collidable |
getCollidable1() |
double |
getCompliance() |
double |
getDamping() |
boolean |
getFemSubdivision() |
double |
getFriction()
Returns the coefficient of friction for this collision pair.
|
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data
to the supplied data buffer.
|
double |
getPenetrationTol() |
RigidBodyContact |
getRigidBodyContact() |
double |
getRigidPointTolerance() |
double |
getRigidRegionTolerance() |
boolean |
hasActiveContacts()
Checks if this collision handler has any active contact constraints
|
int |
hashCode() |
boolean |
isDrawIntersectionContours() |
boolean |
isDrawIntersectionFaces() |
boolean |
isDrawIntersectionPoints() |
boolean |
isRigidBodyPair()
Returns true if this collision pair is between two rigid bodies.
|
int |
maxFrictionConstraintSets() |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
double |
projectPosConstraints(double t)
Compute contacts and approximately correct interpenetrations for this
collision pair.
|
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
render(GLRenderer renderer,
RenderProps props,
int flags) |
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 |
setDrawIntersectionContours(boolean set) |
void |
setDrawIntersectionFaces(boolean set) |
void |
setDrawIntersectionPoints(boolean set) |
void |
setFemSubdivision(boolean enabled) |
void |
setFriction(double mu)
Sets the coeffcient of friction for this collision pair.
|
void |
setPenetrationTol(double tol) |
void |
setRigidPointTolerance(double tol) |
void |
setRigidRegionTolerance(double tol) |
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 |
structureOrActivityChanged()
Notifies this CollisionPair that the component structure or activity has
changes and so the constraint structures will need to be recomputed.
|
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
double |
updateConstraints(double t,
int flags) |
void |
updateFrictionConstraints() |
void |
zeroImpulses() |
getAllPropertyInfo, isReduceConstraints, setReduceConstraints
addUnilateralConstraints, advanceAuxState, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, hasState, setUnilateralImpulses
copy, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, 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
getClass, notify, notifyAll, toString, wait, wait, wait
addUnilateralConstraints, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, setUnilateralImpulses
getRenderProps, setRenderProps
getRenderHints
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static boolean myIgnoreRBForGS
public static boolean renderContactNormals
public void autoComputeCompliance(double acc, double tol)
autoComputeCompliance
in class CollisionHandler
acc
- accelerationtol
- desired penetration tolerancepublic void setRigidPointTolerance(double tol)
setRigidPointTolerance
in class CollisionHandler
public double getRigidPointTolerance()
getRigidPointTolerance
in class CollisionHandler
public void setRigidRegionTolerance(double tol)
setRigidRegionTolerance
in class CollisionHandler
public double getRigidRegionTolerance()
getRigidRegionTolerance
in class CollisionHandler
public boolean isRigidBodyPair()
public RigidBodyContact getRigidBodyContact()
public double getFriction()
getFriction
in class CollisionHandler
public void setFriction(double mu)
setFriction
in class CollisionHandler
public double getPenetrationTol()
getPenetrationTol
in class CollisionHandler
public void setPenetrationTol(double tol)
setPenetrationTol
in class CollisionHandler
public void setCompliance(double c)
setCompliance
in class CollisionHandler
public double getCompliance()
getCompliance
in class CollisionHandler
public void setDamping(double d)
setDamping
in class CollisionHandler
public double getDamping()
getDamping
in class CollisionHandler
public Collidable getCollidable0()
getCollidable0
in class CollisionHandler
public Collidable getCollidable1()
getCollidable1
in class CollisionHandler
public Collidable getCollidable(int idx)
getCollidable
in class CollisionHandler
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equals(Collidable c0, Collidable c1)
public int hashCode()
hashCode
in class java.lang.Object
public boolean getFemSubdivision()
public void setFemSubdivision(boolean enabled)
public void updateFrictionConstraints()
public double projectPosConstraints(double t)
This method currently handles only deformable-deformable and deformable-rigidBody collisions; rigidBody-rigidBody collisions are handled separately.
t
- current time (not currently used)public void activateContact(FemContactConstraint cons, double dist, artisynth.core.mechmodels.CollisionHandlerOld.FemData data)
public boolean hasActiveContacts()
CollisionHandler
hasActiveContacts
in class CollisionHandler
public void structureOrActivityChanged()
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 void zeroImpulses()
zeroImpulses
in interface Constrainer
zeroImpulses
in class ConstrainerBase
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface Constrainer
getBilateralImpulses
in class ConstrainerBase
public int maxFrictionConstraintSets()
maxFrictionConstraintSets
in interface Constrainer
maxFrictionConstraintSets
in class ConstrainerBase
public int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints
in interface Constrainer
addFrictionConstraints
in class ConstrainerBase
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
prerender
in class RenderableComponentBase
public RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
createRenderProps
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 render(GLRenderer renderer, RenderProps props, int flags)
render
in class CollisionHandler
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableComponentBase
pmin
- minimum pointpmax
- maximum pointpublic void skipAuxState(DataBuffer data)
skipAuxState
in interface HasAuxState
skipAuxState
in class ConstrainerBase
data
- buffer containing the state informationpublic void getAuxState(DataBuffer data)
getAuxState
in interface HasAuxState
getAuxState
in class ConstrainerBase
data
- buffer for storing the state values.public void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
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)
setAuxState
in interface HasAuxState
setAuxState
in class ConstrainerBase
data
- buffer containing the state informationpublic double updateConstraints(double t, int flags)
updateConstraints
in interface Constrainer
updateConstraints
in class ConstrainerBase
public void setDrawIntersectionContours(boolean set)
setDrawIntersectionContours
in class CollisionHandler
public boolean isDrawIntersectionContours()
isDrawIntersectionContours
in class CollisionHandler
public void setDrawIntersectionFaces(boolean set)
setDrawIntersectionFaces
in class CollisionHandler
public boolean isDrawIntersectionFaces()
isDrawIntersectionFaces
in class CollisionHandler
public void setDrawIntersectionPoints(boolean set)
setDrawIntersectionPoints
in class CollisionHandler
public boolean isDrawIntersectionPoints()
isDrawIntersectionPoints
in class CollisionHandler