#include <Geometry.h>
Public Member Functions | |
Vector2< T > | GetAsVector2 () const |
const T & | GetX () const |
const T & | GetY () const |
const T & | GetZ () const |
kt_double | Length () const |
void | MakeCeil (const Vector3 &rOther) |
void | MakeFloor (const Vector3 &rOther) |
void | Normalize () |
kt_bool | operator!= (const Vector3 &rOther) const |
const Vector3 | operator* (T scalar) const |
Vector3 & | operator*= (const Vector3 &rOther) |
Vector3 & | operator*= (const T &rValue) |
const Vector3 | operator+ (const Vector3 &rOther) const |
const Vector3 | operator+ (kt_double scalar) const |
Vector3 & | operator+= (const Vector3 &rOther) |
Vector3 & | operator+= (const T &rValue) |
const Vector3 | operator- (const Vector3 &rOther) const |
const Vector3 | operator- (kt_double scalar) const |
Vector3 & | operator-= (const Vector3 &rOther) |
Vector3 & | operator-= (const T &rValue) |
Vector3 & | operator/= (const Vector3 &rOther) |
Vector3 & | operator/= (const T &rValue) |
kt_bool | operator< (const Vector3 &rOther) const |
Vector3 & | operator= (const Vector3 &rOther) |
kt_bool | operator== (const Vector3 &rOther) const |
const Vector3 | operator^ (const Vector3 &rOther) const |
void | SetX (const T &x) |
void | SetY (const T &y) |
void | SetZ (const T &z) |
kt_double | SquaredLength () const |
const String | ToString () const |
Vector3 () | |
Vector3 (T x, T y, T z) | |
Vector3 (const Vector2< T > &rVector) | |
Vector3 (const Vector3 &rOther) | |
Private Attributes | |
T | m_Values [3] |
Friends | |
KARTO_FORCEINLINE std::ostream & | operator<< (std::ostream &rStream, const Vector3 &rVector) |
Represents a 3-dimensional vector (x, y, z)
Definition at line 620 of file Geometry.h.
karto::Vector3< T >::Vector3 | ( | ) | [inline] |
Vector at the origin
Definition at line 626 of file Geometry.h.
karto::Vector3< T >::Vector3 | ( | T | x, |
T | y, | ||
T | z | ||
) | [inline] |
karto::Vector3< T >::Vector3 | ( | const Vector2< T > & | rVector | ) | [inline] |
Constructs a 3D vector from the given 2D vector with a z-component of 0
rVector | 2D vector |
Definition at line 650 of file Geometry.h.
karto::Vector3< T >::Vector3 | ( | const Vector3< T > & | rOther | ) | [inline] |
Copy constructor
Definition at line 660 of file Geometry.h.
Vector2<T> karto::Vector3< T >::GetAsVector2 | ( | ) | const [inline] |
Gets a 2D version of this vector (ignores z-component)
Definition at line 726 of file Geometry.h.
const T& karto::Vector3< T >::GetX | ( | ) | const [inline] |
Gets the x-component of this vector
Definition at line 672 of file Geometry.h.
const T& karto::Vector3< T >::GetY | ( | ) | const [inline] |
Gets the y-component of this vector
Definition at line 690 of file Geometry.h.
const T& karto::Vector3< T >::GetZ | ( | ) | const [inline] |
Gets the z-component of this vector
Definition at line 708 of file Geometry.h.
kt_double karto::Vector3< T >::Length | ( | ) | const [inline] |
Returns the length of the vector.
Definition at line 766 of file Geometry.h.
void karto::Vector3< T >::MakeCeil | ( | const Vector3< T > & | rOther | ) | [inline] |
void karto::Vector3< T >::MakeFloor | ( | const Vector3< T > & | rOther | ) | [inline] |
void karto::Vector3< T >::Normalize | ( | ) | [inline] |
Normalize the vector
Definition at line 774 of file Geometry.h.
kt_bool karto::Vector3< T >::operator!= | ( | const Vector3< T > & | rOther | ) | const [inline] |
Inequality operator
Definition at line 1015 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator* | ( | T | scalar | ) | const [inline] |
Scales the vector by the given scalar
Definition at line 850 of file Geometry.h.
Vector3& karto::Vector3< T >::operator*= | ( | const Vector3< T > & | rOther | ) | [inline] |
In-place component-wise vector multiplication
rOther | vector |
Definition at line 884 of file Geometry.h.
Vector3& karto::Vector3< T >::operator*= | ( | const T & | rValue | ) | [inline] |
In-place vector-scalar multiplication
Definition at line 938 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator+ | ( | const Vector3< T > & | rOther | ) | const [inline] |
Vector addition
Definition at line 818 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator+ | ( | kt_double | scalar | ) | const [inline] |
Vector-scalar addition
Definition at line 826 of file Geometry.h.
Vector3& karto::Vector3< T >::operator+= | ( | const Vector3< T > & | rOther | ) | [inline] |
In-place vector addition
Definition at line 858 of file Geometry.h.
Vector3& karto::Vector3< T >::operator+= | ( | const T & | rValue | ) | [inline] |
In-place component-wise scalar addition
rValue | value to add to each component |
Definition at line 912 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator- | ( | const Vector3< T > & | rOther | ) | const [inline] |
Vector subtraction
Definition at line 834 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator- | ( | kt_double | scalar | ) | const [inline] |
Vector-scalar subtraction
Definition at line 842 of file Geometry.h.
Vector3& karto::Vector3< T >::operator-= | ( | const Vector3< T > & | rOther | ) | [inline] |
In-place vector subtraction
Definition at line 870 of file Geometry.h.
Vector3& karto::Vector3< T >::operator-= | ( | const T & | rValue | ) | [inline] |
In-place component-wise scalar subtraction
rValue | value to subtract from each component |
Definition at line 926 of file Geometry.h.
Vector3& karto::Vector3< T >::operator/= | ( | const Vector3< T > & | rOther | ) | [inline] |
In-place component-wise vector division
rOther | vector |
Definition at line 898 of file Geometry.h.
Vector3& karto::Vector3< T >::operator/= | ( | const T & | rValue | ) | [inline] |
In-place component-wise vector-scalar division
rValue | value to divide from each component |
Definition at line 952 of file Geometry.h.
kt_bool karto::Vector3< T >::operator< | ( | const Vector3< T > & | rOther | ) | const [inline] |
Less than operator
rOther | other vector |
Definition at line 980 of file Geometry.h.
Vector3& karto::Vector3< T >::operator= | ( | const Vector3< T > & | rOther | ) | [inline] |
Assignment operator
Definition at line 806 of file Geometry.h.
kt_bool karto::Vector3< T >::operator== | ( | const Vector3< T > & | rOther | ) | const [inline] |
Equality operator
Definition at line 1007 of file Geometry.h.
const Vector3 karto::Vector3< T >::operator^ | ( | const Vector3< T > & | rOther | ) | const [inline] |
Vector cross product
rOther | vector |
Definition at line 966 of file Geometry.h.
void karto::Vector3< T >::SetX | ( | const T & | x | ) | [inline] |
Sets the x-component of this vector
x | x-component |
Definition at line 681 of file Geometry.h.
void karto::Vector3< T >::SetY | ( | const T & | y | ) | [inline] |
Sets the y-component of this vector
y | y-component |
Definition at line 699 of file Geometry.h.
void karto::Vector3< T >::SetZ | ( | const T & | z | ) | [inline] |
Sets the z-component of this vector
z | z-component |
Definition at line 717 of file Geometry.h.
kt_double karto::Vector3< T >::SquaredLength | ( | ) | const [inline] |
Returns the square of the length of the vector
Definition at line 757 of file Geometry.h.
const String karto::Vector3< T >::ToString | ( | ) | const [inline] |
Returns a string representation of this vector
Definition at line 791 of file Geometry.h.
KARTO_FORCEINLINE std::ostream& operator<< | ( | std::ostream & | rStream, |
const Vector3< T > & | rVector | ||
) | [friend] |
Write vector onto output stream
Definition at line 1023 of file Geometry.h.
T karto::Vector3< T >::m_Values[3] [private] |
Definition at line 1030 of file Geometry.h.