C# Class BEPUphysics.CollisionTests.CollisionAlgorithms.MPRToolbox

Contains a variety of queries and computation methods that make use of minkowski portal refinement.
Afficher le fichier Open project: Indiefreaks/igf

Méthodes publiques

Свойство Type Description
InnerIterationLimit int
OuterIterationLimit int

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

AreLocalShapesOverlapping() public static méthode

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.
Résultat bool

AreShapesOverlapping() public static méthode

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.
Résultat bool

AreSweptShapesIntersecting() public static méthode

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.
Résultat bool

GetContact() public static méthode

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.
Résultat bool

GetLocalOverlapPosition() public static méthode

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.
Résultat bool

GetOverlapPosition() public static méthode

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.
Résultat bool

LocalSurfaceCast() public static méthode

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.
Résultat void

LocalSurfaceCast() public static méthode

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.
Résultat void

RayCast() public static méthode

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.
Résultat bool

RefinePenetration() public static méthode

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.
Résultat void

Sweep() public static méthode

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.
Résultat bool

SweptShapeContainsPoint() public static méthode

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.
Résultat bool

Property Details

InnerIterationLimit public_oe static_oe property

Number of iterations that the MPR system will run in its inner loop before giving up and returning with failure.
public static int InnerIterationLimit
Résultat int

OuterIterationLimit public_oe static_oe property

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
Résultat int