C# 클래스 Box2DX.Collision.Shape

상속: IDisposable
파일 보기 프로젝트 열기: KrugerHeavyIndustries/box2d-unity 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_type ShapeType

공개 메소드들

메소드 설명
ComputeAABB ( AABB &aabb, Box2DX.Common.Transform xf ) : void

Given a Transform, compute the associated axis aligned bounding box for this shape.

ComputeMass ( MassData &massData, float density ) : void

Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.

ComputeSubmergedArea ( Vector2 normal, float offset, Box2DX.Common.Transform xf, Vector2 &c ) : float

Compute the volume and centroid of this shape intersected with a half plane.

ComputeSweepRadius ( Vector2 pivot ) : float

Compute the sweep radius. This is used for conservative advancement (continuous collision detection).

Dispose ( ) : void
GetSupport ( Vector2 d ) : int
GetSupportVertex ( Vector2 d ) : Vector2
GetVertex ( int index ) : Vector2
TestPoint ( Box2DX.Common.Transform xf, Vector2 p ) : bool

Test a point for containment in this shape. This only works for convex shapes.

TestSegment ( Box2DX.Common.Transform xf, float &lambda, Vector2 &normal, Segment segment, float maxLambda ) : SegmentCollide

Perform a ray cast against this shape.

보호된 메소드들

메소드 설명
Shape ( ) : System

메소드 상세

ComputeAABB() 공개 추상적인 메소드

Given a Transform, compute the associated axis aligned bounding box for this shape.
public abstract ComputeAABB ( AABB &aabb, Box2DX.Common.Transform xf ) : void
aabb AABB Returns the axis aligned box.
xf Box2DX.Common.Transform The world Transform of the shape.
리턴 void

ComputeMass() 공개 추상적인 메소드

Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.
public abstract ComputeMass ( MassData &massData, float density ) : void
massData MassData Returns the mass data for this shape
density float
리턴 void

ComputeSubmergedArea() 공개 추상적인 메소드

Compute the volume and centroid of this shape intersected with a half plane.
public abstract ComputeSubmergedArea ( Vector2 normal, float offset, Box2DX.Common.Transform xf, Vector2 &c ) : float
normal Vector2 Normal the surface normal.
offset float Offset the surface offset along normal.
xf Box2DX.Common.Transform The shape Transform.
c Vector2 Returns the centroid.
리턴 float

ComputeSweepRadius() 공개 추상적인 메소드

Compute the sweep radius. This is used for conservative advancement (continuous collision detection).
public abstract ComputeSweepRadius ( Vector2 pivot ) : float
pivot Vector2 Pivot is the pivot point for rotation.
리턴 float

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetSupport() 공개 추상적인 메소드

public abstract GetSupport ( Vector2 d ) : int
d Vector2
리턴 int

GetSupportVertex() 공개 추상적인 메소드

public abstract GetSupportVertex ( Vector2 d ) : Vector2
d Vector2
리턴 Vector2

GetVertex() 공개 추상적인 메소드

public abstract GetVertex ( int index ) : Vector2
index int
리턴 Vector2

Shape() 보호된 메소드

protected Shape ( ) : System
리턴 System

TestPoint() 공개 추상적인 메소드

Test a point for containment in this shape. This only works for convex shapes.
public abstract TestPoint ( Box2DX.Common.Transform xf, Vector2 p ) : bool
xf Box2DX.Common.Transform The shape world Transform.
p Vector2 A point in world coordinates.
리턴 bool

TestSegment() 공개 추상적인 메소드

Perform a ray cast against this shape.
public abstract TestSegment ( Box2DX.Common.Transform xf, float &lambda, Vector2 &normal, Segment segment, float maxLambda ) : SegmentCollide
xf Box2DX.Common.Transform The shape world Transform.
lambda float Returns the hit fraction. You can use this to compute the contact point /// p = (1 - lambda) * segment.P1 + lambda * segment.P2.
normal Vector2 Returns the normal at the contact point. If there is no intersection, /// the normal is not set.
segment Segment Defines the begin and end point of the ray cast.
maxLambda float A number typically in the range [0,1].
리턴 SegmentCollide

프로퍼티 상세

_type 보호되어 있는 프로퍼티

protected ShapeType _type
리턴 ShapeType