インタフェース ICollisionBasics

Bounds2, Sphere2, ConvexPoly2 の共通インターフェース。 [詳細]

ICollisionBasicsに対する継承グラフ
Bounds2 ConvexPoly2 Plane2 Sphere2

すべてのメンバ一覧

Public メソッド

bool IsInside (Vector2 point)
 Return true if 'point' is inside the primitive (in its negative space).
void ClosestSurfacePoint (Vector2 point, out Vector2 ret, out float sign)
 Return the closest point to 'point' that lies on the surface of the primitive.
float SignedDistance (Vector2 point)
 Return the signed distance (penetration distance) from 'point' to the surface of the primitive.
bool NegativeClipSegment (ref Vector2 A, ref Vector2 B)
 Assuming the primitive is convex, clip the segment AB against the primitive.

説明

Bounds2, Sphere2, ConvexPoly2 の共通インターフェース。


メソッド

void ClosestSurfacePoint ( Vector2  point,
out Vector2  ret,
out float  sign 
)

Return the closest point to 'point' that lies on the surface of the primitive.

If that point is inside the primitive, sign is negative.

Bounds2, Plane2, Sphere2, と ConvexPoly2で実装されています。

bool NegativeClipSegment ( ref Vector2  A,
ref Vector2  B 
)

Assuming the primitive is convex, clip the segment AB against the primitive.

Return false if AB is entirely in positive halfspace, else clip against negative space and return true.

Bounds2, Plane2, Sphere2, と ConvexPoly2で実装されています。