![]() |
Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
|
Allows for cubic bezier calculations and manipulation (e.g. division, tangents, normals, etc.) More...
#include <hdicoreBezier.h>
Public Types | |
| enum | AdjustmentResult { AdjustmentReflectedStartOut = 1 << 0 , AdjustmentReflectedEndIn = 1 << 1 , AdjustmentRotatedStartOut = 1 << 2 , AdjustmentRotatedEndIn = 1 << 3 } |
| Indicates what happened when a bezier was adjusted to pass through a point. | |
Public Member Functions | |
| Bezier () | |
| Constructs a new Bezier object with all points at (0,0) | |
| Bezier (const Bezier &bez_) | |
| Constructs a new Bezier object from an existing Bezier object (copy constructor) | |
| Bezier (const ArtboardSegPoint &segPt1_, const ArtboardSegPoint &segPt2_) | |
| Constructs a new Bezier object from two segment endpoints. | |
| Bezier (const ArtboardPoint &start_, const ArtboardPoint &startOut_, const ArtboardPoint &endIn_, const ArtboardPoint &end_) | |
| Constructs a new Bezier object from individual component points. | |
| virtual | ~Bezier () |
| Destructs a Bezier object. | |
| virtual Bezier & | operator= (const Bezier &rhs_) |
| Allows one Bezier object to be assigned from another. | |
| virtual ArtboardPoint | startPoint () const |
| Gets the first anchor point of the bezier. | |
| virtual ArtboardPoint | startOutPoint () const |
| Gets the first control point of the bezier. | |
| virtual ArtboardPoint | endInPoint () const |
| Gets the second control point of the bezier. | |
| virtual ArtboardPoint | endPoint () const |
| Gets the second anchor point of the bezier. | |
| virtual AdjustmentResult | adjustThruPoint (const ArtboardPoint &pt_, const double t_) |
| Adjusts the bezier such that the given t-value will pass through the provided point. | |
| virtual void | divide (const double t_, Bezier &bez1__, Bezier &bez2__) const |
| Splits the target bezier into two separate beziers at a given t-value. | |
| virtual Bezier | section (const double startT_, const double endT_) const |
| Gets a section of the target bezier, from a starting t-value to an ending t-value. | |
| virtual ArtboardPoint | evaluate (const double t_) const |
| Evaluates a given t-value along the target bezier as a point on the artboard. | |
| virtual double | length () const |
| Gets the length of the bezier. | |
| virtual double | sublength (const double startT_, const double endT_) const |
| Gives approximate length of a bezier from t-value startT_ to t-value endT_. | |
| virtual double | tAtLength (const double length_) const |
| Gives the t-value at a specific length along the target bezier. | |
| virtual void | setPoints (const ArtboardPoint &start_, const ArtboardPoint &startOut_, const ArtboardPoint &endIn_, const ArtboardPoint &end_) |
| Sets the anchor and control points of the bezier. | |
| virtual Angle | tangentAngle (const double t_) const |
| Gets the tangent angle at some t-value along the bezier. | |
| virtual Angle | normalAngle (const double t_) const |
| Gets the normal angle at some t-value along the bezier. | |
| virtual bool | curved () const |
| Determines whether the bezier has a curved path. | |
| virtual bool | radius (const double t_, double &radius__) const |
| Gets the radius of the curve at some t-value along the bezier. | |
| virtual bool | center (const double t_, ArtboardPoint ¢er__) const |
| Gets the center point of the curve at some t-value along the bezier. | |
| virtual bool | radiusAndCenter (const double t_, double &radius__, ArtboardPoint ¢er__) const |
| Gets both the radius and center point of the curve at some t-value along the bezier. | |
| virtual bool | isCircularArc () const |
| Gets whether the bezier describes an arc segment of a circle. | |
| virtual ArtboardRect | bounds () const |
| Gets the bounds rect for the target bezier; that is, the rect that completely encloses all the control points, NOT that rect that encloses the extent of the bezier curvature. | |
| virtual bool | operator== (const Bezier &rhs_) const |
| Tests whether a given Bezier object is the same as another. | |
| virtual bool | operator!= (const Bezier &rhs_) const |
| Tests whether a given Bezier object is not the same as another. | |
Friends | |
| aip::Bezier * | __accessImpl (const Bezier &) |
| Bezier | __accessCtor (const aip::Bezier &) |
Allows for cubic bezier calculations and manipulation (e.g. division, tangents, normals, etc.)
| hdi::core::Bezier::Bezier | ( | ) |
Constructs a new Bezier object with all points at (0,0)
| hdi::core::Bezier::Bezier | ( | const Bezier & | bez_ | ) |
| hdi::core::Bezier::Bezier | ( | const ArtboardSegPoint & | segPt1_, |
| const ArtboardSegPoint & | segPt2_ | ||
| ) |
Constructs a new Bezier object from two segment endpoints.
| segPt1_ | First segment point |
| segPt2_ | Second segment point |
| hdi::core::Bezier::Bezier | ( | const ArtboardPoint & | start_, |
| const ArtboardPoint & | startOut_, | ||
| const ArtboardPoint & | endIn_, | ||
| const ArtboardPoint & | end_ | ||
| ) |
Constructs a new Bezier object from individual component points.
| start_ | First anchor point |
| startOut_ | First control point |
| endIn_ | Second control point |
| end_ | Second anchor point |
|
virtual |
Destructs a Bezier object.
|
virtual |
Adjusts the bezier such that the given t-value will pass through the provided point.
| pt_ | Point the bezier should pass through at t_ |
| t_ | T-value along the bezier to force through pt_ |
|
virtual |
Gets the bounds rect for the target bezier; that is, the rect that completely encloses all the control points, NOT that rect that encloses the extent of the bezier curvature.
|
virtual |
Gets the center point of the curve at some t-value along the bezier.
| t_ | T-value on the bezier whose radius is needed |
| center__ | Return-by-reference for the center point of the curve of the bezier at t_ |
|
virtual |
Determines whether the bezier has a curved path.
|
virtual |
Splits the target bezier into two separate beziers at a given t-value.
| t_ | T-value along the target bezier to perform the split |
| bez1__ | Return-by-reference for the first bezier resulting from the split |
| bez2__ | Return-by-reference for the second bezier resulting from the split |
|
virtual |
Gets the second control point of the bezier.
|
virtual |
Gets the second anchor point of the bezier.
|
virtual |
Evaluates a given t-value along the target bezier as a point on the artboard.
| t_ | T-value along the bezier for the point in question |
|
virtual |
Gets whether the bezier describes an arc segment of a circle.
|
virtual |
Gets the length of the bezier.
|
virtual |
Gets the normal angle at some t-value along the bezier.
| t_ | T-value on the bezier whose normal angle is needed |
|
virtual |
|
virtual |
|
virtual |
Gets the radius of the curve at some t-value along the bezier.
| t_ | T-value on the bezier whose radius is needed |
| radius__ | Return-by-reference for the radius of the curve of the bezier at t_ |
|
virtual |
Gets both the radius and center point of the curve at some t-value along the bezier.
| t_ | T-value on the bezier whose radius is needed |
| radius__ | Return-by-reference for the radius of the curve of the bezier at t_ |
| center__ | Return-by-reference for the center point of the curve of the bezier at t_ |
|
virtual |
Gets a section of the target bezier, from a starting t-value to an ending t-value.
| startT_ | Starting position (t-value) of the bezier subsection |
| endT_ | Ending position (t-value) of the bezier subsection |
|
virtual |
Sets the anchor and control points of the bezier.
| start_ | First anchor point |
| startOut_ | First control point |
| endIn_ | Second control point |
| end_ | Second anchor point |
|
virtual |
Gets the first control point of the bezier.
|
virtual |
Gets the first anchor point of the bezier.
|
virtual |
Gives approximate length of a bezier from t-value startT_ to t-value endT_.
| startT_ | Starting position (t-value) to begin the calculation |
| endT_ | Ending position (t-value) to end the calculation |
|
virtual |
Gets the tangent angle at some t-value along the bezier.
| t_ | T-value on the bezier whose tangent angle is needed |
|
virtual |
Gives the t-value at a specific length along the target bezier.
| length_ | The length along the target bezier, in points, for which a t-value is desired |