構造体 Sphere2

A sphere class in 2D. [詳細]

Sphere2に対する継承グラフ
ICollisionBasics

すべてのメンバ一覧

Public メソッド

 Sphere2 (Vector2 center, float radius)
 Sphere2 constructor.
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.

Public 変数

Vector2 Center
 Sphere center.
float Radius
 Sphere radius.

説明

A sphere class in 2D.


メソッド

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.

ICollisionBasicsを実装しています。

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.

ICollisionBasicsを実装しています。