# Cinder

# cinder::Vec3< T > Class Template Reference

`#include <Vector.h>`

List of all members.

## Public Types
typedef T | TYPE
## Public Member Functions
| Vec3 ()
| Vec3 (T nx, T ny, T nz)
| Vec3 (const Vec3< T > &src)
| Vec3 (const Vec2< T > &v2, T aZ)
| Vec3 (const T *d)
template<typename FromT >
| Vec3 (const Vec3< FromT > &src)
template<typename Y >
| Vec3 (const Y &v)
void | set (T ax, T ay, T az)
void | set (const Vec3< T > &rhs)
Vec3< T > & | operator= (const Vec3< T > &rhs)
template<typename FromT >
Vec3< T > & | operator= (const Vec3< FromT > &rhs)
T & | operator[] (int n)
const T & | operator[] (int n) const
const Vec3< T > | operator+ (const Vec3< T > &rhs) const
const Vec3< T > | operator- (const Vec3< T > &rhs) const
const Vec3< T > | operator* (const Vec3< T > &rhs) const
const Vec3< T > | operator/ (const Vec3< T > &rhs) const
Vec3< T > & | operator+= (const Vec3< T > &rhs)
Vec3< T > & | operator-= (const Vec3< T > &rhs)
Vec3< T > & | operator*= (const Vec3< T > &rhs)
Vec3< T > & | operator/= (const Vec3< T > &rhs)
const Vec3< T > | operator/ (T rhs) const
Vec3< T > & | operator+= (T rhs)
Vec3< T > & | operator-= (T rhs)
Vec3< T > & | operator*= (T rhs)
Vec3< T > & | operator/= (T rhs)
Vec3< T > | operator- () const
bool | operator== (const Vec3< T > &rhs) const
bool | operator!= (const Vec3< T > &rhs) const
T | dot (const Vec3< T > &rhs) const
Vec3< T > | cross (const Vec3< T > &rhs) const
T | distance (const Vec3< T > &rhs) const
T | distanceSquared (const Vec3< T > &rhs) const
T | length () const
T | lengthSquared () const
void | invert ()
Vec3< T > | inverse ()
void | normalize ()
Vec3< T > | normalized () const
void | safeNormalize ()
Vec3< T > | safeNormalized ()
Vec3< T > | randomOrthogonal () const
void | rotate (T ax, T ay, T az)
Vec3< T > | lerp (T fact, const Vec3< T > &rhs) const
void | lerpEq (T fact, const Vec3< T > &rhs)
Vec3< T > | slerp (T fact, const Vec3< T > &r) const
Vec3< T > | squad (T t, const Vec3< T > &tangentA, const Vec3< T > &tangentB, const Vec3< T > &end)
| operator T * ()
| operator const T * () const
## Static Public Member Functions
static Vec3< T > | max ()
static Vec3< T > | zero ()
static Vec3< T > | one ()
static Vec3< T > | xAxis ()
static Vec3< T > | yAxis ()
static Vec3< T > | zAxis ()
## Public Attributes
T | x
T | y
T | z
## Static Public Attributes
static const int | DIM = 3
## Friends
std::ostream & | operator<< (std::ostream &lhs, const Vec3< T > rhs)

### template<typename T>
class cinder::Vec3< T >

## Member Typedef Documentation

template<typename T>

typedef T cinder::Vec3< T >::TYPE

## Constructor & Destructor Documentation

template<typename T>

cinder::Vec3< T >::Vec3 | ( |  | ) |

template<typename T>

cinder::Vec3< T >::Vec3 | ( | T | nx,
|  | T | ny,
|  | T | nz |
| ) |  |  |

template<typename T>

cinder::Vec3< T >::Vec3 | ( | const Vec3< T > & | src | ) |

template<typename T>

cinder::Vec3< T >::Vec3 | ( | const Vec2< T > & | v2,
|  | T | aZ |
| ) |  |  |

template<typename T>

cinder::Vec3< T >::Vec3 | ( | const T * | d | ) | `[explicit]`

template<typename T>
template<typename FromT >

cinder::Vec3< T >::Vec3 | ( | const Vec3< FromT > & | src | ) |

template<typename T>
template<typename Y >

cinder::Vec3< T >::Vec3 | ( | const Y & | v | ) | `[explicit]`

## Member Function Documentation

template<typename T>

void cinder::Vec3< T >::set | ( | T | ax,
|  | T | ay,
|  | T | az |
| ) |  |  |

template<typename T>

