Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document view or a UI window. More...
#include <hdicorePoint.h>
Public Types | |
typedef std::vector< Point > | PointVector |
Public Member Functions | |
Point () | |
Default Point constructor; sets x and y to 0.0. | |
Point (const double x_, const double y_) | |
Point constructor, taking x and y arguments. | |
Point (const Point &pt_) | |
Point copy constructor. | |
virtual | ~Point () |
Point destructor. | |
virtual Point & | operator= (const Point &rhs_) |
Sets a Point object from another Point object. | |
virtual bool | operator== (const Point &rhs_) const |
Tests whether a given Point object is the same as another. | |
virtual bool | operator!= (const Point &rhs_) const |
Tests whether a given Point object is not the same as another. | |
virtual Point | operator+ (const Point &rhs_) const |
Allows two points to have their x and y values added using the + operator. | |
virtual Point & | operator+= (const Point &rhs_) |
Allows two points to have their x and y values added and assigned using the += operator. | |
virtual Point | operator- (const Point &rhs_) const |
Allows two points to have their x and y values subtracted using the - operator. | |
virtual Point & | operator-= (const Point &rhs_) |
Allows two points to have their x and y values subtracted and assigned using the -= operator. | |
virtual Angle | operator^ (const Point &rhs_) const |
Gets the angle of the vector (this, rhs_), if this were moved to the origin. | |
virtual double | operator| (const Point &rhs_) const |
Gets the distance between this and rhs_. | |
virtual bool | closeTo (const Point &compare_, const double tol_) const |
Gets whether a given point is within a certain tolerance ("close to") the target point. | |
virtual double | dotProduct (const Point &p2_) const |
Gets the dot product of two Point objects. | |
virtual Point | offset (const double tx_, const double ty_) const |
Offsets a point along the x- and y-axes by given amounts. | |
virtual Point | rotate (const Point &origin_, const Angle &angle_) const |
Rotates the point about a given "origin" point by a certain angle. | |
virtual Point | move (const double length_, const Angle &angle_) const |
"Moves" a point by a given length and angle away from its current position | |
virtual Point | transform (const TransformMatrix &m_) const |
Transforms a point via a 2-dimensional transformation matrix. | |
virtual bool | insidePolygon (const PointVector &points_) const |
Checks if the point is within the provided polygon. | |
Static Public Member Functions | |
static Point | LengthAngle (const double length_, const Angle &angle_) |
"Named constructor" for a point that is a given length and angle away from the origin | |
Public Attributes | |
double | x |
Position on the x-axis. | |
double | y |
Position on the y-axis. | |
Friends | |
aip::Point * | __accessImpl (const Point &) |
Point | __accessCtor (const aip::Point &) |
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document view or a UI window.
hdi::core::Point::Point | ( | ) |
Default Point constructor; sets x and y to 0.0.
hdi::core::Point::Point | ( | const double | x_, |
const double | y_ | ||
) |
Point constructor, taking x and y arguments.
x_ | Position on the x-axis |
y_ | Position on the y-axis |
hdi::core::Point::Point | ( | const Point & | pt_ | ) |
|
virtual |
Point destructor.
|
virtual |
Gets whether a given point is within a certain tolerance ("close to") the target point.
compare_ | Point to compare with |
tol_ | Tolerance between the points; a definition of what constitutes "close" |
|
virtual |
|
virtual |
Checks if the point is within the provided polygon.
points_[] | Points that describe the polygon |
"Moves" a point by a given length and angle away from its current position
length_ | Length away from the current position |
angle_ | Angle that the point is moved from the current position |
|
virtual |
Offsets a point along the x- and y-axes by given amounts.
tx_ | Amount to offset along the x-axis |
ty_ | Amount to offset along the y-axis |
|
virtual |
Allows two points to have their x and y values added using the + operator.
rhs_ | Righthand side of the + operator |
Allows two points to have their x and y values added and assigned using the += operator.
rhs_ | Righthand side of the += operator |
Allows two points to have their x and y values subtracted using the - operator.
rhs_ | Righthand side of the - operator |
Allows two points to have their x and y values subtracted and assigned using the -= operator.
rhs_ | Righthand side of the -= operator |
|
virtual |
Gets the angle of the vector (this, rhs_), if this were moved to the origin.
rhs_ | Righthand side of the ^ operator (called the angle operator in this case) |
|
virtual |
Gets the distance between this and rhs_.
rhs_ | Righthand side of the | operator (called the length operator in this case) |
|
virtual |
Rotates the point about a given "origin" point by a certain angle.
origin_ | New "origin" to rotate around |
angle_ | Angle to rotate by |
|
virtual |
Transforms a point via a 2-dimensional transformation matrix.
m_ | Transformation matrix to apply to the point |