Table of Contents

Interface IDistanceTestable

Namespace
Jitter2.Collision
Assembly
Jitter2.dll

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

support T

The query shape.

orientation JQuaternion

The query shape orientation in world space.

position JVector

The query shape position in world space.

pointA JVector

Closest point on the query shape in world space. Undefined when the shapes overlap.

pointB JVector

Closest point on this object in world space. Undefined when the shapes overlap.

normal JVector

Unit 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.

distance float

The separation distance between the shapes. Zero when overlapping.

Returns

bool

true if the shapes are separated; false if they overlap.

Type Parameters

T

The query support-map type.