HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.1
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Box2D.Character_Movement.Mover Class Reference

Functions for solving planes and clipping vectors. More...

Static Public Member Functions

static unsafe PlaneSolverResult SolvePlanes (in Vec2 targetDelta, CollisionPlane[] planes)
 Solves the position of a mover that satisfies the given collision planes.
 
static unsafe PlaneSolverResult SolvePlanes (in Vec2 targetDelta, CollisionPlane[] planes, int planeCount)
 Solves the position of a mover that satisfies the given collision planes.
 
static unsafe Vec2 ClipVector (in Vec2 vector, CollisionPlane[] planes)
 Clips the velocity against the given collision planes. Planes with zero push or clipVelocity set to false are skipped.
 
static unsafe Vec2 ClipVector (in Vec2 vector, CollisionPlane[] planes, int planeCount)
 Clips the velocity against the given collision planes. Planes with zero push or clipVelocity set to false are skipped.
 

Detailed Description

Functions for solving planes and clipping vectors.

Member Function Documentation

◆ ClipVector() [1/2]

static unsafe Vec2 Box2D.Character_Movement.Mover.ClipVector ( in Vec2  vector,
CollisionPlane[]  planes 
)
inlinestatic

Clips the velocity against the given collision planes. Planes with zero push or clipVelocity set to false are skipped.

Parameters
vectorThe vector to clip
planesThe collision planes
Returns
The clipped vector
Exceptions
ArgumentNullExceptionThe planes array is null or empty

◆ ClipVector() [2/2]

static unsafe Vec2 Box2D.Character_Movement.Mover.ClipVector ( in Vec2  vector,
CollisionPlane[]  planes,
int  planeCount 
)
inlinestatic

Clips the velocity against the given collision planes. Planes with zero push or clipVelocity set to false are skipped.

Parameters
vectorThe vector to clip
planesThe collision planes
planeCountThe number of planes to use
Returns
The clipped vector
Exceptions
ArgumentNullExceptionThe planes array is null or empty

◆ SolvePlanes() [1/2]

static unsafe PlaneSolverResult Box2D.Character_Movement.Mover.SolvePlanes ( in Vec2  targetDelta,
CollisionPlane[]  planes 
)
inlinestatic

Solves the position of a mover that satisfies the given collision planes.

Parameters
targetDeltaThe desired movement from the position used to generate the collision planes
planesThe collision planes
Returns
The result of the plane solver
Exceptions
ArgumentNullExceptionThe planes array is null or empty

◆ SolvePlanes() [2/2]

static unsafe PlaneSolverResult Box2D.Character_Movement.Mover.SolvePlanes ( in Vec2  targetDelta,
CollisionPlane[]  planes,
int  planeCount 
)
inlinestatic

Solves the position of a mover that satisfies the given collision planes.

Parameters
targetDeltaThe desired movement from the position used to generate the collision planes
planesThe collision planes
planeCountThe number of planes to use
Returns
The result of the plane solver
Exceptions
ArgumentNullExceptionThe planes array is null or empty

The documentation for this class was generated from the following files: