![]() |
CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
template class for three-element vectors More...
#include <cs237-types.hxx>
Public Member Functions | |
| vec3 () | |
| vec3 (vec3 const &v) | |
| vec3 (T xx) | |
| vec3 (T xx, T yy) | |
| vec3 (T xx, T yy, T zz) | |
| vec3 (vec2< T > const &v) | |
| vec3 (vec2< T > const &v, T zz) | |
| vec3 (vec4< T > const &v) | |
| vec3 & | operator= (vec3 const &v) |
| vec3 & | operator+= (T const &s) |
| add a scalar to this vector More... | |
| vec3 & | operator+= (vec3 const &v) |
| add a vector to this vector More... | |
| vec3 & | operator-= (T const &s) |
| subtract a scalar from this vector More... | |
| vec3 & | operator-= (vec3 const &v) |
| subtract a vector from this vector More... | |
| vec3 & | operator*= (T const &s) |
| multiply this vector by a scalar More... | |
| vec3 & | operator*= (vec3 const &v) |
| component-wise vector multiplication More... | |
| vec3 & | operator/= (T const &s) |
| divide this vector by a scalar More... | |
| T | length () const |
| the length (magnitude) of the vector More... | |
| vec3 & | normalize () |
| normalize the vector More... | |
| T const & | operator[] (unsigned int const &i) const |
| T & | operator[] (unsigned int const &i) |
Public Attributes | |
| T | x |
| T | y |
| T | z |
template class for three-element vectors
|
inline |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
explicit |
|
inline |
the length (magnitude) of the vector
|
inline |
normalize the vector
|
inline |
multiply this vector by a scalar
|
inline |
component-wise vector multiplication
|
inline |
add a scalar to this vector
|
inline |
add a vector to this vector
|
inline |
subtract a scalar from this vector
|
inline |
subtract a vector from this vector
|
inline |
divide this vector by a scalar
|
inline |
|
inline |
return the ith element of the vector
|
inline |
| T cs237::__detail::vec3< T >::x |
| T cs237::__detail::vec3< T >::y |
| T cs237::__detail::vec3< T >::z |