org.starhope.appius.physica
Interface Collidable

All Known Implementing Classes:
AbstractNonPlayerCharacter, CollisionObject, Ejecta, GeneralUser, Particle, Plebeian, Projectile, QuestItemExchanger, User

public interface Collidable

Author:
ewinkelman

Method Summary
 Coord2D getCenterOfMass()
          Gets the object's current center of mass in world coordinates
 PolygonPrimitive<?> getCollisionBounds()
          Gets the collision boundaries for the object
 long getEndMovementTime(long currentTime)
           
 double getMass()
          Gets the mass of the collidable object
 long getStartMovementTime()
           
 Vector2D getVelocity()
          Gets the object's current velocity
 void setCenterOfMass(Coord2D com)
          Sets the object's new center of mass in world space coordinates (i.e.
 void setVelocity(Vector2D velocity)
          Sets the object's new velocity
 

Method Detail

getCenterOfMass

Coord2D getCenterOfMass()
Gets the object's current center of mass in world coordinates

Returns:
A 2D point representing the center of mass

getCollisionBounds

PolygonPrimitive<?> getCollisionBounds()
Gets the collision boundaries for the object

Returns:
A polygon outlining the boundaries of the object

getEndMovementTime

long getEndMovementTime(long currentTime)
Parameters:
currentTime - The current time
Returns:
the time the object will stop moving

getMass

double getMass()
Gets the mass of the collidable object

Returns:
Mass

getStartMovementTime

long getStartMovementTime()
Returns:
the time the object started moving

getVelocity

Vector2D getVelocity()
Gets the object's current velocity

Returns:
A 2D velocity vector

setCenterOfMass

void setCenterOfMass(Coord2D com)
Sets the object's new center of mass in world space coordinates (i.e. this moves the object and doesn't reposition the relative location of the center of mass with respect to its bounds)

Parameters:
com - New center of mass in world coordinates

setVelocity

void setVelocity(Vector2D velocity)
Sets the object's new velocity

Parameters:
velocity - WRITEME