classHSpline 01
Detailed Description¶
The HSpline class represents the spline curves that contain HCPs and that are stitched together to make the patch based models.
Note:
Most operations that affect HSplines are actually performed on HCPs.
Model files store a list of splines. These splines are Bezier splines. A spline is a list of vertices and each vertex has an input/output tangent control vertice which is computed based on the alpha/gamma/magnitude values. Once these splines are loaded, a heuristic traverses them and determines valid 3 and 4 vertex patches.
Internal Hash Patch is essentially defined by 4 Hermite splines. Unlike the Bezier spline where the tangents are defined from control vectors which have absolute coordinates, Hermite splines are defined from CPs and tangent vectors for each CP. There are two tangents on each CP: the In tangent and the Out tangent. For smooth CPs, the In tangent and the Out tangent are in excact opposed direction.
Generally when you want to walk a spline you will use the HSpline member function GetHeadCP() to get the first HCP in the HSpline, and use HCP::GetNext() to walk to the end. If the spline is looped, make sure to use the HCP::IsLoop() function to find the last HCP in the spline.
See also:
HCP
Note:
All splines have a minimum of two control points.
Definition at line 12 of file HPatch.h.