C# Класс BEPUphysics.CollisionTests.CollisionAlgorithms.MPRToolbox

Contains a variety of queries and computation methods that make use of minkowski portal refinement.
Показать файл Открыть проект

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

Свойство Тип Описание
InnerIterationLimit int
OuterIterationLimit int

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

Метод Описание
AreLocalShapesOverlapping ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB ) : bool

Determines if two shapes are colliding. Shape B is positioned relative to shape A.

AreShapesOverlapping ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB ) : bool

Determines if two shapes are colliding.

AreSweptShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, System.Vector3 &sweep, RigidTransform &localTransformB, System.Vector3 &position ) : bool

Determines if two shapes are intersecting.

GetContact ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, System.Vector3 &penetrationAxis, ContactData &contact ) : bool

Gets a contact point between two convex shapes.

GetLocalOverlapPosition ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &position ) : bool

Gets a point in the overlapped volume between two shapes in shape A's local space.

GetOverlapPosition ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, System.Vector3 &position ) : bool

Gets a world space point in the overlapped volume between two shapes.

LocalSurfaceCast ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &direction, float &t, System.Vector3 &normal ) : void

Casts a ray from the origin in the given direction at the surface of the minkowski difference. Assumes that the origin is within the minkowski difference.

LocalSurfaceCast ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &direction, float &t, System.Vector3 &normal, System.Vector3 &position ) : void

Casts a ray from the origin in the given direction at the surface of the minkowski difference. Assumes that the origin is within the minkowski difference.

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

Casts a ray against a shape.

RefinePenetration ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, float initialDepth, System.Vector3 &initialNormal, float &penetrationDepth, System.Vector3 &refinedNormal, System.Vector3 &position ) : void

Incrementally refines the penetration depth and normal towards the local minimum.

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

Sweeps the shapes against each other and finds a point, time, and normal of impact.

SweptShapeContainsPoint ( ConvexShape shape, System.Vector3 &sweep, System.Vector3 &localPoint ) : bool

Determines if a point is contained within the swept volume of a shape.

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

Метод Описание
AreLocalShapesOverlapping ( ConvexShape shapeA, ConvexShape shapeB, System.Vector3 &originRay, RigidTransform &localTransformB ) : bool

Determines if two shapes are colliding. Shape B is positioned relative to shape A.

GetLocalOverlapPosition ( ConvexShape shapeA, ConvexShape shapeB, System.Vector3 &originRay, RigidTransform &localTransformB, System.Vector3 &position ) : bool
GetLocalPosition ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &minkowskiPosition, System.Vector3 &position ) : void

Computes the position of the minkowski point in the local space of A. This assumes that the minkowski point is contained in A-B.

GetSweptExtremePoint ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &sweep, System.Vector3 &extremePointDirection, System.Vector3 &extremePointA, System.Vector3 &extremePoint ) : void
GetSweptExtremePoint ( ConvexShape shape, System.Vector3 &point, System.Vector3 &sweep, System.Vector3 &extremePointDirection, System.Vector3 &extremePoint ) : void
LocalSweepCast ( ConvexShape shape, ConvexShape shapeB, float sweepLength, float rayLengthSquared, System.Vector3 &localDirection, System.Vector3 &sweep, RigidTransform &localTransformB, RayHit &hit ) : bool
LocalSweepCast ( ConvexShape shape, float sweepLength, float rayLengthSquared, System.Vector3 &localDirection, System.Vector3 &sweep, System.Vector3 &rayOrigin, RayHit &hit ) : bool
VerifySimplex ( System.Vector3 &v0, System.Vector3 &v1, System.Vector3 &v2, System.Vector3 &v3, System.Vector3 &direction ) : bool

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

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

Determines if two shapes are colliding. Shape B is positioned relative to shape A.
public static AreLocalShapesOverlapping ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
localTransformB BEPUutilities.RigidTransform Relative transform of shape B to shape A.
Результат bool

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

Determines if two shapes are colliding.
public static AreShapesOverlapping ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape of the pair.
transformA BEPUutilities.RigidTransform Transformation to apply to shape A.
transformB BEPUutilities.RigidTransform Transformation to apply to shape B.
Результат bool

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

