|
Classes |
class | TVector4< T > |
| Generic Four-Dimensional Vector. More...
|
Global binary operators for three-dimensional vectors. |
template<typename T> |
TVector4< T > | operator+ (const TVector4< T > &a, const TVector4< T > &b) throw () |
| Addition operator for two vectors.
|
template<typename T> |
TVector4< T > | operator- (const TVector4< T > &a, const TVector4< T > &b) throw () |
| Subtraction operator for two vectors.
|
template<typename T> |
std::istream & | operator>> (std::istream &s, TVector4< T > &vector) throw () |
| Input operator Reads four values of type T from an input stream and assigns them to the components x, y, z and h of the vector.
|
template<typename T> |
std::ostream & | operator<< (std::ostream &s, const TVector4< T > &vector) throw () |
| Output Operator.
|
Constructors and Destructors |
| TVector4::TVector4 () throw () |
| Default constructor.
|
| TVector4::TVector4 (const T *ptr) throw (Exception::NullPointer) |
| Array constructor.
|
| TVector4::TVector4 (const T &value) throw () |
| Scalar constructor.
|
| TVector4::TVector4 (const T &x, const T &y, const T &z, const T &h=(T) 1) throw () |
| Detailed constructor.
|
| TVector4::TVector4 (const TVector4 &vector) throw () |
| Copy constructor.
|
virtual | TVector4::~TVector4 () throw () |
| Destructor.
|
virtual void | TVector4::clear () throw () |
| Clear method The values are set to 0.
|
Assignment |
void | TVector4::set (const T *ptr) throw (Exception::NullPointer) |
| Assign from an array.
|
void | TVector4::set (const T &rx, const T &ry, const T &rz, const T &rh=(T) 1) throw () |
| Assign the vector components.
|
void | TVector4::set (const TVector4 &vector) throw () |
| Assign from another TVector4.
|
TVector4 & | TVector4::operator= (const T *ptr) throw (Exception::NullPointer) |
| Array assignment operator.
|
TVector4 & | TVector4::operator= (const TVector4 &vector) throw () |
| Assignment operator.
|
TVector4 & | TVector4::operator= (T value) throw () |
| Assignment operator.
|
void | TVector4::get (T *ptr) const throw (Exception::NullPointer) |
| Assign to an array.
|
void | TVector4::get (T &rx, T &ry, T &rz, T &rh) const throw () |
| Assign to four variables of type T .
|
void | TVector4::get (TVector4 &vector) const throw () |
| Assign to another Vector4.
|
void | TVector4::swap (TVector4 &vector) throw () |
| Swap the contents of two vectors.
|
Accessors |
T | TVector4::getLength () const throw () |
| Return the length of the vector.
|
T | TVector4::getSquareLength () const throw () |
| Return the squared length of the vector.
|
TVector4 & | TVector4::normalize () throw (Exception::DivisionByZero) |
| Normalize the vector.
|
const TVector4 & | TVector4::getZero () throw () |
| Return a vector with all components 0.
|
const TVector4 & | TVector4::getUnit () throw () |
| Return a vector with all components 1.
|
void | TVector4::set (const T &value=(T) 1) throw () |
| Assign one value to all vector components.
|
T & | TVector4::operator[] (Position position) throw (Exception::IndexOverflow) |
| Mutable array-like access to the components.
|
const T & | TVector4::operator[] (Position position) const throw (Exception::IndexOverflow) |
| Constant array-like access to the components.
|
Arithmetic operators |
TVector4 | TVector4::operator+ () const throw () |
| Positive sign.
|
TVector4 | TVector4::operator- () const throw () |
| Negative sign.
|
TVector4 & | TVector4::operator+= (const TVector4 &vector) throw () |
| Add a vector to this vector.
|
TVector4 & | TVector4::operator-= (const TVector4 &vector) throw () |
| Subtract a vector from this vector.
|
TVector4 | TVector4::operator * (const T &scalar) throw () |
| Scalar product.
|
TVector4 & | TVector4::operator *= (const T &scalar) throw () |
| Multiply by a scalar.
|
TVector4 | TVector4::operator/ (const T &scalar) throw (Exception::DivisionByZero) |
| Fraction of a vector.
|
TVector4 & | TVector4::operator/= (const T &scalar) throw (Exception::DivisionByZero) |
| Divide a vector by a scalar.
|
T | TVector4::operator * (const TVector4 &vector) const throw () |
| Dot product.
|
T | TVector4::getDistance (const TVector4 &vector) const throw () |
| Return the distance to another vector.
|
T | TVector4::getSquareDistance (const TVector4 &vector) const throw () |
| Return the squared distance to another vector.
|
Predicates |
bool | TVector4::operator== (const TVector4 &vector) const throw () |
| Equality operator.
|
bool | TVector4::operator!= (const TVector4 &vector) const throw () |
| Inequality operator.
|
bool | TVector4::isOrthogonalTo (const TVector4 &vector) const throw () |
| Orthogonality predicate.
|
Debugging and Diagnostics |
bool | TVector4::isValid () const throw () |
| Test whether instance is valid.
|
void | TVector4::dump (std::ostream &s=std::cout, Size depth=0) const throw () |
| Internal state dump.
|
Typedefs |
typedef TVector4< float > | Vector4 |
| Default four-dimensional vector type.
|
Functions |
template<typename T> |
TVector4< T > | operator * (const T &scalar, const TVector4< T > &v) throw () |
| Multiplication operator for a scalar and a vector.
|
template<typename T> |
TVector4< T > | operator * (const TVector4< T > &v, const T &scalar) throw () |
| Multiplication operator for a vector and a scalar.
|