Class GSpline
- Namespace
- Pinwheel.Griffin.SplineTool
- Assembly
- Pinwheel.Polaris.Runtime.dll
Bezier spline containing anchors and segments. This can have branches and loops.
[Serializable]
public class GSpline : IDisposable
- Inheritance
-
GSpline
- Implements
- Inherited Members
Properties
- Anchors
Collection of anchor points.
- HasBranch
Check if this spline has branch.
- Segments
Collection of segments. A segment is a path connecting 2 anchor points.
Methods
- AddAnchor(GSplineAnchor)
Add a new anchor to the list. Connect this anchor with others by calling AddSegment(int, int).
- AddSegment(int, int)
Add a new segment connecting 2 anchors. If the anchors were already connected before, it will not add a new segment but return the old one.
- EvaluatePosition(int, float)
Calculate the position at a point along the spline.
- EvaluateRotation(int, float)
Calculate the rotation at a point along the spline.
- EvaluateScale(int, float)
Calculate the scale at a point along the spline.
- EvaluateUpVector(int, float)
Calculate the up vector at a point along the spline.
- FindSegments(int)
Find all segments connected to an anchor.
- IsSegmentValid(int)
Check if a segment is valid, which mean it doesn't connect to non-existent anchors.
- RemoveAnchor(int)
Remove an anchor. This also removes all segments connecting to this anchor.
- RemoveSegment(int)
Remove a segment from the Segments collection.
- SmoothTangents(params int[])
Attempt to smooth out the spline path to make a nice curvy spline.
- TRS(int, float)
Calculate the transformation matrix at a point along the spline.