Свойство | Type | Description | |
---|---|---|---|
_arclen | List |
||
_pts | List |
||
_squaredError | System.Double | ||
_u | List |
Méthode | Description | |
---|---|---|
ArcLengthParamaterize ( int first, int last ) : void |
Initializes the first (last - first) elements of u with scaled arc lengths.
|
|
FindMaxSquaredError ( int first, int last, CubicBezier curve, int &split ) : System.Double |
Computes the maximum squared distance from a point to the curve using the current parameterization.
|
|
FitCurve ( int first, int last, System.Windows.Vector tanL, System.Windows.Vector tanR, CubicBezier &curve, int &split ) : bool |
Tries to fit single Bezier curve to the points in [first ... last]. Destroys anything in _u in the process. Assumes there are at least two points to fit.
|
|
GenerateBezier ( int first, int last, System.Windows.Vector tanL, System.Windows.Vector tanR ) : CubicBezier |
Generates a bezier curve for the segment using a least-squares approximation. for the derivation of this and why it works, see http://read.pudn.com/downloads141/ebook/610086/Graphics_Gems_I.pdf page 626 and beyond. tl;dr: math.
|
|
GetCenterTangent ( int first, int last, int split ) : System.Windows.Vector |
Gets the tangent at a given point in the curve.
|
|
GetLeftTangent ( int last ) : System.Windows.Vector |
Gets the tangent for the start of the cure.
|
|
GetRightTangent ( int first ) : System.Windows.Vector |
Gets the tangent for the the end of the curve.
|
|
InitializeArcLengths ( ) : void |
Builds the arc length array using the points array. Assumes _pts has points and _arclen is empty.
|
|
Reparameterize ( int first, int last, CubicBezier curve ) : void |
Attempts to find a slightly better parameterization for u on the given curve.
|
protected ArcLengthParamaterize ( int first, int last ) : void | ||
first | int | |
last | int | |
Résultat | void |
protected FindMaxSquaredError ( int first, int last, CubicBezier curve, int &split ) : System.Double | ||
first | int | |
last | int | |
curve | CubicBezier | |
split | int | |
Résultat | System.Double |
protected FitCurve ( int first, int last, System.Windows.Vector tanL, System.Windows.Vector tanR, CubicBezier &curve, int &split ) : bool | ||
first | int | Index of first point to consider. |
last | int | Index of last point to consider (inclusive). |
tanL | System.Windows.Vector | Tangent at teh start of the curve ("left"). |
tanR | System.Windows.Vector | Tangent on the end of the curve ("right"). |
curve | CubicBezier | The fitted curve. |
split | int | Point at which to split if this method returns false. |
Résultat | bool |
protected GenerateBezier ( int first, int last, System.Windows.Vector tanL, System.Windows.Vector tanR ) : CubicBezier | ||
first | int | |
last | int | |
tanL | System.Windows.Vector | |
tanR | System.Windows.Vector | |
Résultat | CubicBezier |
protected GetCenterTangent ( int first, int last, int split ) : System.Windows.Vector | ||
first | int | |
last | int | |
split | int | |
Résultat | System.Windows.Vector |
protected GetLeftTangent ( int last ) : System.Windows.Vector | ||
last | int | |
Résultat | System.Windows.Vector |
protected GetRightTangent ( int first ) : System.Windows.Vector | ||
first | int | |
Résultat | System.Windows.Vector |
protected Reparameterize ( int first, int last, CubicBezier curve ) : void | ||
first | int | |
last | int | |
curve | CubicBezier | |
Résultat | void |