Метод | Описание | |
---|---|---|
AddEntity ( IBroadphaseEntity body ) : void |
Add a body to the collision system. Adding a body to the world does automatically add it to the collision system.
|
|
CheckBothStaticOrInactive ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool |
Checks the state of two bodies.
|
|
CheckBoundingBoxes ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool |
Checks the AABB of the two rigid bodies.
|
|
CollisionSystem ( ) : System |
Initializes a new instance of the CollisionSystem.
|
|
Detect ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : void |
Checks two bodies for collisions using narrowphase.
|
|
Detect ( bool multiThreaded ) : void |
Tells the collisionsystem to check all bodies for collisions. Hook into the PassedBroadphase and CollisionDetected events to get the results.
|
|
FindNearestTrianglePoint ( |
||
RaisePassedBroadphase ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool |
Raises the PassedBroadphase event.
|
|
RaisePassedNarrowphase ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point, Jitter.LinearMath.JVector &normal, float penetration ) : bool |
Raises the PassedNarrowphase event.
|
|
Raycast ( Jitter.LinearMath.JVector rayOrigin, Jitter.LinearMath.JVector rayDirection, RaycastCallback raycast, RigidBody &body, Jitter.LinearMath.JVector &normal, float &fraction ) : bool |
Sends a ray (definied by start and direction) through the scene (all bodies added). NOTE: For performance reasons terrain and trianglemeshshape aren't checked against rays (rays are of infinite length). They are checked against segments which start at rayOrigin and end in rayOrigin + rayDirection.
|
|
Raycast ( RigidBody body, Jitter.LinearMath.JVector rayOrigin, Jitter.LinearMath.JVector rayDirection, Jitter.LinearMath.JVector &normal, float &fraction ) : bool |
Raycasts a single body. NOTE: For performance reasons terrain and trianglemeshshape aren't checked against rays (rays are of infinite length). They are checked against segments which start at rayOrigin and end in rayOrigin + rayDirection.
|
|
RemoveEntity ( IBroadphaseEntity body ) : bool |
Remove a body from the collision system. Removing a body from the world does automatically remove it from the collision system.
|
Метод | Описание | |
---|---|---|
RaiseCollisionDetected ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point1, Jitter.LinearMath.JVector &point2, Jitter.LinearMath.JVector &normal, float penetration ) : void |
Raises the CollisionDetected event.
|
Метод | Описание | |
---|---|---|
DetectRigidRigid ( RigidBody body1, RigidBody body2 ) : void | ||
DetectSoftRigid ( RigidBody rigidBody, |
||
DetectSoftSoft ( |
||
FindSupportPoints ( RigidBody body1, RigidBody body2, |
||
SupportMapping ( RigidBody body, |
public abstract AddEntity ( IBroadphaseEntity body ) : void | ||
body | IBroadphaseEntity | The body to remove. |
Результат | void |
public CheckBothStaticOrInactive ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool | ||
entity1 | IBroadphaseEntity | The first body. |
entity2 | IBroadphaseEntity | The second body. |
Результат | bool |
public CheckBoundingBoxes ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool | ||
entity1 | IBroadphaseEntity | The first body. |
entity2 | IBroadphaseEntity | The second body. |
Результат | bool |
public Detect ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : void | ||
entity1 | IBroadphaseEntity | |
entity2 | IBroadphaseEntity | |
Результат | void |
public abstract Detect ( bool multiThreaded ) : void | ||
multiThreaded | bool | If true internal multithreading is used. |
Результат | void |
public static FindNearestTrianglePoint ( |
||
sb | ||
id | int | |
point | Jitter.LinearMath.JVector | |
Результат | int |
protected RaiseCollisionDetected ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point1, Jitter.LinearMath.JVector &point2, Jitter.LinearMath.JVector &normal, float penetration ) : void | ||
body1 | RigidBody | The first body involved in the collision. |
body2 | RigidBody | The second body involved in the collision. |
point1 | Jitter.LinearMath.JVector | |
point2 | Jitter.LinearMath.JVector | |
normal | Jitter.LinearMath.JVector | The normal pointing to body1. |
penetration | float | The penetration depth. |
Результат | void |
public RaisePassedBroadphase ( IBroadphaseEntity entity1, IBroadphaseEntity entity2 ) : bool | ||
entity1 | IBroadphaseEntity | The first body. |
entity2 | IBroadphaseEntity | The second body. |
Результат | bool |
public RaisePassedNarrowphase ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point, Jitter.LinearMath.JVector &normal, float penetration ) : bool | ||
body1 | RigidBody | The first body. |
body2 | RigidBody | The second body. |
point | Jitter.LinearMath.JVector | |
normal | Jitter.LinearMath.JVector | |
penetration | float | |
Результат | bool |
public abstract Raycast ( Jitter.LinearMath.JVector rayOrigin, Jitter.LinearMath.JVector rayDirection, RaycastCallback raycast, RigidBody &body, Jitter.LinearMath.JVector &normal, float &fraction ) : bool | ||
rayOrigin | Jitter.LinearMath.JVector | |
rayDirection | Jitter.LinearMath.JVector | |
raycast | RaycastCallback | |
body | RigidBody | |
normal | Jitter.LinearMath.JVector | |
fraction | float | |
Результат | bool |
public abstract Raycast ( RigidBody body, Jitter.LinearMath.JVector rayOrigin, Jitter.LinearMath.JVector rayDirection, Jitter.LinearMath.JVector &normal, float &fraction ) : bool | ||
body | RigidBody | |
rayOrigin | Jitter.LinearMath.JVector | |
rayDirection | Jitter.LinearMath.JVector | |
normal | Jitter.LinearMath.JVector | |
fraction | float | |
Результат | bool |
public abstract RemoveEntity ( IBroadphaseEntity body ) : bool | ||
body | IBroadphaseEntity | The body to remove. |
Результат | bool |