C# Класс FarseerPhysics.Factories.PathManager

An easy to use manager for creating paths.
Показать файл Открыть проект

Открытые методы

Метод Описание
AttachBodiesWithRevoluteJoint ( World world, List bodies, Vector2 localAnchorA, Vector2 localAnchorB, bool connectFirstAndLast, bool collideConnected ) : void

Attaches the bodies with revolute joints.

AttachBodiesWithSliderJoint ( World world, List bodies, Vector2 localAnchorA, Vector2 localAnchorB, bool connectFirstAndLast, bool collideConnected, float minLength, float maxLength ) : void

Attaches the bodies with revolute joints.

ConvertPathToEdges ( Path path, Body body, int subdivisions ) : void

Convert a path into a set of edges and attaches them to the specified body. Note: use only for static edges.

ConvertPathToPolygon ( Path path, Body body, float density, int subdivisions ) : void

Convert a closed path into a polygon. Convex decomposition is automatically performed.

EvenlyDistibuteShapesAlongPath ( World world, Path path, IEnumerable shapes, BodyType type, int copies, float density ) : List

Duplicates the given Body along the given path for approximatly the given copies.

EvenlyDistibuteShapesAlongPath ( World world, Path path, Shape shape, BodyType type, int copies, float density ) : List

Duplicates the given Body along the given path for approximatly the given copies.

MoveBodyOnPath ( Path path, Body body, float time, float strength, float timeStep ) : void

Moves the body on the path.

Описание методов

AttachBodiesWithRevoluteJoint() публичный статический Метод

Attaches the bodies with revolute joints.
public static AttachBodiesWithRevoluteJoint ( World world, List bodies, Vector2 localAnchorA, Vector2 localAnchorB, bool connectFirstAndLast, bool collideConnected ) : void
world FarseerPhysics.Dynamics.World The world.
bodies List The bodies.
localAnchorA Vector2 The local anchor A.
localAnchorB Vector2 The local anchor B.
connectFirstAndLast bool if set to true [connect first and last].
collideConnected bool if set to true [collide connected].
Результат void

AttachBodiesWithSliderJoint() публичный статический Метод

Attaches the bodies with revolute joints.
public static AttachBodiesWithSliderJoint ( World world, List bodies, Vector2 localAnchorA, Vector2 localAnchorB, bool connectFirstAndLast, bool collideConnected, float minLength, float maxLength ) : void
world FarseerPhysics.Dynamics.World The world.
bodies List The bodies.
localAnchorA Vector2 The local anchor A.
localAnchorB Vector2 The local anchor B.
connectFirstAndLast bool if set to true [connect first and last].
collideConnected bool if set to true [collide connected].
minLength float
maxLength float
Результат void

ConvertPathToEdges() публичный статический Метод

Convert a path into a set of edges and attaches them to the specified body. Note: use only for static edges.
public static ConvertPathToEdges ( Path path, Body body, int subdivisions ) : void
path FarseerPhysics.Common.Path The path.
body FarseerPhysics.Dynamics.Body The body.
subdivisions int The subdivisions.
Результат void

ConvertPathToPolygon() публичный статический Метод

Convert a closed path into a polygon. Convex decomposition is automatically performed.
public static ConvertPathToPolygon ( Path path, Body body, float density, int subdivisions ) : void
path FarseerPhysics.Common.Path The path.
body FarseerPhysics.Dynamics.Body The body.
density float The density.
subdivisions int The subdivisions.
Результат void

EvenlyDistibuteShapesAlongPath() публичный статический Метод

Duplicates the given Body along the given path for approximatly the given copies.
public static EvenlyDistibuteShapesAlongPath ( World world, Path path, IEnumerable shapes, BodyType type, int copies, float density ) : List
world FarseerPhysics.Dynamics.World The world.
path FarseerPhysics.Common.Path The path.
shapes IEnumerable The shapes.
type BodyType The type.
copies int The copies.
density float
Результат List

EvenlyDistibuteShapesAlongPath() публичный статический Метод

Duplicates the given Body along the given path for approximatly the given copies.
public static EvenlyDistibuteShapesAlongPath ( World world, Path path, Shape shape, BodyType type, int copies, float density ) : List
world FarseerPhysics.Dynamics.World The world.
path FarseerPhysics.Common.Path The path.
shape FarseerPhysics.Collision.Shapes.Shape The shape.
type BodyType The type.
copies int The copies.
density float The density.
Результат List

MoveBodyOnPath() публичный статический Метод

Moves the body on the path.
public static MoveBodyOnPath ( Path path, Body body, float time, float strength, float timeStep ) : void
path FarseerPhysics.Common.Path The path.
body FarseerPhysics.Dynamics.Body The body.
time float The time.
strength float The strength.
timeStep float The time step.
Результат void