C# Class Project290.Physics.Common.Path

Mostrar archivo Open project: scastle/Solitude Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Add ( Vector2 point ) : void
GetLength ( ) : float
GetPosition ( float time ) : Vector2
GetPositionNormal ( float time ) : Vector2

Gets the normal for the given time.

GetVertices ( int divisions ) : List

Returns a set of points defining the curve with the specifed number of divisions between each control point.

NextIndex ( int index ) : int

Gets the next index of a controlpoint

Path ( ) : System

Initializes a new instance of the Path class.

Path ( IList vertices ) : System

Initializes a new instance of the Path class.

Path ( Vector2 vertices ) : System

Initializes a new instance of the Path class.

PreviousIndex ( int index ) : int

Gets the previous index of a controlpoint

Remove ( Vector2 point ) : void
RemoveAt ( int index ) : void
Rotate ( float value ) : void

Rotate the control points by the defined value in radians.

Scale ( Vector2 &value ) : void

Scales the control points by the specified vector.

SubdivideEvenly ( int divisions ) : List
ToString ( ) : string
Translate ( Vector2 &vector ) : void

Translates the control points by the specified vector.

Method Details

Add() public method

public Add ( Vector2 point ) : void
point Vector2
return void

GetLength() public method

public GetLength ( ) : float
return float

GetPosition() public method

public GetPosition ( float time ) : Vector2
time float
return Vector2

GetPositionNormal() public method

Gets the normal for the given time.
public GetPositionNormal ( float time ) : Vector2
time float The time
return Vector2

GetVertices() public method

Returns a set of points defining the curve with the specifed number of divisions between each control point.
public GetVertices ( int divisions ) : List
divisions int Number of divisions between each control point.
return List

NextIndex() public method

Gets the next index of a controlpoint
public NextIndex ( int index ) : int
index int The index.
return int

Path() public method

Initializes a new instance of the Path class.
public Path ( ) : System
return System

Path() public method

Initializes a new instance of the Path class.
public Path ( IList vertices ) : System
vertices IList The vertices to created the path from.
return System

Path() public method

Initializes a new instance of the Path class.
public Path ( Vector2 vertices ) : System
vertices Vector2 The vertices to created the path from.
return System

PreviousIndex() public method

Gets the previous index of a controlpoint
public PreviousIndex ( int index ) : int
index int The index.
return int

Remove() public method

public Remove ( Vector2 point ) : void
point Vector2
return void

RemoveAt() public method

public RemoveAt ( int index ) : void
index int
return void

Rotate() public method

Rotate the control points by the defined value in radians.
public Rotate ( float value ) : void
value float The amount to rotate by in radians.
return void

Scale() public method

Scales the control points by the specified vector.
public Scale ( Vector2 &value ) : void
value Vector2 The Value.
return void

SubdivideEvenly() public method

public SubdivideEvenly ( int divisions ) : List
divisions int
return List

ToString() public method

public ToString ( ) : string
return string

Translate() public method

Translates the control points by the specified vector.
public Translate ( Vector2 &vector ) : void
vector Vector2 The vector.
return void