3ds Max C++ API Reference
|
Description: This class describes a 2D point using double precision x and y coordinates. More...
#include <dpoint2.h>
Public Member Functions | |
constexpr | DPoint2 ()=default |
constexpr | DPoint2 (const DPoint2 &)=default |
constexpr | DPoint2 (DPoint2 &&)=default |
DPoint2 & | operator= (const DPoint2 &)=default |
DPoint2 & | operator= (DPoint2 &&)=default |
constexpr | DPoint2 (double X, double Y) |
constexpr | DPoint2 (const Point2 &a) |
constexpr | DPoint2 (const double af[2]) |
constexpr DPoint2 & | operator= (const Point2 &a) |
Assign a Point2 to this DPoint2. More... | |
double & | operator[] (int i) |
const for (0,1) More... | |
const double & | operator[] (int i) const |
constexpr | operator double * () |
Conversion function. More... | |
constexpr | operator const double * () const |
constexpr | operator Point2 () |
Convert DPoint2 to Point2. More... | |
constexpr DPoint2 | operator- () const |
Unary - operator. More... | |
constexpr DPoint2 | operator+ () const |
Unary +. More... | |
constexpr DPoint2 & | operator-= (const DPoint2 &a) |
Subtracts a DPoint2 from this DPoint2. More... | |
constexpr DPoint2 & | operator+= (const DPoint2 &a) |
Adds a DPoint2 to this DPoint2. More... | |
constexpr DPoint2 & | operator*= (const DPoint2 &a) |
Member-wise multiplication of two vectors: (x*x, y*y) More... | |
DPoint2 & | operator/= (const DPoint2 &a) |
Member-wise division of two vectors. More... | |
constexpr DPoint2 & | operator+= (double a) |
Each element of this DPoint2 is increased by the specified double. More... | |
constexpr DPoint2 & | operator-= (double a) |
Each element of this DPoint2 is decreased by the specified double. More... | |
constexpr DPoint2 & | operator*= (double a) |
Each element of this DPoint2 is multiplied by the specified double. More... | |
DPoint2 & | operator/= (double a) |
Each element of this DPoint2 is divided by the specified double. More... | |
constexpr DPoint2 | operator- (const DPoint2 &a) const |
Subtracts a DPoint2 from a DPoint2. More... | |
constexpr DPoint2 | operator+ (const DPoint2 &a) const |
Adds a DPoint2 to a DPoint2. More... | |
constexpr DPoint2 | operator* (const DPoint2 &a) const |
Member-wise multiplication of two vectors: (x*x, y*y) More... | |
DPoint2 | operator/ (const DPoint2 &a) const |
Member-wise division of two vectors: More... | |
constexpr double | DotProd (const DPoint2 &a) const |
Returns the dot product of two DPoint2s. More... | |
constexpr double | operator% (const DPoint2 &a) const |
Returns the dot product of two DPoint2s. More... | |
constexpr double | LengthSquared () const |
The 'Length' squared of this point. More... | |
double | Length () const |
Returns the 'Length' of this point (vector). More... | |
DPoint2 & | Unify () |
In place normalize. More... | |
double | LengthUnify () |
int | MaxComponent () const |
int | MinComponent () const |
DPoint2 | Normalize () const |
Returns a unit vector. More... | |
constexpr bool | operator== (const DPoint2 &p) const |
constexpr bool | operator!= (const DPoint2 &p) const |
bool | Equals (const DPoint2 &p, double epsilon=1E-6) const |
Public Attributes | |
double | x = 0.0 |
double | y = 0.0 |
Static Public Attributes | |
static const DPoint2 | Origin |
static const DPoint2 | XAxis |
const for (0,0) More... | |
static const DPoint2 | YAxis |
const for (1,0) More... | |
Description: This class describes a 2D point using double precision x and y coordinates.
Methods are provided to add and subtract points, multiply and divide by scalars, and element by element multiply and divide two points. All methods are implemented by the system.
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Unary - operator.
Negates both x and y
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Each element of this DPoint2 is decreased by the specified double.
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
Returns the dot product of two DPoint2s.
|
inlineconstexpr |
|
inline |
Returns the 'Length' of this point (vector).
This is:
sqrt(v.x*v.x+v.y*v.y).
DPoint2& Unify | ( | ) |
In place normalize.
double LengthUnify | ( | ) |
int MaxComponent | ( | ) | const |
int MinComponent | ( | ) | const |
DPoint2 Normalize | ( | ) | const |
|
inlineconstexpr |
|
inlineconstexpr |
bool Equals | ( | const DPoint2 & | p, |
double | epsilon = 1E-6 |
||
) | const |
double x = 0.0 |
double y = 0.0 |
|
static |
|
static |
const for (0,0)
|
static |
const for (1,0)