public class CollisionComponent extends ModelComponentBase
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
Constructor and Description |
---|
CollisionComponent() |
CollisionComponent(Collidable a,
Collidable b,
CollisionBehavior behavior) |
CollisionComponent(CollidablePair pair,
CollisionBehavior behavior) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalValues(CollisionComponent r)
Returns true if the settings of this collision component are
equal to the settings another.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
CollisionBehavior |
getBehavior()
Returns the behavior associated with this collision component.
|
Collidable |
getCollidableA() |
Collidable |
getCollidableB() |
double |
getFriction() |
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
CollidablePair |
getPair()
Returns the pair of Collidables associated with this collision component.
|
boolean |
isEnabled() |
void |
setBehavior(CollisionBehavior v) |
void |
setEnabled(boolean enabled) |
void |
setFriction(double mu) |
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences
public static PropertyList myProps
public CollisionComponent()
public CollisionComponent(Collidable a, Collidable b, CollisionBehavior behavior)
public CollisionComponent(CollidablePair pair, CollisionBehavior behavior)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public void setBehavior(CollisionBehavior v)
public CollisionBehavior getBehavior()
public CollidablePair getPair()
public double getFriction()
public void setFriction(double mu)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean equalValues(CollisionComponent r)
r
- component to testpublic void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
scan
and complete
enough to allow full reconstruction of the element.write
in interface Scannable
write
in class ModelComponentBase
pw
- stream for writing the elementfmt
- numeric formating informationref
- optional reference object which can be used for producing references to
other objectsjava.io.IOException
- if an I/O error occuredpublic void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appendedpublic Collidable getCollidableA()
public Collidable getCollidableB()