C# Class BEPUphysics.CollisionTests.CollisionAlgorithms.GJK.GJKToolbox

Helper class containing various tests based on GJK.
Datei anzeigen Open project: Indiefreaks/igf Class Usage Examples

Public Properties

Property Type Description
HighGJKIterations int
MaximumGJKIterations int

Public Methods

Method Description
AreShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB ) : bool

Tests if the pair is intersecting.

AreShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, Vector3 &localSeparatingAxis ) : bool

Tests if the pair is intersecting.

CCDSphereCast ( BEPUutilities.Ray ray, float radius, ConvexShape target, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool

Casts a fat (sphere expanded) ray against the shape. If the raycast appears to be stuck in the shape, the cast will be attempted with a smaller ray (scaled by the MotionSettings.CoreShapeScaling each time).

ConvexCast ( ConvexShape sweptShape, ConvexShape target, Vector3 &sweep, RigidTransform &startingSweptTransform, RigidTransform &targetTransform, RayHit &hit ) : bool

Sweeps a shape against another shape using a given sweep vector.

ConvexCast ( ConvexShape shapeA, ConvexShape shapeB, Vector3 &sweepA, Vector3 &sweepB, RigidTransform &transformA, RigidTransform &transformB, RayHit &hit ) : bool

Sweeps two shapes against another.

GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, CachedSimplex &cachedSimplex, Vector3 &closestPointA, Vector3 &closestPointB ) : bool

Gets the closest points between the shapes.

GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, Vector3 &closestPointA, Vector3 &closestPointB ) : bool

Gets the closest points between the shapes.

RayCast ( BEPUutilities.Ray ray, ConvexShape shape, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool

Tests a ray against a convex shape.

SphereCast ( BEPUutilities.Ray ray, float radius, ConvexShape shape, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool

Casts a fat (sphere expanded) ray against the shape.

Private Methods

Method Description
GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, CachedSimplex &cachedSimplex, Vector3 &localClosestPointA, Vector3 &localClosestPointB ) : bool

Method Details

AreShapesIntersecting() public static method

Tests if the pair is intersecting.
public static AreShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape of the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
transformA BEPUutilities.RigidTransform Transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Transform to apply to the second shape.
return bool

AreShapesIntersecting() public static method

Tests if the pair is intersecting.
public static AreShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, Vector3 &localSeparatingAxis ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape of the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
transformA BEPUutilities.RigidTransform Transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Transform to apply to the second shape.
localSeparatingAxis Vector3 Warmstartable separating axis used by the method to quickly early-out if possible. Updated to the latest separating axis after each run.
return bool

CCDSphereCast() public static method

Casts a fat (sphere expanded) ray against the shape. If the raycast appears to be stuck in the shape, the cast will be attempted with a smaller ray (scaled by the MotionSettings.CoreShapeScaling each time).
public static CCDSphereCast ( BEPUutilities.Ray ray, float radius, ConvexShape target, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool
ray BEPUutilities.Ray Ray to test against the shape.
radius float Radius of the ray.
target BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape to test against.
shapeTransform BEPUutilities.RigidTransform Transform to apply to the shape for the test.
maximumLength float Maximum length of the ray in units of the ray direction's length.
hit BEPUutilities.RayHit Hit data of the sphere cast, if any.
return bool

ConvexCast() public static method

Sweeps a shape against another shape using a given sweep vector.
public static ConvexCast ( ConvexShape sweptShape, ConvexShape target, Vector3 &sweep, RigidTransform &startingSweptTransform, RigidTransform &targetTransform, RayHit &hit ) : bool
sweptShape BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape to sweep.
target BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape being swept against.
sweep Vector3 Sweep vector for the sweptShape.
startingSweptTransform BEPUutilities.RigidTransform Starting transform of the sweptShape.
targetTransform BEPUutilities.RigidTransform Transform to apply to the target shape.
hit BEPUutilities.RayHit Hit data of the sweep test, if any.
return bool

ConvexCast() public static method

Sweeps two shapes against another.
public static ConvexCast ( ConvexShape shapeA, ConvexShape shapeB, Vector3 &sweepA, Vector3 &sweepB, RigidTransform &transformA, RigidTransform &transformB, RayHit &hit ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape being swept.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape being swept.
sweepA Vector3 Sweep vector for the first shape.
sweepB Vector3 Sweep vector for the second shape.
transformA BEPUutilities.RigidTransform Transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Transform to apply to the second shape.
hit BEPUutilities.RayHit Hit data of the sweep test, if any.
return bool

GetClosestPoints() public static method

Gets the closest points between the shapes.
public static GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, CachedSimplex &cachedSimplex, Vector3 &closestPointA, Vector3 &closestPointB ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape of the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
transformA BEPUutilities.RigidTransform Transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Transform to apply to the second shape.
cachedSimplex CachedSimplex Simplex from a previous updated used to warmstart the current attempt. Updated after each run.
closestPointA Vector3 Closest point on the first shape to the second shape.
closestPointB Vector3 Closest point on the second shape to the first shape.
return bool

GetClosestPoints() public static method

Gets the closest points between the shapes.
public static GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, Vector3 &closestPointA, Vector3 &closestPointB ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape of the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
transformA BEPUutilities.RigidTransform Transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Transform to apply to the second shape.
closestPointA Vector3 Closest point on the first shape to the second shape.
closestPointB Vector3 Closest point on the second shape to the first shape.
return bool

RayCast() public static method

Tests a ray against a convex shape.
public static RayCast ( BEPUutilities.Ray ray, ConvexShape shape, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool
ray BEPUutilities.Ray Ray to test against the shape.
shape BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape to test.
shapeTransform BEPUutilities.RigidTransform Transform to apply to the shape for the test.
maximumLength float Maximum length of the ray in units of the ray direction's length.
hit BEPUutilities.RayHit Hit data of the ray cast, if any.
return bool

SphereCast() public static method

Casts a fat (sphere expanded) ray against the shape.
public static SphereCast ( BEPUutilities.Ray ray, float radius, ConvexShape shape, RigidTransform &shapeTransform, float maximumLength, RayHit &hit ) : bool
ray BEPUutilities.Ray Ray to test against the shape.
radius float Radius of the ray.
shape BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape to test against.
shapeTransform BEPUutilities.RigidTransform Transform to apply to the shape for the test.
maximumLength float Maximum length of the ray in units of the ray direction's length.
hit BEPUutilities.RayHit Hit data of the sphere cast, if any.
return bool

Property Details

HighGJKIterations public_oe static_oe property

Defines how many iterations are required to consider a GJK attempt to be 'probably stuck' and proceed with protective measures.
public static int HighGJKIterations
return int

MaximumGJKIterations public_oe static_oe property

Maximum number of iterations the GJK algorithm will do. If the iterations exceed this number, the system will immediately quit and return whatever information it has at the time.
public static int MaximumGJKIterations
return int