C# Class Box2D.Collision.Shapes.Shape

A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in World are created automatically when a Fixture is created. Shapes may encapsulate a one or more child shapes.
Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Méthode Description
Clone ( ) : Shape

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

ComputeAABB ( AABB aabb, Transform xf, int childIndex ) : void

Given a transform, compute the associated axis aligned bounding box for a child 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.

Raycast ( RayCastOutput output, RayCastInput input, Transform transform, int childIndex ) : bool

Cast a ray against a child shape.

TestPoint ( Transform xf, Vec2 p ) : bool

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

Méthodes protégées

Méthode Description
Shape ( ShapeType type ) : Box2D.Common

Method Details

Clone() public abstract méthode

* /// Compute the volume and centroid of this shape intersected with a half plane * ///
public abstract Clone ( ) : Shape
Résultat Shape

ComputeAABB() public abstract méthode

Given a transform, compute the associated axis aligned bounding box for a child shape.
public abstract ComputeAABB ( AABB aabb, Transform xf, int childIndex ) : void
aabb AABB returns the axis aligned box.
xf Box2D.Common.Transform the world transform of the shape.
childIndex int
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.
public abstract ComputeMass ( MassData massData, float density ) : void
massData MassData returns the mass data for this shape.
density float the density in kilograms per meter squared.
Résultat void

Raycast() public abstract méthode

Cast a ray against a child shape.
public abstract Raycast ( RayCastOutput output, RayCastInput input, Transform transform, int childIndex ) : bool
output RayCastOutput the ray-cast results.
input RayCastInput the ray-cast input parameters.
transform Box2D.Common.Transform the transform to be applied to the shape.
childIndex int the child shape index
Résultat bool

Shape() protected méthode

protected Shape ( ShapeType type ) : Box2D.Common
type ShapeType
Résultat Box2D.Common

TestPoint() public abstract méthode

Test a point for containment in this shape. This only works for convex shapes.
public abstract TestPoint ( Transform xf, Vec2 p ) : bool
xf Box2D.Common.Transform the shape world transform.
p Box2D.Common.Vec2 a point in world coordinates.
Résultat bool