|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectespresso3d.engine.base.E3DEngineItem
espresso3d.engine.collision.E3DCollisionDetect
| Field Summary | |
static java.lang.String |
SOURCE_COLLISIONTYPE_AABOUNDINGBOX
TODO: Not Implemented Axially Aligned Bounding Box collision for the source object |
static java.lang.String |
SOURCE_COLLISIONTYPE_BOUNDINGSPHERE_ACCURATE
Bounding sphere collision for the source object. |
static java.lang.String |
SOURCE_COLLISIONTYPE_BOUNDINGSPHERE_FAST
Bounding sphere collision for the source object. |
static java.lang.String |
SOURCE_COLLISIONTYPE_SEGMENT
Basic line segment collision detection for the source object |
static java.lang.String |
SOURCE_COLLISIONTYPE_TRIANGLES
Triangle collision detection for the source object to check if triangle in the source model collides with the dest object Can be -very- slow if the source has lots of triangles in its model |
| Constructor Summary | |
E3DCollisionDetect(E3DEngine engine)
|
|
| Method Summary | |
E3DCollision |
checkCollision(java.lang.String sourceDetectorName,
boolean useBoundingObjectsIfPossible,
boolean notifyAllObjectsCollided,
E3DCollisionDetectableObject sourceObject,
E3DVector3F startPos,
E3DVector3F endPos,
E3DWorld world)
Will perform a collision check to see if the sourceActor collides with anything else in the world between startPos and endPos. |
static boolean |
checkFastCollisionWithPlane(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
Will probably be moved. |
E3DSector |
checkForPortalCollisionsAndGetSectorChange(E3DVector3F startPos,
E3DVector3F endPos,
E3DSector sector)
This method is used mainly by the engine to see when it translates objects, if they collide with a portal. |
static E3DVector3F |
checkSegmentTriangleCollision(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
Will probably be moved. |
static E3DVector3F |
checkTriangleTriangleCollision(E3DTriangle colliderTriangle,
E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle collideeTriangle)
Will probably be moved. |
java.util.HashMap |
getCollisionDetectors()
|
static E3DVector3F |
getIntersectionPoint(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
Will probably be moved. |
static double |
getSegmentTriangleDistance(E3DVector3F pos,
E3DTriangle triangle)
Return the distance between a segment and triangle. |
void |
registerCollisionDetector(java.lang.String detectorName,
E3DCollisionDetector detector)
If you want to create your own collisiondetector, this is where you register it. |
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SOURCE_COLLISIONTYPE_SEGMENT
public static final java.lang.String SOURCE_COLLISIONTYPE_AABOUNDINGBOX
public static final java.lang.String SOURCE_COLLISIONTYPE_BOUNDINGSPHERE_FAST
public static final java.lang.String SOURCE_COLLISIONTYPE_BOUNDINGSPHERE_ACCURATE
public static final java.lang.String SOURCE_COLLISIONTYPE_TRIANGLES
| Constructor Detail |
public E3DCollisionDetect(E3DEngine engine)
| Method Detail |
public E3DCollision checkCollision(java.lang.String sourceDetectorName,
boolean useBoundingObjectsIfPossible,
boolean notifyAllObjectsCollided,
E3DCollisionDetectableObject sourceObject,
E3DVector3F startPos,
E3DVector3F endPos,
E3DWorld world)
sourceDetectorName - Name of the source collisionType to use for the sourceActor when checking for collisions.
Can be a built in (check static SOURCE_COLLISIONTYPE_* types), or
the name of one that has been created and registered into the collision detectoruseBoundingObjectsIfPossible - If true, when checking collisions against other actors, it will use their bounding object (if possible) instead of checking against every triangle in the actor.
World geometry is still checked per-trianle. Recommended to be set to true for speed.notifyAllObjectsCollided - If true, all objects that are collided with will receive an onCollision notification. However, only the closest collision will be returned.
This should be true if you have an object that could potential "plow through" multiple objects (ie: its collision handler doesn't stop it when it collides into another object)sourceObject - This is the object to see if it hits anythingstartPos - The starting position of the sourceActorendPos - The end pos of the vector that we use to see if sourceActor hits anything.world - The world to check for the collision in
public E3DSector checkForPortalCollisionsAndGetSectorChange(E3DVector3F startPos,
E3DVector3F endPos,
E3DSector sector)
startPos - The starting position of the object we are checking against portalsendPos - The ending position of the object we are checking against portalssector - The sector the object is currently in
public void registerCollisionDetector(java.lang.String detectorName,
E3DCollisionDetector detector)
detectorName - detector - public java.util.HashMap getCollisionDetectors()
public static double getSegmentTriangleDistance(E3DVector3F pos,
E3DTriangle triangle)
public static boolean checkFastCollisionWithPlane(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
startPos - endPos - triangle -
public static E3DVector3F getIntersectionPoint(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
startPos - endPos - triangle -
public static E3DVector3F checkSegmentTriangleCollision(E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle triangle)
public static E3DVector3F checkTriangleTriangleCollision(E3DTriangle colliderTriangle,
E3DVector3F startPos,
E3DVector3F endPos,
E3DTriangle collideeTriangle)
colliderTriangle - startPos - endPos - collideeTriangle -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||