public class CollisionBehavior
extends java.lang.Object
Constructor and Description |
---|
CollisionBehavior()
Creates a new CollisionBehavior with default values.
|
CollisionBehavior(boolean enabled,
double mu)
Creates a new CollisionBehavior with a specified enabling
and friction.
|
CollisionBehavior(CollisionBehavior b)
Creates a new CollisionBehavior whose values are copied from
an existing one.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(CollisionBehavior b)
Returns true if this behavior equals another.
|
boolean |
equals(java.lang.Object obj) |
double |
getFriction()
Gets the friction associated with this behavior.
|
CollidablePair |
getPair()
Returns the collision pair associated with this behavior.
|
boolean |
isEnabled()
Returns true if collisions are enabled in this behavior.
|
void |
set(CollisionBehavior v) |
void |
setEnabled(boolean enabled)
Enables or disabled collisions for this behavior.
|
void |
setFriction(double mu)
Sets the friction coefficent associated with this behavior.
|
java.lang.String |
toString() |
public CollisionBehavior()
public CollisionBehavior(CollisionBehavior b)
b
- behavior to copypublic CollisionBehavior(boolean enabled, double mu)
enabled
- true if collisions are enabledmu
- friction coefficientpublic double getFriction()
public void setFriction(double mu)
mu
- friction associated with this behaviorpublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- if true, enables collisionspublic boolean equals(CollisionBehavior b)
getPair
are not considered in this comparision.b
- behavior to compare withpublic void set(CollisionBehavior v)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public CollidablePair getPair()