Package com.github.stephengold.joltjni
Class EpaPenetrationDepth
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.EpaPenetrationDepth
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Implement the Expanding Polytope Algorithm. (native type:
EPAPenetrationDepth)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetPenetrationDepth(PointConvexSupport aExcluding, Sphere aIncluding, float convexRadiusA, PointConvexSupport bExcluding, Sphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of points.booleangetPenetrationDepth(Sphere aExcluding, Sphere aIncluding, float convexRadiusA, Sphere bExcluding, Sphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of spheres.booleangetPenetrationDepth(Sphere aExcluding, Sphere aIncluding, float convexRadiusA, TransformedAaBox bExcluding, AddConvexRadiusTab bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a sphere and a transformed box.booleangetPenetrationDepth(TransformedAaBox aExcluding, AddConvexRadiusTab aIncluding, float convexRadiusA, TransformedAaBox bExcluding, AddConvexRadiusTab bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of transformed boxes.booleangetPenetrationDepth(TransformedAaBox aExcluding, TransformedAaBox aIncluding, float convexRadiusA, TransformedSphere bExcluding, TransformedSphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a transformed box and a transformed sphere.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
EpaPenetrationDepth
public EpaPenetrationDepth()Instantiate a default implementation.
-
-
Method Details
-
getPenetrationDepth
public boolean getPenetrationDepth(PointConvexSupport aExcluding, Sphere aIncluding, float convexRadiusA, PointConvexSupport bExcluding, Sphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of points.- Parameters:
aExcluding- point A without convex radius (not null, unaffected)aIncluding- point A with convex radius (not null, unaffected)convexRadiusA- the convex radius of point AbExcluding- point B without convex radius (not null, unaffected)bIncluding- point B with convex radius (not null, unaffected)convexRadiusB- the convex radius of point BcollisionToleranceSq- the square of the collision tolerancepenetrationTolerance- the penetration toleranceiov- the direction vector (not null, modified)storePointA- storage for the point on point A (not null, modified)storePointB- storage for the point on point B (not null, modified)- Returns:
trueif the points intersect, otherwisefalse
-
getPenetrationDepth
public boolean getPenetrationDepth(Sphere aExcluding, Sphere aIncluding, float convexRadiusA, Sphere bExcluding, Sphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of spheres.- Parameters:
aExcluding- sphere A without convex radius (not null, unaffected)aIncluding- sphere A with convex radius (not null, unaffected)convexRadiusA- the convex radius of sphere AbExcluding- sphere B without convex radius (not null, unaffected)bIncluding- sphere B with convex radius (not null, unaffected)convexRadiusB- the convex radius of sphere BcollisionToleranceSq- the square of the collision tolerancepenetrationTolerance- the penetration toleranceiov- the direction vector (not null, modified)storePointA- storage for the point on sphere A (not null, modified)storePointB- storage for the point on sphere B (not null, modified)- Returns:
trueif the spheres intersect, otherwisefalse
-
getPenetrationDepth
public boolean getPenetrationDepth(Sphere aExcluding, Sphere aIncluding, float convexRadiusA, TransformedAaBox bExcluding, AddConvexRadiusTab bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a sphere and a transformed box.- Parameters:
aExcluding- the sphere without convex radius (not null, unaffected)aIncluding- the sphere with convex radius (not null, unaffected)convexRadiusA- the convex radius of the spherebExcluding- the box without convex radius (not null, unaffected)bIncluding- the box with convex radius (not null, unaffected)convexRadiusB- the convex radius of the boxcollisionToleranceSq- the square of the collision tolerancepenetrationTolerance- the penetration toleranceiov- the direction vector (not null, modified)storePointA- storage for the point on the sphere (not null, modified)storePointB- storage for the point on the box (not null, modified)- Returns:
trueif the box and sphere intersect, otherwisefalse
-
getPenetrationDepth
public boolean getPenetrationDepth(TransformedAaBox aExcluding, AddConvexRadiusTab aIncluding, float convexRadiusA, TransformedAaBox bExcluding, AddConvexRadiusTab bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a pair of transformed boxes.- Parameters:
aExcluding- box A without convex radius (not null, unaffected)aIncluding- box A with convex radius (not null, unaffected)convexRadiusA- the convex radius of box AbExcluding- box B without convex radius (not null, unaffected)bIncluding- box B with convex radius (not null, unaffected)convexRadiusB- the convex radius of box BcollisionToleranceSq- the square of the collision tolerancepenetrationTolerance- the penetration toleranceiov- the direction vector (not null, modified)storePointA- storage for the point on box A (not null, modified)storePointB- storage for the point on box B (not null, modified)- Returns:
trueif the boxes intersect, otherwisefalse
-
getPenetrationDepth
public boolean getPenetrationDepth(TransformedAaBox aExcluding, TransformedAaBox aIncluding, float convexRadiusA, TransformedSphere bExcluding, TransformedSphere bIncluding, float convexRadiusB, float collisionToleranceSq, float penetrationTolerance, Vec3 iov, Vec3 storePointA, Vec3 storePointB) Perform the GJK and EPA steps on a transformed box and a transformed sphere.- Parameters:
aExcluding- the box without convex radius (not null, unaffected)aIncluding- the box with convex radius (not null, unaffected)convexRadiusA- the convex radius of the boxbExcluding- the sphere without convex radius (not null, unaffected)bIncluding- the sphere with convex radius (not null, unaffected)convexRadiusB- the convex radius of the spherecollisionToleranceSq- the square of the collision tolerancepenetrationTolerance- the penetration toleranceiov- the direction vector (not null, modified)storePointA- storage for the point on the box (not null, modified)storePointB- storage for the point on the sphere (not null, modified)- Returns:
trueif the box and sphere intersect, otherwisefalse
-