![]() |
gVirtualXRay
2.0.10
VirtualX-RayImagingLibraryonGPU
|
Vec3 is a template class to handle a 3D vector. More...
#include <Vec3.h>
Public Member Functions | |
Vec3 (const T &aX=0, const T &aY=0, const T &aZ=0) | |
Default Constructor. More... | |
void | setX (const T &aValue) |
Set the position along the x-axis. More... | |
void | setY (const T &aValue) |
Set the position along the y-axis. More... | |
void | setZ (const T &aValue) |
Set the position along the z-axis. More... | |
T | getX () const |
Accessor on the position along the x-axis. More... | |
T | getY () const |
Accessor on the position along the y-axis. More... | |
T | getZ () const |
Accessor on the position along the z-axis. More... | |
double | length () const |
Get the length of the vector. More... | |
Vec3 | normal () const |
Get the unit vector corresponding to the normed current vector. More... | |
void | normalize () |
Normalize the current vector so that its length is 1. More... | |
void | normalise () |
Normalise the current vector so that its length is 1. More... | |
double | dotProduct (const Vec3 &aVector) const |
Get the dot product between the current vector and a given vector. More... | |
Vec3 | crossProduct (const Vec3 &aVector) const |
double | distance (const Vec3 &aVector) const |
Vec3< T > | elementWiseProduct (const Vec3 &aVector) const |
Element-wise product. More... | |
Vec3 | operator+ (const Vec3 &aVector) const |
Operator +. More... | |
Vec3 & | operator+= (const Vec3 &aVector) |
Operator +=. More... | |
Vec3 | operator- (const Vec3 &aVector) const |
Operator -. More... | |
Vec3 & | operator-= (const Vec3 &aVector) |
Operator -=. More... | |
Vec3 | operator* (const double &aValue) const |
Operator * to multiply each component of the vector by a given value. More... | |
Vec3 & | operator*= (const double &aValue) |
Vec3 | operator* (const float &aValue) const |
Operator * to multiply each component of the vector by a given value. More... | |
Vec3 & | operator*= (const float &aValue) |
Vec3 | operator/ (const double &aValue) const |
Operator / to divide each component of the vector by a given value. More... | |
Vec3 & | operator/= (const double &aValue) |
Operator -=. More... | |
Vec3 | operator/ (const float &aValue) const |
Operator / to divide each component of the vector by a given value. More... | |
Vec3 & | operator/= (const float &aValue) |
Operator -=. More... | |
Vec3 | operator^ (const Vec3 &aVector) const |
Vec3 | operator- () const |
Operator - to get the opposite vector. More... | |
bool | operator== (const Vec3 &aVector) const |
Operator ==. More... | |
bool | operator!= (const Vec3 &aVector) const |
Operator !=. More... | |
T & | operator() (unsigned int i) |
const T & | operator() (unsigned int i) const |
T & | operator[] (unsigned int i) |
const T & | operator[] (unsigned int i) const |
Protected Attributes | |
T | m_x |
the position along the x-axis More... | |
T | m_y |
the position along the y-axi More... | |
T | m_z |
the position along the z-axi More... | |
Vec3 is a template class to handle a 3D vector.
gVirtualXRay::Vec3< T >::Vec3 | ( | const T & | aX = 0 , |
const T & | aY = 0 , |
||
const T & | aZ = 0 |
||
) |
Vec3< T > gVirtualXRay::Vec3< T >::crossProduct | ( | const Vec3< T > & | aVector | ) | const |
double gVirtualXRay::Vec3< T >::distance | ( | const Vec3< T > & | aVector | ) | const |
double gVirtualXRay::Vec3< T >::dotProduct | ( | const Vec3< T > & | aVector | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::elementWiseProduct | ( | const Vec3< T > & | aVector | ) | const |
Element-wise product.
Operator * to compute the dot product between the current vector and a given vector.
aVector | the other vector |
aVector | the other vector |
T gVirtualXRay::Vec3< T >::getX | ( | ) | const |
T gVirtualXRay::Vec3< T >::getY | ( | ) | const |
T gVirtualXRay::Vec3< T >::getZ | ( | ) | const |
double gVirtualXRay::Vec3< T >::length | ( | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::normal | ( | ) | const |
void gVirtualXRay::Vec3< T >::normalise | ( | ) |
void gVirtualXRay::Vec3< T >::normalize | ( | ) |
bool gVirtualXRay::Vec3< T >::operator!= | ( | const Vec3< T > & | aVector | ) | const |
T & gVirtualXRay::Vec3< T >::operator() | ( | unsigned int | i | ) |
const T & gVirtualXRay::Vec3< T >::operator() | ( | unsigned int | i | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::operator* | ( | const double & | aValue | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::operator* | ( | const float & | aValue | ) | const |
Vec3< T > & gVirtualXRay::Vec3< T >::operator*= | ( | const double & | aValue | ) |
Vec3< T > & gVirtualXRay::Vec3< T >::operator*= | ( | const float & | aValue | ) |
Vec3< T > gVirtualXRay::Vec3< T >::operator+ | ( | const Vec3< T > & | aVector | ) | const |
Vec3< T > & gVirtualXRay::Vec3< T >::operator+= | ( | const Vec3< T > & | aVector | ) |
Vec3< T > gVirtualXRay::Vec3< T >::operator- | ( | const Vec3< T > & | aVector | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::operator- | ( | ) | const |
Vec3< T > & gVirtualXRay::Vec3< T >::operator-= | ( | const Vec3< T > & | aVector | ) |
Vec3< T > gVirtualXRay::Vec3< T >::operator/ | ( | const double & | aValue | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::operator/ | ( | const float & | aValue | ) | const |
Vec3< T > & gVirtualXRay::Vec3< T >::operator/= | ( | const double & | aValue | ) |
Vec3< T > & gVirtualXRay::Vec3< T >::operator/= | ( | const float & | aValue | ) |
bool gVirtualXRay::Vec3< T >::operator== | ( | const Vec3< T > & | aVector | ) | const |
T & gVirtualXRay::Vec3< T >::operator[] | ( | unsigned int | i | ) |
const T & gVirtualXRay::Vec3< T >::operator[] | ( | unsigned int | i | ) | const |
Vec3< T > gVirtualXRay::Vec3< T >::operator^ | ( | const Vec3< T > & | aVector | ) | const |
void gVirtualXRay::Vec3< T >::setX | ( | const T & | aValue | ) |
void gVirtualXRay::Vec3< T >::setY | ( | const T & | aValue | ) |
void gVirtualXRay::Vec3< T >::setZ | ( | const T & | aValue | ) |
|
protected |
|
protected |
|
protected |