C# Class geek.GameEngine.Behaviours.BezierSegment

A class representing a segment of the bezier curve along which an object moves.
Mostra file Open project: impworks/xna.geek.engine Class Usage Examples

Public Methods

Method Description
BezierSegment ( Vector2 p1, Vector2 p2, Vector2 p3 ) : System
Step ( float length ) : void

Advance the object along the curve.

Private Methods

Method Description
calculateLength ( ) : void

Get the length of the curve. http://segfaultlabs.com/docs/quadratic-bezier-curve-length

getPoint ( Vector2 p1, Vector2 p2, float percent ) : Vector2

Find a point on the line piece.

updatePoint ( float percent ) : void

Update the current point.

Method Details

BezierSegment() public method

public BezierSegment ( Vector2 p1, Vector2 p2, Vector2 p3 ) : System
p1 Vector2
p2 Vector2
p3 Vector2
return System

Step() public method

Advance the object along the curve.
public Step ( float length ) : void
length float
return void