Crazy Eddie's GUI System  0.8.6
CEGUI::Vector3< T > Class Template Reference

Class used as a three dimensional vector. More...

+ Inheritance diagram for CEGUI::Vector3< T >:
+ Collaboration diagram for CEGUI::Vector3< T >:

Public Types

typedef T value_type
 

Public Member Functions

 Vector3 (const T x, const T y, const T z)
 
 Vector3 (const Vector2< T > &v, const T z)
 
 Vector3 (const Vector3 &v)
 
bool operator== (const Vector3 &vec) const
 
bool operator!= (const Vector3 &vec) const
 
Vector3 operator* (const T c) const
 
Vector3 operator+ (const Vector3 &v) const
 
Vector3 operator- (const Vector3 &v) const
 

Static Public Member Functions

static Vector3 zero ()
 finger saving alias for Vector3(0, 0, 0)
 
static Vector3 one ()
 finger saving alias for Vector3(1, 1, 1)
 
static Vector3 one_x ()
 finger saving alias for Vector3(1, 0, 0)
 
static Vector3 one_y ()
 finger saving alias for Vector3(0, 1, 0)
 
static Vector3 one_z ()
 finger saving alias for Vector3(0, 0, 1)
 

Public Attributes

d_x
 
d_y
 
d_z
 

Friends

std::ostream & operator<< (std::ostream &s, const Vector3 &v)
 allows writing the vector3 to std ostream
 

Detailed Description

template<typename T>
class CEGUI::Vector3< T >

Class used as a three dimensional vector.

This class is templated now, this allows us to use it as a Vector3 of floats, ints or even UDims without replicating the code all over the place.
For a simple Vector3 of floats (what was called Vector3 before), use Vector3f as the T template parameter defaults to float to save fingertips.