C# Класс BEPUphysics.CollisionTests.CollisionAlgorithms.GJK.GJKToolbox

Helper class containing various tests based on GJK.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
HighGJKIterations int
MaximumGJKIterations int

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetClosestPoints ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, CachedSimplex &cachedSimplex, Vector3 &localClosestPointA, Vector3 &localClosestPointB ) : bool

Описание методов

AreShapesIntersecting() публичный статический Метод

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.
Результат bool

AreShapesIntersecting() публичный статический Метод

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.
Результат bool

CCDSphereCast() публичный статический Метод

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.
Результат bool

ConvexCast() публичный статический Метод

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.
Результат bool

ConvexCast() публичный статический Метод

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.
Результат bool

GetClosestPoints() публичный статический Метод

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.
Результат bool

GetClosestPoints() публичный статический Метод

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.
Результат bool

RayCast() публичный статический Метод

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.
Результат bool

SphereCast() публичный статический Метод

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.
Результат bool

Описание свойств

HighGJKIterations публичное статическое свойство

Defines how many iterations are required to consider a GJK attempt to be 'probably stuck' and proceed with protective measures.
public static int HighGJKIterations
Результат int

MaximumGJKIterations публичное статическое свойство

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
Результат int