Determines if two shapes are intersecting.
public static AreSweptShapesIntersecting ( ConvexShape shapeA, ConvexShape shapeB, System.Vector3 &sweep, RigidTransform &localTransformB, System.Vector3 &position ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
sweep System.Vector3 Sweep direction and magnitude.
localTransformB BEPUutilities.RigidTransform Transformation of shape B in the local space of A.
position System.Vector3 Position of the minkowski difference origin in the local space of A, if the swept volumes intersect.
Результат bool

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

Gets a contact point between two convex shapes.
public static GetContact ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, System.Vector3 &penetrationAxis, ContactData &contact ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
transformA BEPUutilities.RigidTransform Transformation to apply to the first shape.
transformB BEPUutilities.RigidTransform Transformation to apply to the second shape.
penetrationAxis System.Vector3 Axis along which to first test the penetration depth.
contact ContactData Contact data between the two shapes, if any.
Результат bool

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

Gets a point in the overlapped volume between two shapes in shape A's local space.
public static GetLocalOverlapPosition ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &position ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
localTransformB BEPUutilities.RigidTransform
position System.Vector3 Position within the overlapped volume of the two shapes in shape A's local space, if any.
Результат bool

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

Gets a world space point in the overlapped volume between two shapes.
public static GetOverlapPosition ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &transformA, RigidTransform &transformB, System.Vector3 &position ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
transformA BEPUutilities.RigidTransform Transformation to apply to the first shape.
transformB BEPUutilities.RigidTransform Transformation to apply to the second shape.
position System.Vector3 Position within the overlapped volume of the two shapes, if any.
Результат bool

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

Casts a ray from the origin in the given direction at the surface of the minkowski difference. Assumes that the origin is within the minkowski difference.
public static LocalSurfaceCast ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &direction, float &t, System.Vector3 &normal ) : void
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
localTransformB BEPUutilities.RigidTransform Transformation of shape B relative to shape A.
direction System.Vector3 Direction to cast the ray.
t float Length along the direction vector that the impact was found.
normal System.Vector3 Normal of the impact at the surface of the convex.
Результат void

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

Casts a ray from the origin in the given direction at the surface of the minkowski difference. Assumes that the origin is within the minkowski difference.
public static LocalSurfaceCast ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, System.Vector3 &direction, float &t, System.Vector3 &normal, System.Vector3 &position ) : void
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
localTransformB BEPUutilities.RigidTransform Transformation of shape B relative to shape A.
direction System.Vector3 Direction to cast the ray.
t float Length along the direction vector that the impact was found.
normal System.Vector3 Normal of the impact at the surface of the convex.
position System.Vector3 Location of the ray cast hit on the surface of A.
Результат void

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

Casts a ray against a shape.
public static RayCast ( BEPUutilities.Ray ray, float maximumLength, ConvexShape shape, RigidTransform &transform, RayHit &hit ) : bool
ray BEPUutilities.Ray Ray to test against the shape.
maximumLength float Maximum length of the ray.
shape BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Shape to test with a ray.
transform BEPUutilities.RigidTransform Transform to apply to the shape.
hit BEPUutilities.RayHit Hit data of the ray on the shape, if any.
Результат bool

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

Incrementally refines the penetration depth and normal towards the local minimum.
public static RefinePenetration ( ConvexShape shapeA, ConvexShape shapeB, RigidTransform &localTransformB, float initialDepth, System.Vector3 &initialNormal, float &penetrationDepth, System.Vector3 &refinedNormal, System.Vector3 &position ) : void
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
localTransformB BEPUutilities.RigidTransform Transformation of shape B relative to shape A.
initialDepth float Initial depth estimate.
initialNormal System.Vector3 Initial normal estimate.
penetrationDepth float Refined penetration depth.
refinedNormal System.Vector3 Refined normal.
position System.Vector3 Refined position.
Результат void

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

Sweeps the shapes against each other and finds a point, time, and normal of impact.
public static Sweep ( ConvexShape shapeA, ConvexShape shapeB, System.Vector3 &sweepA, System.Vector3 &sweepB, RigidTransform &transformA, RigidTransform &transformB, RayHit &hit ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
sweepA System.Vector3 Sweep direction and amount to apply to the first shape.
sweepB System.Vector3 Sweep direction and amount to apply to the second shape.
transformA BEPUutilities.RigidTransform Initial transform to apply to the first shape.
transformB BEPUutilities.RigidTransform Initial transform to apply to the second shape.
hit BEPUutilities.RayHit Hit data between the two shapes, if any.
Результат bool

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

Determines if a point is contained within the swept volume of a shape.
public static SweptShapeContainsPoint ( ConvexShape shape, System.Vector3 &sweep, System.Vector3 &localPoint ) : bool
shape BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
sweep System.Vector3 Sweep direction and magnitude.
localPoint System.Vector3 Point to check for containment in the shape in the local space of the shape.
Результат bool

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

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

Number of iterations that the MPR system will run in its inner loop before giving up and returning with failure.
public static int InnerIterationLimit
Результат int

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

Number of iterations that the MPR system will run in its outer loop before giving up and moving on to its inner loop.
public static int OuterIterationLimit
Результат int