sim.physics2D.physicalObject
Class StationaryObject2D

java.lang.Object
  extended by SimplePortrayal2D
      extended by sim.physics2D.physicalObject.PhysicalObject2D
          extended by sim.physics2D.physicalObject.StationaryObject2D

public abstract class StationaryObject2D
extends PhysicalObject2D

StationaryObject2D represents a physical object that can't move. Stationary objects have infinite mass.


Field Summary
 
Fields inherited from class sim.physics2D.physicalObject.PhysicalObject2D
coefficientOfRestitution, index, shape
 
Constructor Summary
StationaryObject2D()
           
 
Method Summary
 double getAngularVelocity()
          How fast the object is rotating in radians per second.
 double getMassInverse()
          1 / mass.
 double getMassMomentOfInertiaInverse()
          1 / mass moment of inertia.
 Double2D getVelocity()
          Returns the velocity of the object.
 void resetLastPose()
           
 void restorePose()
           
 void setShape(Shape shape)
          Set the shape of the object which determines how it is displayed and when it is colliding with another object
 void updatePose(double percent)
           
 
Methods inherited from class sim.physics2D.physicalObject.PhysicalObject2D
draw, getCoefficientOfRestitution, getIndex, getOrientation, getPosition, getShape, handleCollision, setCoefficientOfRestitution, setIndex, setPose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationaryObject2D

public StationaryObject2D()
Method Detail

setShape

public void setShape(Shape shape)
Set the shape of the object which determines how it is displayed and when it is colliding with another object


getVelocity

public Double2D getVelocity()
Returns the velocity of the object. Since this is a stationary object, it is always 0.

Specified by:
getVelocity in class PhysicalObject2D

getAngularVelocity

public double getAngularVelocity()
How fast the object is rotating in radians per second. A positive angular velocity means the object is rotating counter clockwise. Since this is a stationary object, it is always 0

Specified by:
getAngularVelocity in class PhysicalObject2D

getMassInverse

public double getMassInverse()
1 / mass. Used in collision response. Because a stationary object's mass is infinite, this always returns 0

Specified by:
getMassInverse in class PhysicalObject2D

getMassMomentOfInertiaInverse

public double getMassMomentOfInertiaInverse()
1 / mass moment of inertia. Used in collision response. Because a stationary object's mass moment of inertia is infinite, this always returns 0

Specified by:
getMassMomentOfInertiaInverse in class PhysicalObject2D

resetLastPose

public void resetLastPose()
Specified by:
resetLastPose in class PhysicalObject2D

updatePose

public void updatePose(double percent)
Specified by:
updatePose in class PhysicalObject2D

restorePose

public void restorePose()
Specified by:
restorePose in class PhysicalObject2D