![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Definition of position or mathematical vector in 3D space. More...
#include <CVector3d.h>
Public Types | |
typedef imath::TVector< 3 > | BaseClass |
![]() | |
typedef double | ElementType |
typedef std::array< double, Size > | Elements |
Public Member Functions | |
CVector3d () | |
Default constructor. | |
CVector3d (double x, double y, double z) | |
Construct initializing elements to specified values. | |
CVector3d (const imath::TVector< 3 > &vector) | |
Copy constructor. | |
CVector3d (const i2d::CVector2d &vector, double z=0) | |
Contructs 3D vector from 2D. | |
double | GetX () const |
Get X position of this vector. | |
void | SetX (double value) |
Set X position of this vector. | |
double | GetY () const |
Get Y position of this vector. | |
void | SetY (double value) |
Set Y position of this vector. | |
double | GetZ () const |
Get Y position of this vector. | |
void | SetZ (double value) |
Set Y position of this vector. | |
CVector3d | GetTranslated (const imath::TVector< 3 > &vector) |
Get translated point. | |
CVector3d | GetCrossProduct (const imath::TVector< 3 > &vector) const |
Return Z coordinate of two vectors cross product. | |
CVector3d | GetNormalized (double length=1.0) const |
Return normalized vector with the same direction and specified length. | |
i2d::CVector2d | GetPlaneCasted () const |
Get XY part of this 3D vector. | |
bool | Serialize (iser::IArchive &archive) |
Serialize this vector to specified archive. | |
CVector3d | operator- () const |
CVector3d | operator+ (const imath::TVector< 3 > &vector) const |
CVector3d | operator- (const imath::TVector< 3 > &vector) const |
CVector3d | operator* (double scalar) const |
CVector3d | operator/ (double scalar) const |
CVector3d & | operator+= (const imath::TVector< 3 > &vector) |
CVector3d & | operator-= (const imath::TVector< 3 > &vector) |
CVector3d & | operator*= (double scalar) |
CVector3d & | operator/= (double scalar) |
![]() | |
TVector () | |
Create an uninitialized point. | |
TVector (const TVector< Size, double > &vector) | |
Copy constructor. | |
TVector (TVector< Size, double > &&vector) noexcept | |
Move constructor. | |
const double & | GetElement (int i) const |
Get element at specified i. | |
double & | GetElementRef (int i) |
Get reference to element at specified i. | |
void | SetElement (int i, const double &value) |
Set element at specified i. | |
void | SetAllElements (const double &value) |
Set some value to all elements. | |
void | Reset () |
Set all coordinates to zero. | |
void | Clear () |
Set all coordinates to zero. | |
const TVector< Size, double >::Elements & | GetElements () const |
Get read-only access to internal element container. | |
TVector< Size, double >::Elements & | GetElementsRef () |
Get access to internal element container. | |
void | Translate (const TVector< Size, double > &vector) |
Translate the point. | |
TVector< Size, double > | GetTranslated (const TVector< Size, double > &vector) |
Get translated point. | |
void | GetTranslated (const TVector< Size, double > &vector, TVector< Size, double > &result) |
/overloaded | |
void | ScaledCumulate (const TVector< Size, double > &vector, double scale) |
Add second vector scaled by specified factor. | |
bool | IsNull (double tolerance=I_BIG_EPSILON) const |
Check if this vector is null. | |
double | GetDotProduct (const TVector< Size, double > &vector) const |
Return dot product of two vectors. | |
double | GetLength2 () const |
Return euclidian length square. | |
double | GetLength () const |
Return euclidian length. | |
double | GetDistance2 (const TVector< Size, double > &vector) const |
Return distance square between two vectors. | |
double | GetDistance (const TVector< Size, double > &vector) const |
Return distance between two vectors. | |
double | GetElementsSum () const |
Get simple sum of all elements. | |
bool | Normalize (double length=1.0) |
Normalize vector to specified length. | |
bool | GetNormalized (TVector< Size, double > &result, double length=1.0) const |
Return normalized vector with the same direction and specified length. | |
void | GetMinimal (const TVector< Size, double > &vector, TVector< Size, double > &result) const |
Get vector with minimal elements values. | |
void | GetMaximal (const TVector< Size, double > &vector, TVector< Size, double > &result) const |
Get vector with maximal elements values. | |
bool | Serialize (iser::IArchive &archive) |
Serialize this vector to specified archive. | |
bool | operator== (const TVector< Size, double > &vector) const |
bool | operator!= (const TVector< Size, double > &vector) const |
bool | operator< (const TVector< Size, double > &vector) const |
bool | operator> (const TVector< Size, double > &vector) const |
bool | operator<= (const TVector< Size, double > &vector) const |
bool | operator>= (const TVector< Size, double > &vector) const |
TVector< Size, double > | operator- () const |
TVector< Size, double > | operator- (const TVector< Size, double > &vector) const |
TVector< Size, double > | operator+ (const TVector< Size, double > &vector) const |
TVector< Size, double > | operator* (double scalar) const |
TVector< Size, double > | operator/ (double scalar) const |
TVector< Size, double > & | operator= (const TVector< Size, double > &vector) |
TVector< Size, double > & | operator= (TVector< Size, double > &&vector) |
TVector< Size, double > & | operator+= (const TVector< Size, double > &vector) |
TVector< Size, double > & | operator-= (const TVector< Size, double > &vector) |
TVector< Size, double > & | operator*= (double scalar) |
TVector< Size, double > & | operator/= (double scalar) |
const double & | operator[] (int i) const |
double & | operator[] (int i) |
Additional Inherited Members | |
![]() | |
static int | GetElementsCount () |
Get number of elements. | |
static bool | SetElementsCount (int count) |
Set number of elements. | |
static const TVector< Size, double > & | GetZero () |
Get vector with all coordinates set to 0. | |
![]() | |
Elements | m_elements |
Definition of position or mathematical vector in 3D space.
Definition at line 25 of file CVector3d.h.
Definition at line 28 of file CVector3d.h.
|
inline |
Default constructor.
Please note, elements will be not initilized.
Definition at line 117 of file CVector3d.h.
Referenced by operator*(), operator+(), operator-(), operator-(), and operator/().
|
inline |
Construct initializing elements to specified values.
Definition at line 122 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
|
inline |
Copy constructor.
Definition at line 130 of file CVector3d.h.
|
inline |
Contructs 3D vector from 2D.
Definition at line 136 of file CVector3d.h.
References i2d::CVector2d::GetX(), i2d::CVector2d::GetY(), and imath::TVector< 3 >::operator[]().
CVector3d i3d::CVector3d::GetCrossProduct | ( | const imath::TVector< 3 > & | vector | ) | const |
Return Z coordinate of two vectors cross product.
CVector3d i3d::CVector3d::GetNormalized | ( | double | length = 1.0 | ) | const |
Return normalized vector with the same direction and specified length.
|
inline |
Get XY part of this 3D vector.
Definition at line 186 of file CVector3d.h.
|
inline |
Get translated point.
Definition at line 180 of file CVector3d.h.
|
inline |
Get X position of this vector.
Definition at line 144 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by GetPlaneCasted(), operator*(), operator+(), operator-(), operator-(), and operator/().
|
inline |
Get Y position of this vector.
Definition at line 156 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by GetPlaneCasted(), operator*(), operator+(), operator-(), operator-(), and operator/().
|
inline |
Get Y position of this vector.
Definition at line 168 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by operator*(), operator+(), operator-(), operator-(), and operator/().
|
inline |
Definition at line 213 of file CVector3d.h.
References CVector3d(), GetX(), GetY(), and GetZ().
|
inline |
Definition at line 248 of file CVector3d.h.
References imath::TVector< 3 >::operator*=().
|
inline |
Definition at line 199 of file CVector3d.h.
References CVector3d(), GetX(), GetY(), and GetZ().
|
inline |
Definition at line 231 of file CVector3d.h.
References imath::TVector< 3 >::operator+=().
|
inline |
Definition at line 192 of file CVector3d.h.
References CVector3d(), GetX(), GetY(), and GetZ().
|
inline |
Definition at line 206 of file CVector3d.h.
References CVector3d(), GetX(), GetY(), and GetZ().
|
inline |
Definition at line 240 of file CVector3d.h.
References imath::TVector< 3 >::operator-=().
|
inline |
Definition at line 220 of file CVector3d.h.
References CVector3d(), GetX(), GetY(), and GetZ().
|
inline |
Definition at line 256 of file CVector3d.h.
References imath::TVector< 3 >::operator/=().
bool i3d::CVector3d::Serialize | ( | iser::IArchive & | archive | ) |
Serialize this vector to specified archive.
|
inline |
Set X position of this vector.
Definition at line 150 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by i3d::CMatrix3d::GetAxesLengths().
|
inline |
Set Y position of this vector.
Definition at line 162 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by i3d::CMatrix3d::GetAxesLengths().
|
inline |
Set Y position of this vector.
Definition at line 174 of file CVector3d.h.
References imath::TVector< 3 >::operator[]().
Referenced by i3d::CMatrix3d::GetAxesLengths().
© Witold Gantzke and Kirill Lepskiy