STOFFVec3< T > Class Template Reference documentation

Classes | Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
STOFFVec3< T > Class Template Reference

small class which defines a vector with 3 elements More...

`#include <libstaroffice_internal.hxx>`

## Classes
struct | PosSizeLt
| internal struct used to create sorted map, sorted by X, Y, Z More...

## Public Types
typedef std::map< STOFFVec3< T >, T, struct PosSizeLt > | Map
| map of STOFFVec3 More...

## Public Member Functions
| STOFFVec3 (T xx=0, T yy=0, T zz=0)
| constructor More...
template<class U >
| STOFFVec3 (STOFFVec3< U > const &p)
| generic copy constructor More...
T | x () const
| first element More...
T | y () const
| second element More...
T | z () const
| third element More...
T | operator[] (int c) const
| operator[] More...
T & | operator[] (int c)
| operator[] More...
void | set (T xx, T yy, T zz)
| resets the three elements More...
void | setX (T xx)
| resets the first element More...
void | setY (T yy)
| resets the second element More...
void | setZ (T zz)
| resets the third element More...
void | add (T dx, T dy, T dz)
| increases the actuals values by dx, dy, dz More...
STOFFVec3< T > & | operator+= (STOFFVec3< T > const &p)
| operator+= More...
STOFFVec3< T > & | operator-= (STOFFVec3< T > const &p)
| operator-= More...
template<class U >
STOFFVec3< T > & | operator*= (U scale)
| generic operator*= More...
bool | operator== (STOFFVec3< T > const &p) const
| comparison== More...
bool | operator!= (STOFFVec3< T > const &p) const
| comparison!= More...
bool | operator< (STOFFVec3< T > const &p) const
| comparison<: which first compares x values, then y values then z values. More...
int | cmp (STOFFVec3< T > const &p) const
| a comparison function: which first compares x values, then y values then z values. More...

## Protected Attributes
T | m_val [3]
| the values More...

## Friends
STOFFVec3< T > | operator+ (STOFFVec3< T > const &p1, STOFFVec3< T > const &p2)
| operator+ More...
STOFFVec3< T > | operator- (STOFFVec3< T > const &p1, STOFFVec3< T > const &p2)
| operator- More...
template<class U >
STOFFVec3< T > | operator* (U scale, STOFFVec3< T > const &p1)
| generic operator* More...
std::ostream & | operator<< (std::ostream &o, STOFFVec3< T > const &f)
| operator<<: prints data in form "XxYxZ" More...

## Detailed Description

### template<class T>
class STOFFVec3< T >

small class which defines a vector with 3 elements

## Member Typedef Documentation

## ◆ Map

template<class T>

STOFFVec3< T >::Map

map of STOFFVec3

## Constructor & Destructor Documentation

## ◆ STOFFVec3() [1/2]

template<class T>

STOFFVec3< T >::STOFFVec3 | ( | T | xx = `0`,
|  | T | yy = `0`,
|  | T | zz = `0`
| ) |  |
| inline

constructor

## ◆ STOFFVec3() [2/2]

template<class T>
template<class U >

STOFFVec3< T >::STOFFVec3 | ( | STOFFVec3< U > const & | p | ) |
| inline

generic copy constructor

## Member Function Documentation

## ◆ add()

template<class T>

void STOFFVec3< T >::add | ( | T | dx,
|  | T | dy,
|  | T | dz
| ) |  |
| inline

increases the actuals values by dx, dy, dz

## ◆ cmp()

template<class T>

int STOFFVec3< T >::cmp | ( | STOFFVec3< T > const & | p | ) | const
| inline

a comparison function: which first compares x values, then y values then z values.

Referenced by STOFFVec3< bool >::operator!=(), STOFFVec3< T >::PosSizeLt::operator()(), STOFFVec3< bool >::operator<(), and STOFFVec3< bool >::operator==().

## ◆ operator!=()

template<class T>

