CFx SDK Documentation
2022 SP0
|
#include <GeVector2d.h>
Public Attributes | |
double | x |
double | y |
Static Public Attributes | |
static GE_STATIC_EXPORT const OdGeVector2d | kIdentity |
static GE_STATIC_EXPORT const OdGeVector2d | kXAxis |
static GE_STATIC_EXPORT const OdGeVector2d | kYAxis |
Friends | |
GE_TOOLKIT_EXPORT OdGeVector2d | operator* (const OdGeMatrix2d &xfm, const OdGeVector2d &vect) |
GE_TOOLKIT_EXPORT OdGeVector2d | operator* (double scale, const OdGeVector2d &vector) |
This class represents vectors in 2D space.
Corresponding C++ library: TD_Ge
<group OdGe_Classes>
Definition at line 50 of file GeVector2d.h.
|
inline |
source | [in] Object to be cloned. |
xx | [in] X-coordinate. |
yy | [in] Y-coordinate. |
Definition at line 60 of file GeVector2d.h.
|
inline |
Definition at line 61 of file GeVector2d.h.
double OdGeVector2d::angle | ( | ) | const |
Returns the angle between this vector and the X-axis
double OdGeVector2d::angleTo | ( | const OdGeVector2d & | vect | ) | const |
Returns the smallest angle to the specified vector.
vect | [in] Any 2D vector. |
This function is commutative:
a.angleTo (b) == b.angleTo (a)
|
inline |
Returns the angle from this vector to the specified vector in the counterclockwise direction.
vect | [in] Any 2D vector. |
Definition at line 201 of file GeVector2d.h.
|
inline |
Returns the z value of the cross product of this vector with the specified vector.
vect | [in] Any 2D vector. |
Definition at line 397 of file GeVector2d.h.
double OdGeVector2d::dotProduct | ( | const OdGeVector2d & | vect | ) | const |
Returns the dot product of this vector and the specified vector.
vect | [in] Any 2D vector. |
bool OdGeVector2d::isCodirectionalTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol, | ||
OdGeError & | status | ||
) | const |
Returns true if and only if the specified vector is codirectional to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
status | [out] Receives the status of test. |
Possible values for status are as follows:
@untitled table kOk
k0This
k0Arg1
bool OdGeVector2d::isCodirectionalTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Returns true if and only if the specified vector is codirectional to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
bool OdGeVector2d::isEqualTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Returns true if and only if vector is identical to this vector, within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
bool OdGeVector2d::isParallelTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol, | ||
OdGeError & | status | ||
) | const |
Returns true if and only if the specified vector is parallel to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
status | [out] Receives the status of test. |
Possible values for status are as follows:
@untitled table kOk k0This k0Arg1
bool OdGeVector2d::isParallelTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Returns true if and only if the specified vector is parallel to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
bool OdGeVector2d::isPerpendicularTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol, | ||
OdGeError & | status | ||
) | const |
Returns true if and only if the specified vector is perpendicular to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
status | [out] Receives the status of test. |
Possible values for status are as follows:
@untitled table kOk
k0This
k0Arg1
bool OdGeVector2d::isPerpendicularTo | ( | const OdGeVector2d & | vect, |
const OdGeTol & | tol = OdGeContext::gTol |
||
) | const |
Returns true if and only if the specified vector is perpendicular to this vector within the specified tolerance.
vect | [in] Any 2D vector. |
tol | [in] Geometric tolerance. |
bool OdGeVector2d::isUnitLength | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only if the length of this vector is 1.0 within the specified tolerance.
tol | [in] Geometric tolerance. |
bool OdGeVector2d::isZeroLength | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only if the length of this vector is 0.0 within the specified tolerance.
tol | [in] Geometric tolerance. |
double OdGeVector2d::length | ( | ) | const |
Returns the length of this vector.
double OdGeVector2d::lengthSqrd | ( | ) | const |
Returns the square of the length of this vector.
OdGeVector2d& OdGeVector2d::mirror | ( | const OdGeVector2d & | line | ) |
Mirrors this vector about the specified 2D line and returns a reference to this vector.
line | [in] Mirror Line. |
OdGeVector2d& OdGeVector2d::negate | ( | ) |
Negates this vector (-x, -y), and returns a reference to this vector.
OdGeVector2d OdGeVector2d::normal | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns the unit vector codirectional with this vector.
tol | [in] Geometric tolerance. |
OdGeVector2d& OdGeVector2d::normalize | ( | const OdGeTol & | tol, |
OdGeError & | status | ||
) |
Sets this vector to the unit vector codirectional with this vector, and returns a reference to this vector
tol | [in] Geometric tolerance. |
status | [out] Receives the status of normalization. |
Possible values for status are as follows:
@untitled table kOk k0This
OdGeVector2d& OdGeVector2d::normalize | ( | const OdGeTol & | tol = OdGeContext::gTol | ) |
Sets this vector to the unit vector codirectional with this vector, and returns a reference to this vector
tol | [in] Geometric tolerance. |
double OdGeVector2d::normalizeGetLength | ( | double | tol = 1.e-300 | ) |
Sets this vector to the unit vector codirectional with this vector, and returns the length prior to normalization.
tol | [in] Geometric tolerance. |
OdGeVector2d::operator OdGeMatrix2d | ( | ) | const |
Returns the equivalent 2D tranformation matrix.
bool OdGeVector2d::operator!= | ( | const OdGeVector2d & | vect | ) | const |
OdGeVector2d OdGeVector2d::operator* | ( | double | scale | ) | const |
OdGeVector2d& OdGeVector2d::operator*= | ( | double | scale | ) |
OdGeVector2d OdGeVector2d::operator+ | ( | const OdGeVector2d & | vect | ) | const |
OdGeVector2d& OdGeVector2d::operator+= | ( | const OdGeVector2d & | vect | ) |
OdGeVector2d OdGeVector2d::operator- | ( | ) | const |
OdGeVector2d OdGeVector2d::operator- | ( | const OdGeVector2d & | vect | ) | const |
OdGeVector2d& OdGeVector2d::operator-= | ( | const OdGeVector2d & | vect | ) |
OdGeVector2d OdGeVector2d::operator/ | ( | double | scale | ) | const |
OdGeVector2d& OdGeVector2d::operator/= | ( | double | scale | ) |
bool OdGeVector2d::operator== | ( | const OdGeVector2d & | vect | ) | const |
double& OdGeVector2d::operator[] | ( | unsigned int | i | ) |
double OdGeVector2d::operator[] | ( | unsigned int | i | ) | const |
i | [in] Index of coordinate. |
Returns or references the ith coordinate of this vector.
0 returns or references the X-coordinate. 1 returns or references the Y-coordinate.
OdGeVector2d OdGeVector2d::perpVector | ( | ) | const |
Returns the vector perpendicular to this one (-y, x).
OdGeVector2d& OdGeVector2d::rotateBy | ( | double | angle | ) |
Rotates this vector the specified angle, and returns a reference to this vector.
angle | [in] Rotation angle. |
|
inline |
Sets this vector to the specified X and Y coordinates, and returns a reference to this vector.
xx | [in] X-coordinate. |
yy | [in] Y-coordinate. |
Definition at line 439 of file GeVector2d.h.
|
inline |
Sets this vector to the product matrix * vect scale * vect, and returns a reference to this vector.
matrix | [in] Any 2D matrix. |
vect | [in] Any 2D vector |
Definition at line 81 of file GeVector2d.h.
OdGeVector2d& OdGeVector2d::setToProduct | ( | const OdGeVector2d & | vect, |
double | scale | ||
) |
Sets this vector to the product matrix * vect scale * vect, and returns a reference to this vector.
vect | [in] Any 2D vector. |
scale | [in] Scale factor. |
OdGeVector2d& OdGeVector2d::setToSum | ( | const OdGeVector2d & | vector1, |
const OdGeVector2d & | vector2 | ||
) |
Sets this vector to vector1 + vector1, and returns a reference to this vector.
vector1 | [in] Any 2D vector. |
vector2 | [in] Any 2D vector. |
|
inline |
Applies the 2D transformation matrix to this vector, and returns a reference to this vector.
xfm | [in] 2D transformation matrix. |
Definition at line 106 of file GeVector2d.h.
|
friend |
|
friend |
|
static |
Definition at line 65 of file GeVector2d.h.
|
static |
Definition at line 66 of file GeVector2d.h.
|
static |
Definition at line 67 of file GeVector2d.h.
double OdGeVector2d::x |
Definition at line 453 of file GeVector2d.h.
double OdGeVector2d::y |
Definition at line 454 of file GeVector2d.h.