public interface CollidableBody extends Collidable
Collidable.Collidability, Collidable.Group
ModelComponent.NavpanelVisibility
All, AllBodies, Deformable, Rigid, Self
Modifier and Type | Method and Description |
---|---|
boolean |
allowCollision(ContactPoint cpnt,
Collidable other,
java.util.Set<Vertex3d> attachedVertices)
Returns
true if a collision between this Collidable
and other should be allowed for the contact point
cpnt . |
void |
collectVertexMasters(java.util.List<ContactMaster> mlist,
Vertex3d vtx)
Collects the contact masters for a particular mesh vertex.
|
boolean |
containsContactMaster(CollidableDynamicComponent comp)
Returns true if this Collidable contains a specified contact master
component.
|
int |
getCollidableIndex() |
PolygonalMesh |
getCollisionMesh()
Returns the mesh that should be used for computing collisions, or
null if there is no such mesh. |
DistanceGridComp |
getDistanceGridComp()
Returns a
DistanceGridComp object that in turn contains
a signed distance grid that can be used with a SignedDistanceCollider,
or null if this Collidable
does not support a signed distance grid (i.e., if
hasDistanceGrid() returns false ). |
double |
getMass()
Returns the mass of the body.
|
boolean |
hasDistanceGrid()
Returns
true if this Collidable supports a signed
distance grid that can be used with a SignedDistanceCollider. |
boolean |
hasInvariantMasters()
Queries whether or not the contact masters for a particular collision
point are invariant across all contacts.
|
void |
setCollidableIndex(int idx) |
getCollidable, getCollidableAncestor, isCompound, isDeformable
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
double getMass()
PolygonalMesh getCollisionMesh()
null
if there is no such mesh. If this method
returns null
, then no collisions will
be performed for this collidable, regardless any default or explicit
collision behaviors that have been arranged by the system.void collectVertexMasters(java.util.List<ContactMaster> mlist, Vertex3d vtx)
mlist
. The vertex
should be a vertex of the mesh returned by getCollisionMesh()
.
If hasInvariantMasters()
returns true
, then the
contact masters will not depend on vtx
.
mlist
- collected master componentsvtx
- vertex for which the master components are requestedboolean hasInvariantMasters()
A collidable that has invariant contact masters typically has fewer dynamic degrees of freedom compared to one that does not.
true
if contact masters are constantboolean containsContactMaster(CollidableDynamicComponent comp)
comp
- component to test fortrue
if comp
is contained in
this Collidableboolean allowCollision(ContactPoint cpnt, Collidable other, java.util.Set<Vertex3d> attachedVertices)
true
if a collision between this Collidable
and other
should be allowed for the contact point
cpnt
. In making this decision, this method may
refer to attachedVertices
, which supplies a list
of vertices on this Collidable which are attached in some way
to the other Collidable.cpnt
- contact point being testedother
- opposing collidableattachedVertices
- list of vertices attached to other
.true
if the collision should be allowedint getCollidableIndex()
void setCollidableIndex(int idx)
boolean hasDistanceGrid()
true
if this Collidable supports a signed
distance grid that can be used with a SignedDistanceCollider. At
present, this will only be true for non-deformable bodies.true
if this Collidable supports a signed
distance gridDistanceGridComp getDistanceGridComp()
DistanceGridComp
object that in turn contains
a signed distance grid that can be used with a SignedDistanceCollider,
or null
if this Collidable
does not support a signed distance grid (i.e., if
hasDistanceGrid()
returns false
).