|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.eside.flingbox.physics.collisions.Collider
edu.eside.flingbox.physics.collisions.ColliderPolygon
public class ColliderPolygon
Collider for a polygon. it handles all functions needed by
Collision system
NOTE This class should only be created by PhisicPolygon.
How collision detector optimizer works:
- When created collider check each polygon's vertex angle and
stores them.
- When bounding circle collides Collider checks only segments
in other circle region.
| Constructor Summary | |
|---|---|
ColliderPolygon(Vector2D[] contour,
PhysicBody thisPhysic)
Default constructor for a polygon collider. |
|
| Method Summary | |
|---|---|
Contact[] |
checkContacts(Collider collider)
Checks if objects can collide |
| Methods inherited from class edu.eside.flingbox.physics.collisions.Collider |
|---|
canContact, getAssociatedBody, getBoundingCircle, getPosition, onMovement |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.eside.flingbox.physics.PhysicBody.OnMovementListener |
|---|
onMovement |
| Constructor Detail |
|---|
public ColliderPolygon(Vector2D[] contour,
PhysicBody thisPhysic)
contour - Polygon's points. It handles pointer in order to
preserve recurses, so mPolygonContour should be automatically rotated.
NOTE It has to be in counterclockwise ordering!!!| Method Detail |
|---|
public Contact[] checkContacts(Collider collider)
Collider
checkContacts in class Collidercollider - other objects collider.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||