|
ML Reference
|
Forward declarations to resolve header file dependencies. More...
#include <mlVector5.h>
Public Types | |
| typedef FloatingPointVector< DT, 5 > | Superclass |
| A typedef as a shorthand for the base class. | |
| typedef DT | ComponentType |
| A typedef to 'export' the type of components. | |
| Public Types inherited from ml::FloatingPointVector< DT, 5 > | |
| enum | |
| typedef DT | ComponentType |
| A typedef to 'export' the type of components. | |
Public Member Functions | |
constructors | |
| Tvec5 (const DT value=0) | |
| Tvec5 (const Superclass &v) | |
| Copy constructor from FloatingPointVector. | |
| Tvec5 (const DT x, const DT y, const DT z, const DT c, const DT t) | |
| Tvec5 (const Tvec2< DT > &v, const DT z, const DT c, const DT t) | |
Casts Tvec2 to Tvec5. Last components are set to z, c, and t. | |
| Tvec5 (const Tvec3< DT > &v, const DT c, const DT t) | |
Casts Tvec3 to Tvec5. Last components are set to c and t. | |
| Tvec5 (const Tvec4< DT > &v, const DT t) | |
Casts Tvec4 to Tvec5. Last component is set to t. | |
Other operators and methods | |
| void | assign (const DT x, const DT y, const DT z, const DT c, const DT t) |
| Sets all components to the passed values. | |
| Tvec5< DT > & | operator+= (const Tvec2< DT > &v) |
| Incrementation by a Tvec2. | |
| Tvec5< DT > & | operator+= (const Tvec3< DT > &v) |
| Incrementation by a Tvec3. | |
| Tvec5< DT > & | operator+= (const Tvec4< DT > &v) |
| Incrementation by a Tvec4. | |
| const Tvec3< DT > | getVec3 () const |
| Returns a Tvec3 from components 0, 1, and 2. | |
| const Tvec4< DT > | getVec4 () const |
| Returns a Tvec4 from components 0, 1, 2, and 3. | |
| Public Member Functions inherited from ml::FloatingPointVector< DT, 5 > | |
| FloatingPointVector (DT value=DT(0)) | |
| FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > & | operator= (DT value) |
| Assignment of scalar value to all components. | |
| bool | operator== (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| Returns whether *this and buffer are component-wise equal. | |
| bool | operator!= (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| Returns whether any components of *this and buffer are not equal. | |
| bool | operator< (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| const DT & | operator[] (const size_t i) const |
| DT & | operator[] (const size_t i) |
| size_t | getSize () const |
| Returns the number of elements of value buffer. | |
| DT | norm2 () const |
| DT | norm2 (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &weight) const |
| DT | dot (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| DT | normalize () |
| DT | length () const |
| Returns the length of the vector, i.e., norm2(). | |
| DT | distance (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| Returns the distance of this vector to a given one. | |
| DT | distanceSquared (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &buffer) const |
| Returns the squared distance of this vector to a given one. | |
| DT | lengthSquared () const |
| Returns the squared length of the vector. | |
| DT | compSum () const |
| Returns the sum of all components. | |
| DT | compMul () const |
| Returns the product of all vector components. | |
| DT | compMaxAbs () const |
| Returns the maximum of absolute component values. | |
| void | compMin (FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > buffer) |
| Sets the component-wise minimum of *this and buffer in *this. | |
| void | compMax (FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > buffer) |
| Sets the component-wise maximum of *this and buffer in *this. | |
| void | compAbs () |
| Kills negative signs from all components. | |
| void | compDiv (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &d) |
| void | compSqr () |
| Calculates and sets the square of all components. | |
| void | compSqrt () |
| void | clampMin (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &lower) |
| void | clampMax (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &upper) |
| void | clamp (const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &lower, const FloatingPointVector< DT, size, FloatingPointVectorDataContainerBase< DT, size > > &upper) |
| void | compRound () |
| Rounds all components of this vector using floor(component + 0.5). | |
| void | compFloor () |
| Rounds all components of this vector using floor(component). | |
| void | compCeil () |
| Rounds all components of this vector to integer using ceil(component). | |
| FloatingPointVector< DT, 3, FloatingPointVectorDataContainerBase< DT, size > > | cross (const FloatingPointVector< DT, 3, FloatingPointVectorDataContainerBase< DT, size > > &b) const |
| Returns the cross product for elements, i.e., the returned vector is orthogonal to *this and b. | |
| void | apply (ML_LA_FROM_DOUBLE_TO_DOUBLE f) |
Applies the function f to each component starting from index 0 to index size-1. | |
| std::ostream & | writeOut (std::ostream &os) const |
| std::istream & | readIn (std::istream &is) |
Reads all components from istream is starting starting from index 0 to size-1. | |
Forward declarations to resolve header file dependencies.
A five dimensional vector class for floating point types.
A five dimensional vector class.
Definition at line 47 of file mlVector5.h.
| typedef DT ml::Tvec5< DT >::ComponentType |
A typedef to 'export' the type of components.
Definition at line 55 of file mlVector5.h.
| typedef FloatingPointVector<DT,5> ml::Tvec5< DT >::Superclass |
A typedef as a shorthand for the base class.
Definition at line 52 of file mlVector5.h.
|
inlineexplicit |
Default and value constructor. Sets all entries to a user given value. value is the init value for all entries. 0 is the default value.
Definition at line 63 of file mlVector5.h.
|
inline |
Copy constructor from FloatingPointVector.
Definition at line 68 of file mlVector5.h.
|
inline |
Builds the vector from the scalars x, y, z, c, and t to the components 0 to 4, respectively.
Definition at line 74 of file mlVector5.h.
|
inline |
Casts Tvec2 to Tvec5. Last components are set to z, c, and t.
Definition at line 84 of file mlVector5.h.
Casts Tvec3 to Tvec5. Last components are set to c and t.
Definition at line 94 of file mlVector5.h.
Casts Tvec4 to Tvec5. Last component is set to t.
Definition at line 104 of file mlVector5.h.
|
inline |
Sets all components to the passed values.
Definition at line 119 of file mlVector5.h.
Returns a Tvec3 from components 0, 1, and 2.
Definition at line 156 of file mlVector5.h.
Returns a Tvec4 from components 0, 1, 2, and 3.
Definition at line 164 of file mlVector5.h.
Incrementation by a Tvec2.
Definition at line 129 of file mlVector5.h.
Incrementation by a Tvec3.
Definition at line 137 of file mlVector5.h.
Incrementation by a Tvec4.
Definition at line 146 of file mlVector5.h.