|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimplePortrayal2D
sim.physics2D.physicalObject.PhysicalObject2D
public abstract class PhysicalObject2D
PhysicalObject2D is an abstract class representing objects that can be operated on by PhysicsEngine2D
Field Summary | |
---|---|
protected double |
coefficientOfRestitution
|
int |
index
|
protected PhysicsState |
physicsState
|
protected Shape |
shape
|
Constructor Summary | |
---|---|
PhysicalObject2D()
|
Method Summary | |
---|---|
void |
draw(java.lang.Object object,
java.awt.Graphics2D graphics,
DrawInfo2D info)
Display the object |
abstract double |
getAngularVelocity()
How fast the object is rotating in radians per second. |
double |
getCoefficientOfRestitution()
Represents the elasticity of an object 1 is perfectly elastic and 0 is perfectly inelastic. |
int |
getIndex()
Returns the object's index, which uniquely identifies the object and determines where its state variables are kept in the state vectors and matrices. |
abstract double |
getMassInverse()
|
abstract double |
getMassMomentOfInertiaInverse()
|
Angle |
getOrientation()
Returns an object's current orientation |
Double2D |
getPosition()
Returns an object's current position |
Shape |
getShape()
Returns an object's associated shape |
abstract Double2D |
getVelocity()
|
int |
handleCollision(PhysicalObject2D other,
Double2D colPoint)
Provides a default implementation for the function used by the collision detection engine to notify an object when it has collided with another object. |
abstract void |
resetLastPose()
|
abstract void |
restorePose()
|
void |
setCoefficientOfRestitution(double coefficientOfRestitution)
Represents the elasticity of an object 1 is perfectly elastic and 0 is perfectly inelastic. |
void |
setIndex(int index)
|
void |
setPose(Double2D position,
Angle orientation)
Set the pose of the object |
abstract void |
updatePose(double percent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int index
protected Shape shape
protected PhysicsState physicsState
protected double coefficientOfRestitution
Constructor Detail |
---|
public PhysicalObject2D()
Method Detail |
---|
public int getIndex()
public void setIndex(int index)
public Shape getShape()
public Double2D getPosition()
public Angle getOrientation()
public double getCoefficientOfRestitution()
public void setCoefficientOfRestitution(double coefficientOfRestitution)
public void draw(java.lang.Object object, java.awt.Graphics2D graphics, DrawInfo2D info)
public void setPose(Double2D position, Angle orientation)
public abstract Double2D getVelocity()
public abstract double getAngularVelocity()
public int handleCollision(PhysicalObject2D other, Double2D colPoint)
public abstract void resetLastPose()
public abstract void updatePose(double percent)
public abstract void restorePose()
public abstract double getMassInverse()
public abstract double getMassMomentOfInertiaInverse()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |