Class: M_Curve

The M_Curve class represents a curve in a vector layer.

Member Functions


int CountPoints()

Returns the number of points that make up the curve.

Return value (int): the number of points that make up the curve
M_Point Point(id)

Returns one of the points making up the curve (use 0 for the first point on the curve).

Return value (M_Point): a point on the curve id (int): id number of the point
int CountSegments()

Returns the number of segments on the curve. A segment is a section of curve between two control points.

Return value (int): the number of segments on the curve
bool IsSegmentSelected(segID)

Tests whether a segment is selected. (A curve segment is considered selected if the points at either end of it are selected.)

Return value (bool): true if the segment is selected, otherwise false segID (int): a segment of the curve (starting with 0)
bool IsPointOnSegment(ptID, segID)

Returns true if the given point is on the given curve segment.

Return value (bool): true or false ptID (int): a point identifier in the underlying mesh segID (int): a segment of the curve (starting with 0)
bool IsSegmentOn(segID)

Tests whether a given curve segment is on or not. Segments that are "off" do not appear in rendered output.

Return value (bool): true or false segID (int): segment identifier
void SetSegmentOn(segID, b)

Turns a curve segment on or off.

Return value: none segID (int): segment identifier b (bool): true to turn the segment on, false to turn it off
float GetCurvature(ptID, frame)

Returns the curvature through a given point on the curve.

Return value (float): curvature ptID (int): which point on the curve frame (int): at what time
void SetCurvature(ptID, curvature, frame)

Sets the curvature through a given point on the curve.

Return value: none ptID (int): which point on the curve curvature (float): curvature frame (int): at what time
LM_Vector2 PointOnSegment(segID, percent)

Returns the location of a point on a segment.

Return value (LM_Vector2): a point located on the segment segID (int): a segment of the curve (starting with 0) percent (float): where on the segment to locate the point (from 0 to 1)

Member Variables


fClosed (bool)

true if the curve is closed, otherwise false