#include <Vector3.h>
Public Member Functions | |
BasicVector3 () | |
template<typename OtherElement > | |
BasicVector3 (const BasicVector3< OtherElement > &other) | |
BasicVector3 (const Element &x_, const Element &y_, const Element &z_) | |
BasicVector3 (const Element *array) | |
BasicVector3 (const std::string &str) | |
void | set (const Element &x, const Element &y, const Element &z) |
Element & | x () |
Element & | y () |
Element & | z () |
const Element & | x () const |
const Element & | y () const |
const Element & | z () const |
bool | operator== (const BasicVector3 &other) const |
bool | operator!= (const BasicVector3 &other) const |
BasicVector3< Element > | operator- () const |
template<typename OtherElement > | |
BasicVector3< Element > | operator+ (const BasicVector3< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator+= (const BasicVector3< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector3< Element > | operator- (const BasicVector3< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator-= (const BasicVector3< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector3< Element > | operator* (const BasicVector3< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator*= (const BasicVector3< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector3< Element > | operator* (const OtherElement &other) const |
template<typename OtherElement > | |
void | operator*= (const OtherElement &other) |
template<typename OtherElement > | |
BasicVector3< Element > | operator/ (const BasicVector3< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator/= (const BasicVector3< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector3< Element > | operator/ (const OtherElement &other) const |
template<typename OtherElement > | |
void | operator/= (const OtherElement &other) |
double | getLength () const |
double | getLengthSquared () const |
BasicVector3< Element > | getNormalised () const |
template<typename OtherT > | |
Element | dot (const BasicVector3< OtherT > &other) const |
template<typename OtherT > | |
BasicVector3< Element > | crossProduct (const BasicVector3< OtherT > &other) const |
std::string | toString () const |
operator const Element * () const | |
operator Element * () | |
Private Attributes | |
Element | m_elements [3] |
Definition at line 25 of file Vector3.h.
BasicVector3< Element >::BasicVector3 | ( | ) | [inline] |
BasicVector3< Element >::BasicVector3 | ( | const BasicVector3< OtherElement > & | other | ) | [inline] |
BasicVector3< Element >::BasicVector3 | ( | const Element & | x_, | |
const Element & | y_, | |||
const Element & | z_ | |||
) | [inline] |
Construct a BasicVector3 with the 3 provided components.
BasicVector3< Element >::BasicVector3 | ( | const Element * | array | ) | [inline] |
Construct a BasicVector3 from a 3-element array. The array must be valid as no bounds checking is done.
BasicVector3< Element >::BasicVector3 | ( | const std::string & | str | ) | [inline] |
Construct a BasicVector3 by parsing the supplied string. The string must contain 3 numeric values separated by whitespace.
str | The string from which component values are extracted. |
BasicVector3<Element> BasicVector3< Element >::crossProduct | ( | const BasicVector3< OtherT > & | other | ) | const [inline] |
Definition at line 315 of file Vector3.h.
Referenced by triangle_cross().
Element BasicVector3< Element >::dot | ( | const BasicVector3< OtherT > & | other | ) | const [inline] |
Definition at line 299 of file Vector3.h.
Referenced by constrain_to_axis(), plane3_for_points(), plane3_test_point(), planepts_snap(), and triangles_same_winding().
double BasicVector3< Element >::getLength | ( | ) | const [inline] |
Return the length of this vector.
Definition at line 265 of file Vector3.h.
Referenced by BasicVector3< float >::getNormalised(), and EntityConnectionLine::render().
double BasicVector3< Element >::getLengthSquared | ( | ) | const [inline] |
BasicVector3<Element> BasicVector3< Element >::getNormalised | ( | ) | const [inline] |
Definition at line 283 of file Vector3.h.
Referenced by constrain_to_axis().
BasicVector3< Element >::operator const Element * | ( | ) | const [inline] |
BasicVector3< Element >::operator Element * | ( | ) | [inline] |
bool BasicVector3< Element >::operator!= | ( | const BasicVector3< Element > & | other | ) | const [inline] |
Compare this BasicVector3 against another for inequality.
BasicVector3<Element> BasicVector3< Element >::operator* | ( | const OtherElement & | other | ) | const [inline] |
BasicVector3<Element> BasicVector3< Element >::operator* | ( | const BasicVector3< OtherElement > & | other | ) | const [inline] |
void BasicVector3< Element >::operator*= | ( | const OtherElement & | other | ) | [inline] |
void BasicVector3< Element >::operator*= | ( | const BasicVector3< OtherElement > & | other | ) | [inline] |
BasicVector3<Element> BasicVector3< Element >::operator+ | ( | const BasicVector3< OtherElement > & | other | ) | const [inline] |
void BasicVector3< Element >::operator+= | ( | const BasicVector3< OtherElement > & | other | ) | [inline] |
BasicVector3<Element> BasicVector3< Element >::operator- | ( | const BasicVector3< OtherElement > & | other | ) | const [inline] |
BasicVector3<Element> BasicVector3< Element >::operator- | ( | ) | const [inline] |
void BasicVector3< Element >::operator-= | ( | const BasicVector3< OtherElement > & | other | ) | [inline] |
BasicVector3<Element> BasicVector3< Element >::operator/ | ( | const OtherElement & | other | ) | const [inline] |
BasicVector3<Element> BasicVector3< Element >::operator/ | ( | const BasicVector3< OtherElement > & | other | ) | const [inline] |
void BasicVector3< Element >::operator/= | ( | const OtherElement & | other | ) | [inline] |
void BasicVector3< Element >::operator/= | ( | const BasicVector3< OtherElement > & | other | ) | [inline] |
bool BasicVector3< Element >::operator== | ( | const BasicVector3< Element > & | other | ) | const [inline] |
Compare this BasicVector3 against another for equality.
void BasicVector3< Element >::set | ( | const Element & | x, | |
const Element & | y, | |||
const Element & | z | |||
) | [inline] |
std::string BasicVector3< Element >::toString | ( | ) | const [inline] |
const Element& BasicVector3< Element >::x | ( | ) | const [inline] |
Element& BasicVector3< Element >::x | ( | ) | [inline] |
Definition at line 94 of file Vector3.h.
Referenced by BasicVector3< float >::BasicVector3(), billboard_viewplaneOriented(), BasicVector3< float >::crossProduct(), BasicVector3< float >::dot(), BasicVector3< float >::operator*(), BasicVector3< float >::operator*=(), BasicVector3< float >::operator+(), BasicVector3< float >::operator+=(), BasicVector3< float >::operator-(), BasicVector3< float >::operator-=(), BasicVector3< float >::operator/(), BasicVector3< float >::operator/=(), BasicVector3< float >::operator==(), plane3_translated(), pointvertex_for_planept(), BasicVector3< float >::set(), Vector3Attribute::update(), AnglesAttribute::update(), vector3_equal_epsilon(), and vector3_swap().
const Element& BasicVector3< Element >::y | ( | ) | const [inline] |
Element& BasicVector3< Element >::y | ( | ) | [inline] |
Definition at line 98 of file Vector3.h.
Referenced by BasicVector3< float >::BasicVector3(), BasicVector3< float >::crossProduct(), BasicVector3< float >::dot(), BasicVector3< float >::operator*(), BasicVector3< float >::operator*=(), BasicVector3< float >::operator+(), BasicVector3< float >::operator+=(), BasicVector3< float >::operator-(), BasicVector3< float >::operator-=(), BasicVector3< float >::operator/(), BasicVector3< float >::operator/=(), BasicVector3< float >::operator==(), plane3_translated(), pointvertex_for_planept(), BasicVector3< float >::set(), Vector3Attribute::update(), AnglesAttribute::update(), vector3_equal_epsilon(), and vector3_swap().
const Element& BasicVector3< Element >::z | ( | ) | const [inline] |
Element& BasicVector3< Element >::z | ( | ) | [inline] |
Definition at line 102 of file Vector3.h.
Referenced by BasicVector3< float >::BasicVector3(), billboard_viewplaneOriented(), BasicVector3< float >::crossProduct(), BasicVector3< float >::dot(), BasicVector3< float >::operator*(), BasicVector3< float >::operator*=(), BasicVector3< float >::operator+(), BasicVector3< float >::operator+=(), BasicVector3< float >::operator-(), BasicVector3< float >::operator-=(), BasicVector3< float >::operator/(), BasicVector3< float >::operator/=(), BasicVector3< float >::operator==(), Pivot2World_viewpointSpace(), plane3_translated(), pointvertex_for_planept(), BasicVector3< float >::set(), Vector3Attribute::update(), AnglesAttribute::update(), vector3_equal_epsilon(), and vector3_swap().
Element BasicVector3< Element >::m_elements[3] [private] |
Definition at line 29 of file Vector3.h.
Referenced by BasicVector3< float >::BasicVector3(), BasicVector3< float >::crossProduct(), BasicVector3< float >::dot(), BasicVector3< float >::getLength(), BasicVector3< float >::getLengthSquared(), BasicVector3< float >::operator const float *(), BasicVector3< float >::operator float *(), BasicVector3< float >::operator*(), BasicVector3< float >::operator*=(), BasicVector3< float >::operator+(), BasicVector3< float >::operator+=(), BasicVector3< float >::operator-(), BasicVector3< float >::operator-=(), BasicVector3< float >::operator/(), BasicVector3< float >::operator/=(), BasicVector3< float >::set(), BasicVector3< float >::toString(), BasicVector3< float >::x(), BasicVector3< float >::y(), and BasicVector3< float >::z().