C# Класс Box2DX.Collision.Shape

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_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