C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Three-dimensional vector. More...
#include <mesh_float_point3d.h>
Public Member Functions | |
MbFloatVector3D () | |
Constructor. | |
MbFloatVector3D (const MbCartPoint3D &) | |
Constructor. | |
MbFloatVector3D (const MbFloatPoint3D &) | |
Constructor. | |
MbFloatVector3D (const MbVector3D &) | |
Constructor. | |
MbFloatVector3D (const MbFloatVector3D &) | |
Constructor. | |
MbFloatVector3D (const MbFloatPoint3D &p1, const MbFloatPoint3D &p2) | |
Constructor by difference of two points: this = p2 - p1. | |
MbFloatVector3D (const MbCartPoint3D &p1, const MbCartPoint3D &p2) | |
Constructor by difference of two points: this = p2 - p1. | |
MbFloatVector3D (float xx, float yy, float zz) | |
Constructor by coordinates. | |
~MbFloatVector3D () | |
Destructor. | |
Functions of vector. | |
void | Init (float a, float b, float c) |
Initialization by coordinates. | |
void | Init (const MbFloatPoint3D &p) |
Initialize by point. | |
void | Init (const MbFloatPoint3D &p1, const MbFloatPoint3D &p2) |
Initialize by points. | |
void | Init (const MbFloatVector3D &v) |
Initialize by vector. | |
void | SetVecM (const MbFloatVector3D &vF, const MbFloatVector3D &vS) |
Set vector product of two given vectors. | |
void | Set (const MbFloatVector3D &v1, float t1, const MbFloatVector3D &v2, float t2) |
Initialize by sum of vectors with coefficients. | |
void | Set (const MbFloatPoint3D &v1, float t1, const MbFloatPoint3D &v2, float t2) |
Initialize by sum of points with coefficients. | |
void | Transform (const MbMatrix3D &) |
Transform according to the matrix. | |
void | Rotate (const MbAxis3D &, double angle) |
Rotate about an axis by an angle. | |
bool | Normalize () |
Normalize a vector. | |
void | Invert () |
Change vector direction to opposite. | |
float | Length () const |
Length of vector. | |
float | Length2 () const |
Squared length of vector. | |
MbFloatVector3D | operator- () const |
Operator of subtraction of vectors. | |
MbFloatVector3D | operator+ (const MbFloatVector3D &vector) const |
Addition of two vectors; result is vector. | |
MbFloatVector3D | operator- (const MbFloatVector3D &vector) const |
Subtraction of two vectors; result is vector. | |
MbFloatVector3D | operator+ (const MbFloatPoint3D &pnt) const |
Addition of vector and point. | |
MbFloatVector3D | operator- (const MbFloatPoint3D &pnt) const |
Subtraction of point from vector. | |
MbFloatVector3D & | operator+= (const MbFloatVector3D &vector) |
Add a vector. | |
MbFloatVector3D & | operator-= (const MbFloatVector3D &vector) |
Subtract a vector. | |
MbFloatVector3D & | operator*= (float f) |
Multiply by a factor. | |
MbFloatVector3D & | operator/= (float f) |
Divide by a factor. | |
void | operator= (const MbCartPoint3D &) |
Assign values of point. | |
void | operator= (const MbVector3D &) |
Assign values of vector. | |
void | operator= (const MbFloatPoint3D &) |
Assign values of point. | |
bool | operator== (const MbFloatVector3D &) const |
float | operator* (const MbFloatVector3D &) const |
Dot-product of two vectors. | |
MbFloatVector3D | operator| (const MbFloatVector3D &) const |
Vector-product of two vectors. | |
float & | operator[] (size_t i) |
float | operator[] (size_t i) const |
bool | IsZero (double eps=Math::lengthEpsilon) const |
Whether vector is equal to zero with specified tolerance. | |
void | GetVector (MbVector3D &p) const |
Get vector (by analogy with MbFloatPoint3D). | |
float | MaxFactor () const |
Get the largest absolute value of a vector. | |
void | GetProperties (MbProperties &) |
Get properties of the object. | |
void | SetProperties (const MbProperties &) |
Set properties of the object. | |
bool | IsSame (const MbFloatVector3D &, double accuracy) const |
Are the objects equal? More... | |
Public Attributes | |
float | x |
First component of vector. | |
float | y |
Second component of vector. | |
float | z |
Third component of vector. | |
Three-dimensional vector.
Three-dimensional vector as data type is similar to MbVector3D, however based on more rough floating point number representation. It is used in such data structures as triangulation (MbGrid) for approximated representation of objects.
|
inline |
Are the objects equal?
The objects are equal if their data are equal with a given accuracy.
[in] | other | - The object to compare. |
[in] | accuracy | - The accuracy to compare. |