void cinder::Vec3< T >::set | ( | const Vec3< T > & | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator= | ( | const Vec3< T > & | rhs | ) |

template<typename T>
template<typename FromT >

Vec3<T>& cinder::Vec3< T >::operator= | ( | const Vec3< FromT > & | rhs | ) |

template<typename T>

T& cinder::Vec3< T >::operator[] | ( | int | n | ) |

template<typename T>

const T& cinder::Vec3< T >::operator[] | ( | int | n | ) | const

template<typename T>

const Vec3<T> cinder::Vec3< T >::operator+ | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

const Vec3<T> cinder::Vec3< T >::operator- | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

const Vec3<T> cinder::Vec3< T >::operator* | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

const Vec3<T> cinder::Vec3< T >::operator/ | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator+= | ( | const Vec3< T > & | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator-= | ( | const Vec3< T > & | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator*= | ( | const Vec3< T > & | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator/= | ( | const Vec3< T > & | rhs | ) |

template<typename T>

const Vec3<T> cinder::Vec3< T >::operator/ | ( | T | rhs | ) | const

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator+= | ( | T | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator-= | ( | T | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator*= | ( | T | rhs | ) |

template<typename T>

Vec3<T>& cinder::Vec3< T >::operator/= | ( | T | rhs | ) |

template<typename T>

Vec3<T> cinder::Vec3< T >::operator- | ( |  | ) | const

template<typename T>

bool cinder::Vec3< T >::operator== | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

bool cinder::Vec3< T >::operator!= | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

T cinder::Vec3< T >::dot | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

Vec3<T> cinder::Vec3< T >::cross | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

T cinder::Vec3< T >::distance | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

T cinder::Vec3< T >::distanceSquared | ( | const Vec3< T > & | rhs | ) | const

template<typename T>

T cinder::Vec3< T >::length | ( |  | ) | const

template<typename T>

T cinder::Vec3< T >::lengthSquared | ( |  | ) | const

template<typename T>

void cinder::Vec3< T >::invert | ( |  | ) |

template<typename T>

Vec3<T> cinder::Vec3< T >::inverse | ( |  | ) |

template<typename T>

void cinder::Vec3< T >::normalize | ( |  | ) |

template<typename T>

Vec3<T> cinder::Vec3< T >::normalized | ( |  | ) | const

template<typename T>

void cinder::Vec3< T >::safeNormalize | ( |  | ) |

template<typename T>

Vec3<T> cinder::Vec3< T >::safeNormalized | ( |  | ) |

template<typename T>

Vec3<T> cinder::Vec3< T >::randomOrthogonal | ( |  | ) | const

template<typename T>

void cinder::Vec3< T >::rotate | ( | T | ax,
|  | T | ay,
|  | T | az |
| ) |  |  |

template<typename T>

Vec3<T> cinder::Vec3< T >::lerp | ( | T | fact,
|  | const Vec3< T > & | rhs |
| ) |  |  | const

template<typename T>

void cinder::Vec3< T >::lerpEq | ( | T | fact,
|  | const Vec3< T > & | rhs |
| ) |  |  |

template<typename T>

static Vec3<T> cinder::Vec3< T >::max | ( |  | ) | `[static]`

template<typename T>

static Vec3<T> cinder::Vec3< T >::zero | ( |  | ) | `[static]`

template<typename T>

static Vec3<T> cinder::Vec3< T >::one | ( |  | ) | `[static]`

template<typename T>

Vec3<T> cinder::Vec3< T >::slerp | ( | T | fact,
|  | const Vec3< T > & | r |
| ) |  |  | const

template<typename T>

Vec3<T> cinder::Vec3< T >::squad | ( | T | t,
|  | const Vec3< T > & | tangentA,
|  | const Vec3< T > & | tangentB,
|  | const Vec3< T > & | end |
| ) |  |  |

template<typename T>

cinder::Vec3< T >::operator T * | ( |  | ) |

template<typename T>

cinder::Vec3< T >::operator const T * | ( |  | ) | const

template<typename T>

static Vec3<T> cinder::Vec3< T >::xAxis | ( |  | ) | `[static]`

template<typename T>

static Vec3<T> cinder::Vec3< T >::yAxis | ( |  | ) | `[static]`

template<typename T>

static Vec3<T> cinder::Vec3< T >::zAxis | ( |  | ) | `[static]`

## Friends And Related Function Documentation

template<typename T>

std::ostream& operator<< | ( | std::ostream & | lhs,
|  | const Vec3< T > | rhs |
| ) |  |  | `[friend]`

## Member Data Documentation

template<typename T>

T cinder::Vec3< T >::x

template<typename T>

T cinder::Vec3< T >::y

template<typename T>

T cinder::Vec3< T >::z

template<typename T>

const int cinder::Vec3< T >::DIM = 3`[static]`

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

- include/cinder/Vector.h