public class CollisionHandler extends ConstrainerBase implements HasRenderProps, Renderable
HasAuxState.StateContextModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
static boolean |
computeTimings |
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTRANSPARENT, TWO_DIMENSIONAL| Constructor and Description |
|---|
CollisionHandler(CollisionManager manager) |
CollisionHandler(CollisionManager manager,
CollidableBody col0,
CollidableBody col1,
CollisionBehavior behav) |
| Modifier and Type | Method and Description |
|---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb) |
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf) |
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu) |
static boolean |
attachedNearContact(ContactPoint cpnt,
Collidable collidable,
java.util.Set<Vertex3d> attachedVertices) |
void |
clearContactActivity() |
double |
computeCollisionConstraints(ContactInfo cinfo) |
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.
|
void |
getAuxState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer.
|
void |
getBilateralConstraints(java.util.List<ContactConstraint> list) |
int |
getBilateralImpulses(VectorNd lam,
int idx) |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx) |
void |
getBilateralSizes(VectorNi sizes) |
int |
getBodyIndex(Collidable col)
Returns 0 if a specified collidable is associated with this handler's
first collidable body, 1 if it is associated with the second body,
and -1 if it is associated with neither.
|
CollidableBody |
getCollidable(int cidx) |
CollidablePair |
getCollidablePair() |
void |
getConstrainedComponents(java.util.HashSet<DynamicComponent> set) |
void |
getConstrainedComponents(java.util.List<DynamicComponent> list) |
ContactConstraint |
getContact(java.util.HashMap<ContactPoint,ContactConstraint> contacts,
ContactPoint cpnt0,
ContactPoint cpnt1,
boolean hashUsingFace,
double distance) |
CollisionHandler |
getDown()
Returns next handler in a column of a CollisionHandlerTable.
|
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data
to the supplied data buffer.
|
ContactInfo |
getLastContactInfo() |
CollisionHandler |
getNext()
Returns next handler in a row of a CollisionHandlerTable.
|
CollidableBody |
getOtherCollidable(CollidableBody cb) |
ContactInfo |
getRenderContactInfo()
Get most recent ContactInfo info, for rendering purposes.
|
RenderProps |
getRenderProps()
Returns the render properities for this object.
|
int |
getUnilateralImpulses(VectorNd the,
int idx) |
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx) |
void |
getUnilateralSizes(VectorNi sizes) |
int |
maxFrictionConstraintSets() |
int |
numBilateralConstraints() |
int |
numUnilateralConstraints() |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
prerender(RenderProps props) |
void |
removeInactiveContacts() |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer. |
void |
render(Renderer 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 |
setDown(CollisionHandler down)
Sets next handler in a column of a CollisionHandlerTable.
|
void |
setNext(CollisionHandler next)
Sets next handler in a row of a CollisionHandlerTable.
|
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 |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
double |
updateConstraints(double t,
int flags) |
void |
zeroImpulses() |
advanceAuxState, hasStatecopy, getRenderHints, getSelection, isSelectable, numSelectionQueriesNeeded, setRenderProps, updateRenderPropscheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isConnectedToHierarchy, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSelection, isSelectable, numSelectionQueriesNeededgetRenderHintssetRenderPropsconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writepublic static boolean computeTimings
public static PropertyList myProps
public CollisionHandler(CollisionManager manager)
public CollisionHandler(CollisionManager manager, CollidableBody col0, CollidableBody col1, CollisionBehavior behav)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class ModelComponentBasepublic RenderProps getRenderProps()
HasRenderPropsgetRenderProps in interface HasRenderPropsgetRenderProps in class RenderableComponentBasepublic ContactInfo getLastContactInfo()
public static boolean attachedNearContact(ContactPoint cpnt, Collidable collidable, java.util.Set<Vertex3d> attachedVertices)
public ContactConstraint getContact(java.util.HashMap<ContactPoint,ContactConstraint> contacts, ContactPoint cpnt0, ContactPoint cpnt1, boolean hashUsingFace, double distance)
public double computeCollisionConstraints(ContactInfo cinfo)
public CollidableBody getCollidable(int cidx)
public int getBodyIndex(Collidable col)
col - collidable to inspectcol.public CollidableBody getOtherCollidable(CollidableBody cb)
public CollidablePair getCollidablePair()
public CollisionHandler getNext()
public void setNext(CollisionHandler next)
next - next handler to add to the rowpublic CollisionHandler getDown()
public void setDown(CollisionHandler down)
down - next handler to add to the columnpublic void clearContactActivity()
public void removeInactiveContacts()
public double updateConstraints(double t,
int flags)
updateConstraints in interface ConstrainerupdateConstraints in class ConstrainerBasepublic void getConstrainedComponents(java.util.List<DynamicComponent> list)
getConstrainedComponents in interface ConstrainergetConstrainedComponents in class ConstrainerBasepublic void getConstrainedComponents(java.util.HashSet<DynamicComponent> set)
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes in interface ConstrainergetBilateralSizes in class ConstrainerBasepublic void getUnilateralSizes(VectorNi sizes)
getUnilateralSizes in interface ConstrainergetUnilateralSizes in class ConstrainerBasepublic void getBilateralConstraints(java.util.List<ContactConstraint> list)
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
addBilateralConstraints in interface ConstraineraddBilateralConstraints in class ConstrainerBasepublic int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo in interface ConstrainergetBilateralInfo in class ConstrainerBasepublic int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses in interface ConstrainersetBilateralImpulses in class ConstrainerBasepublic int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses in interface ConstrainergetBilateralImpulses in class ConstrainerBasepublic void zeroImpulses()
zeroImpulses in interface ConstrainerzeroImpulses in class ConstrainerBasepublic int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu)
addUnilateralConstraints in interface ConstraineraddUnilateralConstraints in class ConstrainerBasepublic int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
getUnilateralInfo in interface ConstrainergetUnilateralInfo in class ConstrainerBasepublic int setUnilateralImpulses(VectorNd the, double h, int idx)
setUnilateralImpulses in interface ConstrainersetUnilateralImpulses in class ConstrainerBasepublic int getUnilateralImpulses(VectorNd the, int idx)
getUnilateralImpulses in interface ConstrainergetUnilateralImpulses in class ConstrainerBasepublic int maxFrictionConstraintSets()
maxFrictionConstraintSets in interface ConstrainermaxFrictionConstraintSets in class ConstrainerBasepublic int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints in interface ConstraineraddFrictionConstraints in class ConstrainerBasepublic int numBilateralConstraints()
public int numUnilateralConstraints()
public void skipAuxState(DataBuffer data)
skipAuxState in interface HasAuxStateskipAuxState in class ConstrainerBasedata - buffer containing the state informationpublic void getAuxState(DataBuffer data)
getAuxState in interface HasAuxStategetAuxState in class ConstrainerBasedata - buffer for storing the state values.public void setAuxState(DataBuffer data)
setAuxState in interface HasAuxStatesetAuxState in class ConstrainerBasedata - buffer containing the state informationpublic 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 HasAuxStategetInitialAuxState in class ConstrainerBasenewData - 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 prerender(RenderProps props)
public void prerender(RenderList list)
IsRenderablelist.addIfVisible (obj);
for each of the objects in question.prerender in interface IsRenderableprerender in class RenderableComponentBaselist - list of objects to be renderedpublic RenderProps createRenderProps()
HasRenderPropscreateRenderProps in interface HasRenderPropscreateRenderProps in class RenderableComponentBasepublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class RenderableComponentBaserenderer - provides the functionality used to perform the rendering.flags - flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT and
Renderer.SORT_FACES.public void render(Renderer renderer, RenderProps props, int flags)
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class RenderableComponentBasepmin - minimum pointpmax - maximum pointpublic ContactInfo getRenderContactInfo()