bool STOFFVec3< T >::operator!= | ( | STOFFVec3< T > const & | p | ) | const
| inline

comparison!=

## ◆ operator*=()

template<class T>
template<class U >

STOFFVec3<T>& STOFFVec3< T >::operator*= | ( | U | scale | ) |
| inline

generic operator*=

## ◆ operator+=()

template<class T>

STOFFVec3<T>& STOFFVec3< T >::operator+= | ( | STOFFVec3< T > const & | p | ) |
| inline

operator+=

## ◆ operator-=()

template<class T>

STOFFVec3<T>& STOFFVec3< T >::operator-= | ( | STOFFVec3< T > const & | p | ) |
| inline

operator-=

## ◆ operator<()

template<class T>

bool STOFFVec3< T >::operator< | ( | STOFFVec3< T > const & | p | ) | const
| inline

comparison<: which first compares x values, then y values then z values.

## ◆ operator==()

template<class T>

bool STOFFVec3< T >::operator== | ( | STOFFVec3< T > const & | p | ) | const
| inline

comparison==

## ◆ operator[]() [1/2]

template<class T>

T STOFFVec3< T >::operator[] | ( | int | c | ) | const
| inline

operator[]

## ◆ operator[]() [2/2]

template<class T>

T& STOFFVec3< T >::operator[] | ( | int | c | ) |
| inline

operator[]

## ◆ set()

template<class T>

void STOFFVec3< T >::set | ( | T | xx,
|  | T | yy,
|  | T | zz
| ) |  |
| inline

resets the three elements

## ◆ setX()

template<class T>

void STOFFVec3< T >::setX | ( | T | xx | ) |
| inline

resets the first element

## ◆ setY()

template<class T>

void STOFFVec3< T >::setY | ( | T | yy | ) |
| inline

resets the second element

## ◆ setZ()

template<class T>

void STOFFVec3< T >::setZ | ( | T | zz | ) |
| inline

resets the third element

## ◆ x()

template<class T>

T STOFFVec3< T >::x | ( |  | ) | const
| inline

first element

## ◆ y()

template<class T>

T STOFFVec3< T >::y | ( |  | ) | const
| inline

second element

## ◆ z()

template<class T>

T STOFFVec3< T >::z | ( |  | ) | const
| inline

third element

## Friends And Related Function Documentation

## ◆ operator*

template<class T>
template<class U >

STOFFVec3<T> operator* | ( | U | scale,
|  | STOFFVec3< T > const & | p1
| ) |  |
| friend

generic operator*

## ◆ operator+

template<class T>

STOFFVec3<T> operator+ | ( | STOFFVec3< T > const & | p1,
|  | STOFFVec3< T > const & | p2
| ) |  |
| friend

operator+

## ◆ operator-

template<class T>

STOFFVec3<T> operator- | ( | STOFFVec3< T > const & | p1,
|  | STOFFVec3< T > const & | p2
| ) |  |
| friend

operator-

## ◆ operator<<

template<class T>

std::ostream& operator<< | ( | std::ostream & | o,
|  | STOFFVec3< T > const & | f
| ) |  |
| friend

operator<<: prints data in form "XxYxZ"

## Member Data Documentation

## ◆ m_val

template<class T>

T STOFFVec3< T >::m_val[3]
| protected

the values

Referenced by STOFFVec3< bool >::add(), STOFFVec3< bool >::cmp(), STOFFVec3< bool >::operator*=(), STOFFVec3< bool >::operator+=(), STOFFVec3< bool >::operator-=(), STOFFVec3< bool >::operator[](), STOFFVec3< bool >::set(), STOFFVec3< bool >::setX(), STOFFVec3< bool >::setY(), STOFFVec3< bool >::setZ(), STOFFVec3< bool >::STOFFVec3(), STOFFVec3< bool >::x(), STOFFVec3< bool >::y(), and STOFFVec3< bool >::z().

The documentation for this class was generated from the following file:

- libstaroffice_internal.hxx