espresso3d.engine.collision.base
Interface E3DCollisionDetectableObject

All Known Implementing Classes:
E3DActor, E3DSprite

public interface E3DCollisionDetectableObject

Author:
Curt For an object to be collision detectable, it must implement this interface

Method Summary
 E3DBoundingObject getBoundingObject()
          Return the bounding object or null for bounding collision tests
 E3DEngine getEngine()
          Must return the engine the object is in
 E3DVector3F getPosition()
          Used to get the position of t he object
 E3DSector getSector()
          Must return the sector the object is in
 java.util.ArrayList getTriangleList()
          Must return an ArrayList of E3DTriangles that make up the geometry of the object.
 java.util.ArrayList getUniqueVertexList()
          This will ideally only return unique vertices that the object has.
 boolean isCollideable()
          Return true if the collision detector should include this when checking for collisions of other objects into this.
 void onCollisionActor(E3DCollision collision)
          This is called when another actor collides with this object
 void onCollisionSprite(E3DCollision collision)
          This is called when a sprite collides with this object
 

Method Detail

getEngine

public E3DEngine getEngine()
Must return the engine the object is in

Returns:

getSector

public E3DSector getSector()
Must return the sector the object is in

Returns:

getBoundingObject

public E3DBoundingObject getBoundingObject()
Return the bounding object or null for bounding collision tests

Returns:

getPosition

public E3DVector3F getPosition()
Used to get the position of t he object

Returns:

onCollisionActor

public void onCollisionActor(E3DCollision collision)
This is called when another actor collides with this object

Parameters:
collision -

onCollisionSprite

public void onCollisionSprite(E3DCollision collision)
This is called when a sprite collides with this object

Parameters:
collision -

getTriangleList

public java.util.ArrayList getTriangleList()
Must return an ArrayList of E3DTriangles that make up the geometry of the object. This is used for direct triangle collisions

Returns:

getUniqueVertexList

public java.util.ArrayList getUniqueVertexList()
This will ideally only return unique vertices that the object has.

Returns:

isCollideable

public boolean isCollideable()
Return true if the collision detector should include this when checking for collisions of other objects into this. Otherwise, false and it will be ignored in other object's collision detection This does not automatically make this stop causing collisions with their own movement (in all cases except particles, this can only be triggered by the user). it just keeps the object from being run into by other object's movement.

Returns: