Class Index | File Index

Classes


Class CAAT.Math.Curve


Defined in: Curve.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
A collection of CAAT.Math.Point objects.
 
Draw interactive handlers ?
 
If this segments belongs to an interactive path, the handlers will be this size.
 
k
Minimun solver step.
 
Curve length.
Method Summary
Method Attributes Method Name and Description
 
applyAsPath(director)
 
Calculate the curve length by incrementally solving the curve every substep=CAAT.Curve.k.
 
Return the first curve control point.
 
getBoundingBox(rectangle)
Calculates a curve bounding box.
 
getContour(numSamples)
Get an array of points defining the curve contour.
 
Return the cached curve length.
 
paint(director)
Paint the curve control points.
 
setPoint(point, index)
 
setPoints(points)
 
solve(point, t)
This method must be overriden by subclasses.
 
Return the last curve control point.
 
Signal the curve has been modified and recalculate curve length.
Class Detail
CAAT.Math.Curve()
Field Detail
coordlist
A collection of CAAT.Math.Point objects.

drawHandles
Draw interactive handlers ?

HANDLE_SIZE
If this segments belongs to an interactive path, the handlers will be this size.

k
Minimun solver step.

length
Curve length.
Method Detail
applyAsPath(director)
Parameters:
director
<=CAAT.Director>

{number} calcLength()
Calculate the curve length by incrementally solving the curve every substep=CAAT.Curve.k. This value defaults to .05 so at least 20 iterations will be performed.
Returns:
{number} the approximate curve length.

{CAAT.Point} endCurvePosition()
Return the first curve control point.
Returns:
{CAAT.Point}

{CAAT.Rectangle} getBoundingBox(rectangle)
Calculates a curve bounding box.
Parameters:
rectangle
{CAAT.Rectangle} a rectangle to hold the bounding box.
Returns:
{CAAT.Rectangle} the rectangle parameter.

getContour(numSamples)
Get an array of points defining the curve contour.
Parameters:
numSamples
{number} number of segments to get.

{number} getLength()
Return the cached curve length.
Returns:
{number} the cached curve length.

paint(director)
Paint the curve control points.
Parameters:
director
{CAAT.Director}

setPoint(point, index)
Parameters:
point
index

setPoints(points)
Parameters:
points

{CAAT.Point} solve(point, t)
This method must be overriden by subclasses. It is called whenever the curve must be solved for some time=t. The t parameter must be in the range 0..1
Parameters:
point
{CAAT.Point} to store curve solution for t.
t
{number}
Returns:
{CAAT.Point} the point parameter.

{CAAT.Point} startCurvePosition()
Return the last curve control point.
Returns:
{CAAT.Point}

update()
Signal the curve has been modified and recalculate curve length.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:19 GMT-0700 (PDT)