espresso3d.engine.collision
Class E3DCollision
java.lang.Object
espresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.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.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
E3DCollision
public E3DCollision(E3DEngine engine)
E3DCollision
public E3DCollision(E3DCollision toCopy)
renderAtPosition
public void renderAtPosition(E3DVector3F position)
- MUST BE MANUALLY CALLED. When rendered will
indicate collision area with red marker at the intersection point
- Specified by:
renderAtPosition in class E3DRenderable
- Parameters:
position -
getCollisionActor
public E3DActor getCollisionActor()
- Returns:
- Returns the collisionActor.
setCollisionActor
public void setCollisionActor(E3DActor collisionActor)
- Parameters:
collisionActor - The collisionActor to set.
getIntersectionPt
public E3DVector3F getIntersectionPt()
- Returns:
- Returns the collisionPt.
setIntersectionPt
public void setIntersectionPt(E3DVector3F intersectionPt)
getCollisionSector
public E3DSector getCollisionSector()
- Returns:
- Returns the collisionSector.
setCollisionSector
public void setCollisionSector(E3DSector collisionSector)
- Parameters:
collisionSector - The collisionSector to set.
getCollisionObject
public java.lang.Object getCollisionObject()
- 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)
setCollisionObject
public void setCollisionObject(java.lang.Object collisionTriangle)
- Parameters:
collisionTriangle - The collisionTriangle to set.
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()
getCollisionNormal
public E3DVector3F getCollisionNormal()
setCollisionNormal
public void setCollisionNormal(E3DVector3F collisionNormal)
getCollidedActorCollisionNormal
public E3DVector3F getCollidedActorCollisionNormal()
- 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:
setCollidedActorCollisionNormal
public void setCollidedActorCollisionNormal(E3DVector3F collidedActorCollisionNormal)
- 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
- Parameters:
collidedActorCollisionNormal -