C# Class Box2DX.Collision.Shape

Inheritance: IDisposable
Afficher le fichier Open project: KrugerHeavyIndustries/box2d-unity Class Usage Examples

Protected Properties

Свойство Type Description
_type ShapeType

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Shape ( ) : System

Method Details

ComputeAABB() public abstract méthode

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.
Résultat void

ComputeMass() public abstract méthode

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
Résultat void

ComputeSubmergedArea() public abstract méthode

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.
Résultat float

ComputeSweepRadius() public abstract méthode

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.
Résultat float

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetSupport() public abstract méthode

public abstract GetSupport ( Vector2 d ) : int
d Vector2
Résultat int

GetSupportVertex() public abstract méthode

public abstract GetSupportVertex ( Vector2 d ) : Vector2
d Vector2
Résultat Vector2

GetVertex() public abstract méthode

public abstract GetVertex ( int index ) : Vector2
index int
Résultat Vector2

Shape() protected méthode

protected Shape ( ) : System
Résultat System

TestPoint() public abstract méthode

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.
Résultat bool

TestSegment() public abstract méthode

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].
Résultat SegmentCollide

Property Details

_type protected_oe property

protected ShapeType _type
Résultat ShapeType