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

GJK simplex used to support closest point tests with warmstarting.
Datei anzeigen Open project: Indiefreaks/igf Class Usage Examples

Public Properties

Property Type Description
A Microsoft.Xna.Framework.Vector3
B Microsoft.Xna.Framework.Vector3
C Microsoft.Xna.Framework.Vector3
D Microsoft.Xna.Framework.Vector3
DistanceConvergenceEpsilon float
LocalTransformB BEPUutilities.RigidTransform
ProgressionEpsilon float
SimplexA ContributingShapeSimplex
SimplexB ContributingShapeSimplex
State SimplexState
U float
V float
W float

Public Methods

Method Description
GetClosestPoints ( Microsoft.Xna.Framework.Vector3 &closestPointA, Microsoft.Xna.Framework.Vector3 &closestPointB ) : void

Gets the closest points by using the barycentric coordinates and shape simplex contributions.

GetNewSimplexPoint ( ConvexShape shapeA, ConvexShape shapeB, int iterationCount, Microsoft.Xna.Framework.Vector3 &closestPoint ) : bool

Adds a new point to the simplex.

GetPointClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : bool

Gets the point on the simplex closest to the origin.

GetPointOnSegmentClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : void

Gets the point on the segment closest to the origin.

GetPointOnTetrahedronClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : bool

Gets the point on the tetrahedron closest to the origin.

GetPointOnTriangleClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : void

Gets the point on the triangle closest to the origin.

PairSimplex ( CachedSimplex &cachedSimplex, RigidTransform &localTransformB ) : BEPUphysics.CollisionShapes.ConvexShapes

Constructs a new pair simplex.

UpdateCachedSimplex ( CachedSimplex &simplex ) : void

Updates the cached simplex with the latest run's results.

Private Methods

Method Description
PairSimplex ( RigidTransform &localTransformB ) : BEPUphysics.CollisionShapes.ConvexShapes
TryTetrahedronTriangle ( Microsoft.Xna.Framework.Vector3 &A, Microsoft.Xna.Framework.Vector3 &B, Microsoft.Xna.Framework.Vector3 &C, Microsoft.Xna.Framework.Vector3 &A1, Microsoft.Xna.Framework.Vector3 &B1, Microsoft.Xna.Framework.Vector3 &C1, Microsoft.Xna.Framework.Vector3 &A2, Microsoft.Xna.Framework.Vector3 &B2, Microsoft.Xna.Framework.Vector3 &C2, float errorTolerance, Microsoft.Xna.Framework.Vector3 &otherPoint, PairSimplex &simplex, Microsoft.Xna.Framework.Vector3 &point ) : bool
VerifyContributions ( ) : void

Method Details

GetClosestPoints() public method

Gets the closest points by using the barycentric coordinates and shape simplex contributions.
public GetClosestPoints ( Microsoft.Xna.Framework.Vector3 &closestPointA, Microsoft.Xna.Framework.Vector3 &closestPointB ) : void
closestPointA Microsoft.Xna.Framework.Vector3 Closest point on shape A.
closestPointB Microsoft.Xna.Framework.Vector3 Closest point on shape B.
return void

GetNewSimplexPoint() public method

Adds a new point to the simplex.
public GetNewSimplexPoint ( ConvexShape shapeA, ConvexShape shapeB, int iterationCount, Microsoft.Xna.Framework.Vector3 &closestPoint ) : bool
shapeA BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape First shape in the pair.
shapeB BEPUphysics.CollisionShapes.ConvexShapes.ConvexShape Second shape in the pair.
iterationCount int Current iteration count.
closestPoint Microsoft.Xna.Framework.Vector3 Current point on simplex closest to origin.
return bool

GetPointClosestToOrigin() public method

Gets the point on the simplex closest to the origin.
public GetPointClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : bool
point Microsoft.Xna.Framework.Vector3 Point closest to the origin.
return bool

GetPointOnSegmentClosestToOrigin() public method

Gets the point on the segment closest to the origin.
public GetPointOnSegmentClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : void
point Microsoft.Xna.Framework.Vector3 Point closest to origin.
return void

GetPointOnTetrahedronClosestToOrigin() public method

Gets the point on the tetrahedron closest to the origin.
public GetPointOnTetrahedronClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : bool
point Microsoft.Xna.Framework.Vector3 Closest point to the origin.
return bool

GetPointOnTriangleClosestToOrigin() public method

Gets the point on the triangle closest to the origin.
public GetPointOnTriangleClosestToOrigin ( Microsoft.Xna.Framework.Vector3 &point ) : void
point Microsoft.Xna.Framework.Vector3 Point closest to origin.
return void

PairSimplex() public method

Constructs a new pair simplex.
public PairSimplex ( CachedSimplex &cachedSimplex, RigidTransform &localTransformB ) : BEPUphysics.CollisionShapes.ConvexShapes
cachedSimplex CachedSimplex Cached simplex to use to warmstart the simplex.
localTransformB BEPUutilities.RigidTransform Transform of shape B in the local space of A.
return BEPUphysics.CollisionShapes.ConvexShapes

UpdateCachedSimplex() public method

Updates the cached simplex with the latest run's results.
public UpdateCachedSimplex ( CachedSimplex &simplex ) : void
simplex CachedSimplex Simplex to update.
return void

Property Details

A public_oe property

public Vector3,Microsoft.Xna.Framework A
return Microsoft.Xna.Framework.Vector3

B public_oe property

public Vector3,Microsoft.Xna.Framework B
return Microsoft.Xna.Framework.Vector3

C public_oe property

public Vector3,Microsoft.Xna.Framework C
return Microsoft.Xna.Framework.Vector3

D public_oe property

public Vector3,Microsoft.Xna.Framework D
return Microsoft.Xna.Framework.Vector3

DistanceConvergenceEpsilon public_oe static_oe property

The baseline amount that an iteration must converge with its distance to avoid exiting. Defaults to 1e-7f.
public static float DistanceConvergenceEpsilon
return float

LocalTransformB public_oe property

Transform of the second shape in the first shape's local space.
public RigidTransform,BEPUutilities LocalTransformB
return BEPUutilities.RigidTransform

ProgressionEpsilon public_oe static_oe property

The baseline amount that a GJK iteration must progress through to avoid exiting. Defaults to 1e-8f.
public static float ProgressionEpsilon
return float

SimplexA public_oe property

Simplex as viewed from the local space of A.
public ContributingShapeSimplex,BEPUphysics.CollisionTests.CollisionAlgorithms.GJK SimplexA
return ContributingShapeSimplex

SimplexB public_oe property

Simplex as viewed from the local space of B.
public ContributingShapeSimplex,BEPUphysics.CollisionTests.CollisionAlgorithms.GJK SimplexB
return ContributingShapeSimplex

State public_oe property

public SimplexState State
return SimplexState

U public_oe property

Weight of vertex A.
public float U
return float

V public_oe property

Weight of vertex B.
public float V
return float

W public_oe property

Weight of vertex C.
public float W
return float