#include <Vector3D.h>
Public Member Functions | |
Vector3D | CrossProduct (const Vector3D &) const |
Cross-product with other vector. | |
double | DotProduct (const Vector3D &) const |
Dot-product with other vector. | |
double | Length () const |
Compute length of vector. | |
void | Normalize () |
Normalize vector to length one. | |
operator const T * () const | |
Cast to C array pointer. | |
operator T* () | |
Cast to C array pointer. | |
bool | operator!= (int) const |
Element-wise inequality comparison with inegral-valued scalar. | |
bool | operator!= (double) const |
Element-wise inequality comparison with real-valued scalar. | |
template<typename T2 > | |
bool | operator!= (const Vector3D< T2 > &) const |
T & | operator() (int) |
Set/get vector component at index 0: _x, 1: _y, or 2: _z. | |
T | operator() (int) const |
Get vector component at index 0: _x, 1: _y, or 2: _z. | |
Vector3D | operator* (int) const |
Multiply vector by integral valued scalar. | |
Vector3D | operator* (double) const |
Multiply vector by real valued scalar. | |
template<typename T2 > | |
Vector3D | operator* (const Vector3D< T2 > &) const |
Element-wise multiplication of two vectors. | |
Vector3D & | operator*= (int) |
Multiply by integral valued scalar. | |
Vector3D & | operator*= (double) |
Multiply by real valued scalar. | |
template<typename T2 > | |
Vector3D & | operator*= (const Vector3D< T2 > &) |
Element-wise multiplication with other vector. | |
Vector3D | operator+ (int) const |
Add integral valued scalar to vector. | |
Vector3D | operator+ (double) const |
Add real valued scalar to vector. | |
template<typename T2 > | |
Vector3D | operator+ (const Vector3D< T2 > &) const |
Addition of two vectors. | |
Vector3D & | operator+= (int) |
Add integral valued scalar. | |
Vector3D & | operator+= (double) |
Add real valued scalar. | |
template<typename T2 > | |
Vector3D & | operator+= (const Vector3D< T2 > &) |
Addition of other vector. | |
Vector3D | operator- (int) const |
Subtract integral valued scalar to vector. | |
Vector3D | operator- (double) const |
Subtract real valued scalar to vector. | |
Vector3D | operator- () const |
Unary negation operator. | |
template<typename T2 > | |
Vector3D | operator- (const Vector3D< T2 > &) const |
Subtraction of two vectors. | |
Vector3D & | operator-= (int) |
Subtract integral valued scalar. | |
Vector3D & | operator-= (double) |
Subtract real valued scalar. | |
template<typename T2 > | |
Vector3D & | operator-= (const Vector3D< T2 > &) |
Subtraction of other vector. | |
Vector3D | operator/ (int) const |
Divide vector by integral valued scalar. | |
Vector3D | operator/ (double) const |
Divide vector by real valued scalar. | |
template<typename T2 > | |
Vector3D | operator/ (const Vector3D< T2 > &) const |
Element-wise division of two vectors. | |
Vector3D & | operator/= (int) |
Divide by integral valued scalar. | |
Vector3D & | operator/= (double) |
Divide by real valued scalar. | |
template<typename T2 > | |
Vector3D & | operator/= (const Vector3D< T2 > &) |
Element-wise division by other vector. | |
bool | operator< (int) const |
Element-wise less than comparison to inegral-valued scalar. | |
bool | operator< (double) const |
Element-wise less than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator< (const Vector3D< T2 > &) const |
bool | operator<= (int) const |
Element-wise less or equal than comparison to inegral-valued scalar. | |
bool | operator<= (double) const |
Element-wise less or equal than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator<= (const Vector3D< T2 > &) const |
Vector3D & | operator= (const Vector3D &) |
Assignment operator. | |
Vector3D & | operator= (const Point &) |
Assignment operator. | |
Vector3D & | operator= (int) |
Assign integral valued scalar. | |
Vector3D & | operator= (double) |
Assign real valued scalar. | |
template<typename T2 > | |
Vector3D & | operator= (const Vector3D< T2 > &) |
Assignment from other vector. | |
bool | operator== (int) const |
Element-wise equality comparison with inegral-valued scalar. | |
bool | operator== (double) const |
Element-wise equality comparison with real-valued scalar. | |
template<typename T2 > | |
bool | operator== (const Vector3D< T2 > &) const |
bool | operator> (int) const |
Element-wise greater than comparison to inegral-valued scalar. | |
bool | operator> (double) const |
Element-wise greater than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator> (const Vector3D< T2 > &) const |
bool | operator>= (int) const |
Element-wise greater or equal than comparison to inegral-valued scalar. | |
bool | operator>= (double) const |
Element-wise greater or equal than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator>= (const Vector3D< T2 > &) const |
double | SquaredLength () const |
Compute squared length of vector. | |
Vector3D () | |
Default constructor. | |
Vector3D (T) | |
Construct from scalar. | |
Vector3D (T, T, T) | |
Construct from vector components. | |
Vector3D (const T [3]) | |
Construct from C array. | |
Vector3D (const Vector3 &) | |
Construct from non-template 3D vector type. | |
Vector3D (const Point &) | |
Construct from 3D point. | |
template<typename T2 > | |
Vector3D (const Vector3D< T2 > &) | |
Copy constructor. | |
Static Public Member Functions | |
static Vector3D | CrossProduct (const Vector3D &, const Vector3D &) |
static double | DotProduct (const Vector3D &, const Vector3D &) |
static int | Rows () |
Number of vector components. | |
Public Attributes | |
T | _x |
The x component. | |
T | _y |
The y component. | |
T | _z |
The z component. | |
Represents a 3D vector
Must be a primitive type which can be treated as an array of three values of type T such that sizeof(Vector<T>) == 3 * sizeof(T). Thus, this primitive vector type may not have any other data members besides the three vector components. This is required especially when Vector3D is used as voxel type of an image and further an externally allocated continuous block of 3 * sizeof(T) bytes used internally by the image instance which only reinterprets the memory as consecutive Vector3D<T> instances, i.e.,
|
inlinestatic |
Cross-product of two vectors
Definition at line 925 of file Vector3D.h.
|
inlinestatic |
Dot-product of two vectors
Definition at line 940 of file Vector3D.h.
|
inline |
Operator for testing non-equality of two vector.
Definition at line 850 of file Vector3D.h.
|
inline |
Operator for comparing sizes of vectors.
Definition at line 857 of file Vector3D.h.
|
inline |
Operator for comparing sizes of vectors.
Definition at line 875 of file Vector3D.h.
|
inline |
Operator for testing equality of two vectors.
Definition at line 843 of file Vector3D.h.
|
inline |
Operator for comparing sizes of vectors.
Definition at line 866 of file Vector3D.h.
|
inline |
Operator for comparing sizes of vectors.
Definition at line 882 of file Vector3D.h.