CFx SDK Documentation 2024 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) |
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 |
Default constructor for the OdGeVector2d class.
Definition at line 60 of file GeVector2d.h.
|
inline |
Constructor for the OdGeVector2d class.
xx | [in] X-coordinate. |
yy | [in] Y-coordinate. |
Definition at line 71 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 angle between this vector and the specified vector.
vect | [in] A 2D vector, angle to which is measured. |
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 353 of file GeVector2d.h.
|
inline |
Returns this vector as a point.
Definition at line 670 of file GeVector2d.h.
|
inline |
Returns this vector as a point.
Definition at line 663 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 555 of file GeVector2d.h.
|
inline |
Returns the dot product of this vector and the specified vector.
vect | [in] Any 2D vector. |
Definition at line 543 of file GeVector2d.h.
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 that is checked to be codirectional with this 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 that is checked to be codirectional with this 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 that is checked to be parallel to this 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 that is checked to be parallel to this 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 that is checked to be perpendicular to this 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 that is checked to be perpendicular to this 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. |
unsigned int OdGeVector2d::largestElement | ( | ) | const |
Returns the index of the largest absolute coordinate of this vector.
double OdGeVector2d::length | ( | ) | const |
Returns the length of this vector.
|
inline |
Returns the square of the length of this vector.
Definition at line 421 of file GeVector2d.h.
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. |
|
inline |
Negates this vector (-x, -y), and returns a reference to this vector.
Definition at line 307 of file GeVector2d.h.
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 |
Inequality operator for the OdGeVector2d class.
vect | [in] A 2D vector to be compared. |
|
inline |
Multiplication operator for the OdGeVector2d class.
scale | [in] Scale factor. |
Definition at line 153 of file GeVector2d.h.
|
inline |
Multiplication operator for the OdGeVector2d class.
scale | [in] Scale factor. |
Definition at line 172 of file GeVector2d.h.
|
inline |
Addition operator for the OdGeVector2d class.
vect | [in] A 2D vector to be added. |
Definition at line 217 of file GeVector2d.h.
|
inline |
Addition operator for the OdGeVector2d class.
vect | [in] A 2D vector to be added. |
Definition at line 231 of file GeVector2d.h.
|
inline |
Returns a vector with inverted X and Y coordinates.
Definition at line 300 of file GeVector2d.h.
|
inline |
Subtraction operator for the OdGeVector2d class.
vect | [in] A 2D vector to be subtracted. |
Definition at line 247 of file GeVector2d.h.
|
inline |
Subtraction operator for the OdGeVector2d class.
vect | [in] A 2D vector to be subtracted. |
Definition at line 261 of file GeVector2d.h.
|
inline |
Division operator for the OdGeVector2d class.
scale | [in] Scale factor. |
Definition at line 188 of file GeVector2d.h.
|
inline |
Division operator for the OdGeVector2d class.
scale | [in] Scale factor. |
Definition at line 202 of file GeVector2d.h.
bool OdGeVector2d::operator== | ( | const OdGeVector2d & | vect | ) | const |
Equality operator for the OdGeVector2d class.
vect | [in] A 2D vector to be compared. |
|
inline |
References the ith coordinate of this vector.
i | [in] Index of coordinate. |
Definition at line 618 of file GeVector2d.h.
|
inline |
Returns the ith coordinate of this vector.
i | [in] Index of coordinate. |
Definition at line 603 of file GeVector2d.h.
|
inline |
Returns the vector perpendicular to this one (-y, x).
Definition at line 317 of file GeVector2d.h.
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 639 of file GeVector2d.h.
|
inline |
Sets this vector to the product matrix * vect and returns a reference to this vector.
matrix | [in] Any 2D matrix. |
vect | [in] Any 2D vector |
Definition at line 90 of file GeVector2d.h.
|
inline |
Sets this vector to the product scale * vect, and returns a reference to this vector.
vect | [in] Any 2D vector. |
scale | [in] Scale factor. |
Definition at line 105 of file GeVector2d.h.
|
inline |
Sets this vector to vector1 + vector1, and returns a reference to this vector.
vector1 | [in] Any 2D vector. |
vector2 | [in] Any 2D vector. |
Definition at line 285 of file GeVector2d.h.
|
inline |
Applies the 2D transformation matrix to this vector, and returns a reference to this vector.
xfm | [in] 2D transformation matrix. |
Definition at line 120 of file GeVector2d.h.
|
friend |
|
friend |
Definition at line 158 of file GeVector2d.h.
|
static |
Definition at line 75 of file GeVector2d.h.
|
static |
Definition at line 76 of file GeVector2d.h.
|
static |
Definition at line 77 of file GeVector2d.h.
double OdGeVector2d::x |
Definition at line 653 of file GeVector2d.h.
double OdGeVector2d::y |
Definition at line 654 of file GeVector2d.h.