Packagegraphics.geom
Classpublic class Beziers
InheritanceBeziers Inheritance Object

Static tool class to creates and manipulates Bezier curves.

Thanks :



Public Methods
 MethodDefined By
  
create(points:Array, step:Number = 0.1, precision:Number = 0, loop:Boolean = true):Array
[static] Calculates an array representation of Point elements to create a quadratic Bezier curve looped or not in n-points.
Beziers
  
getBaryCenter(points:Array):Vector2
[static] Returns the baryCenter of a collection of points.
Beziers
  
getCubicTangente(p0:Vector2, p1:Vector2, p2:Vector2, p3:Vector2, t:Number):Object
[static] Returns the cubic tangente object of the specified vectors.
Beziers
  
split(p0:Vector2, p1:Vector2, p2:Vector2, p3:Vector2):Object
[static] Split 4 Vector2 reference and return an Object.
Beziers
Method Detail
create()method
public static function create(points:Array, step:Number = 0.1, precision:Number = 0, loop:Boolean = true):Array

Calculates an array representation of Point elements to create a quadratic Bezier curve looped or not in n-points.

Parameters

points:Array
 
step:Number (default = 0.1)
 
precision:Number (default = 0)
 
loop:Boolean (default = true)

Returns
Array — an array representation of Point elements to create a quadratic Bezier curve looped or not in n-points.
getBaryCenter()method 
public static function getBaryCenter(points:Array):Vector2

Returns the baryCenter of a collection of points.

Parameters

points:Array

Returns
Vector2 — the baryCenter of a collection of points.
getCubicTangente()method 
public static function getCubicTangente(p0:Vector2, p1:Vector2, p2:Vector2, p3:Vector2, t:Number):Object

Returns the cubic tangente object of the specified vectors.

Parameters

p0:Vector2
 
p1:Vector2
 
p2:Vector2
 
p3:Vector2
 
t:Number

Returns
Object — the cubic tangente object of the specified vectors.
split()method 
public static function split(p0:Vector2, p1:Vector2, p2:Vector2, p3:Vector2):Object

Split 4 Vector2 reference and return an Object.

Parameters

p0:Vector2
 
p1:Vector2
 
p2:Vector2
 
p3:Vector2

Returns
Object