FormIt C++ API
v23.0.0 (2023.0.0)
|
The Point2d class stores a point in 2D space.
The coordinates of the point are accessed via public data members, x and y, or via the subscript operator, index 0 being the x-coordinate and index 1 being the y-coordinate.
#include <Point2d.h>
Public Member Functions | |
Point2d () | |
Point2d (double xx, double yy) | |
Point2d | operator+ (const Point2d &p) const |
Point2d | operator+ (const Vector2d &v) const |
Vector2d | operator- (const Point2d &p) const |
Point2d | operator- (const Vector2d &v) const |
Point2d | operator- () const |
Point2d | operator* (double scalar) const |
Point2d | operator/ (double scalar) const |
double | operator% (const Vector2d &v) const |
double | operator[] (size_t index) const |
double & | operator[] (size_t index) |
double | length () const |
double | lengthSqrd () const |
double | lengthRect () const |
double | dist (const Point2d &p) const |
double | distSqrd (const Point2d &p) const |
double | distRect (const Point2d &p) const |
bool | isEqual (const Point2d &p, double epsSqrd=WSM_DISTANCE_TOL2) const |
bool | isEqualRect (const Point2d &p, double epsRect=WSM_DISTANCE_TOL) const |
Point2d & | set (double xx, double yy) |
Point2d & | zero () |
Point2d & | scale (const Vector2d &v) |
Point2d | getScaled (const Vector2d &v) const |
void | operator+= (const Point2d &p) |
void | operator+= (const Vector2d &v) |
void | operator-= (const Point2d &p) |
void | operator-= (const Vector2d &v) |
void | operator*= (double scalar) |
void | operator/= (double scalar) |
bool | isValid () const |
Vector2d | toVector2d () const |
void | rotate (double aRad) |
Static Public Member Functions | |
static double | det (const WSM::Point2d &a, const WSM::Point2d &b) |
Public Attributes | |
double | x |
double | y |
Static Public Attributes | |
static const Point2d | kNull |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void WSM::Point2d::rotate | ( | double | aRad | ) |
|
inline |
|
inline |
|
inline |
|
static |
double WSM::Point2d::x |
double WSM::Point2d::y |