![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The TVector3 class provides a simple 3D vector class for vector geometry applications. More...
Public Member Functions | |
constexpr | TVector3 () |
constexpr | TVector3 (const TVector2< T > &iVec, T iZ=0) |
template<typename U > | |
constexpr | TVector3 (const TVector3< U > &iOther) |
constexpr | TVector3 (const TVector4< T > &iVec) |
constexpr | TVector3 (T iValue) |
constexpr | TVector3 (T iX, T iY, T iZ=0) |
template<typename U , typename V , typename W > | |
constexpr | TVector3 (U iX, V iY, W iZ) |
constexpr TVector3< T > | CrossProduct (const TVector3 &iOther) const |
constexpr T | Distance () const |
constexpr T | DistanceSquared () const |
constexpr T | DotProduct (const TVector3 &iOther) const |
constexpr T | ManhattanDistance () const |
constexpr const TVector3 & | Normalize () |
constexpr TVector3 | Normalized () const |
constexpr bool | operator!= (const TVector3 &iOther) const |
constexpr TVector3 & | operator*= (const TVector3 &iOther) |
constexpr TVector3 & | operator*= (T iValue) |
constexpr TVector3 & | operator+= (const TVector3 &iOther) |
constexpr TVector3 & | operator+= (T iValue) |
constexpr TVector3 | operator- () const |
constexpr TVector3 & | operator-= (const TVector3 &iOther) |
constexpr TVector3 & | operator-= (T iValue) |
constexpr TVector3 & | operator/= (const TVector3 &iOther) |
constexpr TVector3 & | operator/= (T iValue) |
constexpr bool | operator== (const TVector3 &iOther) const |
constexpr T & | operator[] (int iIndex) |
constexpr const T & | operator[] (int iIndex) const |
constexpr TVector2< T > | xx () const |
constexpr TVector3< T > | xxx () const |
constexpr TVector4< T > | xxxx () const |
constexpr TVector4< T > | xxxy () const |
constexpr TVector4< T > | xxxz () const |
constexpr TVector3< T > | xxy () const |
constexpr TVector4< T > | xxyx () const |
constexpr TVector4< T > | xxyy () const |
constexpr TVector4< T > | xxyz () const |
constexpr TVector3< T > | xxz () const |
constexpr TVector4< T > | xxzx () const |
constexpr TVector4< T > | xxzy () const |
constexpr TVector4< T > | xxzz () const |
constexpr TVector2< T > | xy () const |
constexpr TVector3< T > | xyx () const |
constexpr TVector4< T > | xyxx () const |
constexpr TVector4< T > | xyxy () const |
constexpr TVector4< T > | xyxz () const |
constexpr TVector3< T > | xyy () const |
constexpr TVector4< T > | xyyx () const |
constexpr TVector4< T > | xyyy () const |
constexpr TVector4< T > | xyyz () const |
constexpr TVector3< T > | xyz () const |
constexpr TVector4< T > | xyzx () const |
constexpr TVector4< T > | xyzy () const |
constexpr TVector4< T > | xyzz () const |
constexpr TVector2< T > | xz () const |
constexpr TVector3< T > | xzx () const |
constexpr TVector4< T > | xzxx () const |
constexpr TVector4< T > | xzxy () const |
constexpr TVector4< T > | xzxz () const |
constexpr TVector3< T > | xzy () const |
constexpr TVector4< T > | xzyx () const |
constexpr TVector4< T > | xzyy () const |
constexpr TVector4< T > | xzyz () const |
constexpr TVector3< T > | xzz () const |
constexpr TVector4< T > | xzzx () const |
constexpr TVector4< T > | xzzy () const |
constexpr TVector4< T > | xzzz () const |
constexpr TVector2< T > | yx () const |
constexpr TVector3< T > | yxx () const |
constexpr TVector4< T > | yxxx () const |
constexpr TVector4< T > | yxxy () const |
constexpr TVector4< T > | yxxz () const |
constexpr TVector3< T > | yxy () const |
constexpr TVector4< T > | yxyx () const |
constexpr TVector4< T > | yxyy () const |
constexpr TVector4< T > | yxyz () const |
constexpr TVector3< T > | yxz () const |
constexpr TVector4< T > | yxzx () const |
constexpr TVector4< T > | yxzy () const |
constexpr TVector4< T > | yxzz () const |
constexpr TVector2< T > | yy () const |
constexpr TVector3< T > | yyx () const |
constexpr TVector4< T > | yyxx () const |
constexpr TVector4< T > | yyxy () const |
constexpr TVector4< T > | yyxz () const |
constexpr TVector3< T > | yyy () const |
constexpr TVector4< T > | yyyx () const |
constexpr TVector4< T > | yyyy () const |
constexpr TVector4< T > | yyyz () const |
constexpr TVector3< T > | yyz () const |
constexpr TVector4< T > | yyzx () const |
constexpr TVector4< T > | yyzy () const |
constexpr TVector4< T > | yyzz () const |
constexpr TVector2< T > | yz () const |
constexpr TVector3< T > | yzx () const |
constexpr TVector4< T > | yzxx () const |
constexpr TVector4< T > | yzxy () const |
constexpr TVector4< T > | yzxz () const |
constexpr TVector3< T > | yzy () const |
constexpr TVector4< T > | yzyx () const |
constexpr TVector4< T > | yzyy () const |
constexpr TVector4< T > | yzyz () const |
constexpr TVector3< T > | yzz () const |
constexpr TVector4< T > | yzzx () const |
constexpr TVector4< T > | yzzy () const |
constexpr TVector4< T > | yzzz () const |
constexpr TVector2< T > | zx () const |
constexpr TVector3< T > | zxx () const |
constexpr TVector4< T > | zxxx () const |
constexpr TVector4< T > | zxxy () const |
constexpr TVector4< T > | zxxz () const |
constexpr TVector3< T > | zxy () const |
constexpr TVector4< T > | zxyx () const |
constexpr TVector4< T > | zxyy () const |
constexpr TVector4< T > | zxyz () const |
constexpr TVector3< T > | zxz () const |
constexpr TVector4< T > | zxzx () const |
constexpr TVector4< T > | zxzy () const |
constexpr TVector4< T > | zxzz () const |
constexpr TVector2< T > | zy () const |
constexpr TVector3< T > | zyx () const |
constexpr TVector4< T > | zyxx () const |
constexpr TVector4< T > | zyxy () const |
constexpr TVector4< T > | zyxz () const |
constexpr TVector3< T > | zyy () const |
constexpr TVector4< T > | zyyx () const |
constexpr TVector4< T > | zyyy () const |
constexpr TVector4< T > | zyyz () const |
constexpr TVector3< T > | zyz () const |
constexpr TVector4< T > | zyzx () const |
constexpr TVector4< T > | zyzy () const |
constexpr TVector4< T > | zyzz () const |
constexpr TVector2< T > | zz () const |
constexpr TVector3< T > | zzx () const |
constexpr TVector4< T > | zzxx () const |
constexpr TVector4< T > | zzxy () const |
constexpr TVector4< T > | zzxz () const |
constexpr TVector3< T > | zzy () const |
constexpr TVector4< T > | zzyx () const |
constexpr TVector4< T > | zzyy () const |
constexpr TVector4< T > | zzyz () const |
constexpr TVector3< T > | zzz () const |
constexpr TVector4< T > | zzzx () const |
constexpr TVector4< T > | zzzy () const |
constexpr TVector4< T > | zzzz () const |
Public Attributes | |
T | x |
T | y |
T | z |
The TVector3 class is a template class that provides basic 3D vector functionnalities, it can be used with any numeric types, ranging from integer values to floating point values.
Swizzle operators are also available for all vector types, you can call vec.xxx() or vec.xyyy(), etc.
For example:
Default constructor for the vector, with default zero values.
Construct the vector from input value ( both x and y will have value iValue )
Construct the vector from input values.
|
constexpr |
Construct the vector from TVector2.
Construct the vector from TVector4.
|
constexpr |
Construct the vector from input vector of any convertible type.
|
constexpr |
Construct the vector from foreign type input values.
|
constexpr |
Return the cross product of the vector
|
constexpr |
Return the euclidean distance of the vector.
|
constexpr |
Return the squared euclidean distance of the vector. This can be useful for testing against another squared distance, thus saving a square root calculation.
|
constexpr |
Return the dot product of the vector
|
constexpr |
Return the manhattan distance of the vector. ( abs( x ) + abs( y ) )
Normalize this vector.
Return the normalized version of this vector.
|
constexpr |
Compare this vector to the other vector for strict inequality.
|
constexpr |
Multiply this vector by the input vector and return a reference to this vector.
Multiply this vector by the input value and return a reference to this vector.
|
constexpr |
Add the input to this vector and return a reference to this vector.
Add the input value to this vector and return a reference to this vector.
|
constexpr |
Substract the input to this vector and return a reference to this vector.
Substract the input value to this vector and return a reference to this vector.
|
constexpr |
Divide this vector by the input vector and return a reference to this vector.
Divide this vector by the input value and return a reference to this vector.
|
constexpr |
Compare this vector to the other vector for strict equality.
|
constexpr |
Access component x or y by index, return a reference to the component.
|
constexpr |
Access component x or y by index, return a const reference to the component.
T TVector3< T >::x |
The x component of the 3D vector.
T TVector3< T >::y |
The y component of the 3D vector.
T TVector3< T >::z |
The z component of the 3D vector.