C# Class FarseerPhysics.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: scastle/Solitude Class Usage Examples

Méthodes publiques

Свойство Type Description
Radius float

Méthodes publiques

Méthode Description
Clone ( ) : Shape

Clone the concrete shape

ComputeAABB ( AABB &aabb, Transform &transform, 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, not the centroid.

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

Cast a ray against a child shape.

TestPoint ( Transform &transform, Vector2 &point ) : bool

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

Méthodes protégées

Méthode Description
Shape ( ) : FarseerPhysics.Common

Method Details

Clone() public abstract méthode

Clone the concrete shape
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 &transform, int childIndex ) : void
aabb AABB The aabb results.
transform Transform The world transform of the shape.
childIndex int The child shape index.
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 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 Transform The transform to be applied to the shape.
childIndex int The child shape index.
Résultat bool

Shape() protected méthode

protected Shape ( ) : FarseerPhysics.Common
Résultat FarseerPhysics.Common

TestPoint() public abstract méthode

Test a point for containment in this shape. This only works for convex shapes.
public abstract TestPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform The shape world transform.
point Microsoft.Xna.Framework.Vector2 a point in world coordinates.
Résultat bool

Property Details

Radius public_oe property

Radius of the Shape
public float Radius
Résultat float