espresso3d.engine.collision
Class E3DCollision

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.collision.E3DCollision

public class E3DCollision
extends E3DRenderable

Author:
espresso3d This is the object that is returned when a collision is detected that contains information about the collision.

Constructor Summary
E3DCollision(E3DCollision toCopy)
           
E3DCollision(E3DEngine engine)
           
 
Method Summary
 java.lang.Object getCollideeBoundingObject()
           
 E3DVector3F getCollideeCollisionNormal()
          This is only applicable for new collision detectors.
 E3DCollisionDetectableObject getCollideeObject()
           
 E3DVector3F getColliderCollisionNormal()
          Get the normal at the point of collision if available
 E3DSector getCollisionSector()
           
 E3DWorld getCollisionWorld()
           
 E3DVector3F getIntersectionPt()
           
 void render()
          To see a collision graphically, a collision object can be placed on the externalrenderable list of the engine.
 void setCollideeBoundingObject(java.lang.Object collideeBoundingObject)
           
 void setCollideeCollisionNormal(E3DVector3F collideeCollisionNormal)
          This is only applicable for new collision detectors.
 void setCollideeObject(E3DCollisionDetectableObject collideeObject)
           
 void setColliderCollisionNormal(E3DVector3F colliderCollisionNormal)
          Set the normal at the point of the collision
 void setCollisionSector(E3DSector collisionSector)
           
 void setCollisionWorld(E3DWorld collisionWorld)
           
 void setIntersectionPt(E3DVector3F intersectionPt)
           
 java.lang.String toString()
          Print out basic information regarding a collision
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
getBlendMode, getKey, getRenderMode, initCorrectGeometryRenderer, isKeyChanged, setBlendMode, setKeyChanged, setRenderMode
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

E3DCollision

public E3DCollision(E3DEngine engine)

E3DCollision

public E3DCollision(E3DCollision toCopy)
Method Detail

render

public void render()
To see a collision graphically, a collision object can be placed on the externalrenderable list of the engine. When rendered will this indicate collision area with red marker at the intersection point

Specified by:
render in class E3DRenderable

getCollisionSector

public E3DSector getCollisionSector()
Returns:
Returns the collisionSector.

setCollisionSector

public void setCollisionSector(E3DSector collisionSector)
Parameters:
collisionSector - The collisionSector to set.

getCollideeBoundingObject

public java.lang.Object getCollideeBoundingObject()
Returns:
Returns the type of object the sourceActor collided with. This will either be a Trangle, or it will be one of the bounding object types (use instanceof to determine which)

setCollideeBoundingObject

public void setCollideeBoundingObject(java.lang.Object collideeBoundingObject)

getCollisionWorld

public E3DWorld getCollisionWorld()
Returns:
Returns the collisionWorld.

setCollisionWorld

public void setCollisionWorld(E3DWorld collisionWorld)
Parameters:
collisionWorld - The collisionWorld to set.

toString

public java.lang.String toString()
Print out basic information regarding a collision


getIntersectionPt

public E3DVector3F getIntersectionPt()
Returns:
Returns the collisionPt.

setIntersectionPt

public void setIntersectionPt(E3DVector3F intersectionPt)

getColliderCollisionNormal

public E3DVector3F getColliderCollisionNormal()
Get the normal at the point of collision if available

Returns:

setColliderCollisionNormal

public void setColliderCollisionNormal(E3DVector3F colliderCollisionNormal)
Set the normal at the point of the collision


getCollideeCollisionNormal

public E3DVector3F getCollideeCollisionNormal()
This is only applicable for new collision detectors. If another actor was collided into, we put what its collision normal should be here. If we then notify the collided actor, we replace the collision normal with this so it has the correct collision normal. So, this is the collision normal of the actor that was collided into

Returns:

setCollideeCollisionNormal

public void setCollideeCollisionNormal(E3DVector3F collideeCollisionNormal)
This is only applicable for new collision detectors. If another actor was collided into, we put what its collision normal should be here. If we then notify the collided actor, we replace the collision normal with this so it has the correct collision normal


getCollideeObject

public E3DCollisionDetectableObject getCollideeObject()

setCollideeObject

public void setCollideeObject(E3DCollisionDetectableObject collideeObject)