7#ifndef __HDI_CORE_POINT__
8#define __HDI_CORE_POINT__
17 #if defined(HDI_CORE_AIP_MODE)
22 #elif defined(HDI_CORE_PSP_MODE)
31 class TransformMatrix;
40 typedef std::vector<Point> PointVector;
67 Point(
const double x_,
const double y_);
265 #if defined(HDI_CORE_AIP_MODE)
266 friend aip::Point* __accessImpl(
const Point&);
267 friend Point __accessCtor(
const aip::Point&);
279 Point(
const aip::Point&);
280 #elif defined(HDI_CORE_PSP_MODE)
281 friend psp::Point* __accessImpl(
const Point&);
282 friend Point __accessCtor(
const psp::Point&);
294 Point(
const psp::Point&);
298 typedef std::unique_ptr<Point> PointUP;
299 typedef std::shared_ptr<Point> PointSP;
300 typedef std::weak_ptr<Point> PointWP;
302 #if defined(HDI_CORE_AIP_MODE)
303 extern aip::Point* __accessImpl(
const Point&);
304 extern Point __accessCtor(
const aip::Point&);
305 #elif defined(HDI_CORE_PSP_MODE)
306 extern psp::Point* __accessImpl(
const Point&);
307 extern Point __accessCtor(
const psp::Point&);
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:38
virtual Point rotate(const Point &origin_, const Angle &angle_) const
Rotates the point about a given "origin" point by a certain angle.
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_)
Sets a Point object from another Point object.
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
virtual bool operator==(const Point &rhs_) const
Tests whether a given Point object is the same as another.
virtual ~Point()
Point destructor.
virtual double dotProduct(const Point &p2_) const
Gets the dot product of two Point objects.
virtual double operator|(const Point &rhs_) const
Gets the distance between this and rhs_.
virtual Point operator+(const Point &rhs_) const
Allows two points to have their x and y values added using the + operator.
Point(const double x_, const double y_)
Point constructor, taking x and y arguments.
virtual Point offset(const double tx_, const double ty_) const
Offsets a point along the x- and y-axes by given amounts.
Point()
Default Point constructor; sets x and y to 0.0.
virtual Point & operator-=(const Point &rhs_)
Allows two points to have their x and y values subtracted and assigned using the -= operator.
virtual Point transform(const TransformMatrix &m_) const
Transforms a point via a 2-dimensional transformation matrix.
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 bool insidePolygon(const PointVector &points_) const
Checks if the point is within the provided polygon.
virtual Angle operator^(const Point &rhs_) const
Gets the angle of the vector (this, rhs_), if this were moved to the origin.
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 subtracted using the - operator.
double x
Position on the x-axis.
Definition: hdicorePoint.h:45
Point(const Point &pt_)
Point copy constructor.
double y
Position on the y-axis.
Definition: hdicorePoint.h:50
virtual Point move(const double length_, const Angle &angle_) const
"Moves" a point by a given length and angle away from its current position
Header file for describing angles.