Interface IDistanceTestable
Represents an entity that supports closest-point distance queries against a support-mapped query shape.
public interface IDistanceTestable
Methods
Distance<T>(in T, in JQuaternion, in JVector, out JVector, out JVector, out JVector, out float)
Finds the closest points between this object and the query shape.
bool Distance<T>(in T support, in JQuaternion orientation, in JVector position, out JVector pointA, out JVector pointB, out JVector normal, out float distance) where T : ISupportMappable
Parameters
supportTThe query shape.
orientationJQuaternionThe query shape orientation in world space.
positionJVectorThe query shape position in world space.
pointAJVectorClosest point on the query shape in world space. Undefined when the shapes overlap.
pointBJVectorClosest point on this object in world space. Undefined when the shapes overlap.
normalJVectorUnit direction from the query shape toward this object, or Zero when the shapes overlap. Do not use this to test whether a result was found.
distancefloatThe separation distance between the shapes. Zero when overlapping.
Returns
- bool
trueif the shapes are separated;falseif they overlap.
Type Parameters
TThe query support-map type.