Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Public Member Functions | Public Attributes

Vector2< T > Class Template Reference

A templatized 2d vector compatible with openGL. More...

#include <VecMath.hpp>

List of all members.

Public Member Functions

 Vector2 (T, T)
Vector2operator= (const T *)
void set (T, T)
bool operator== (const Vector2< T > &) const
bool operator!= (const Vector2< T > &) const
const T & operator[] (int x) const
T & operator[] (int)
 operator const T * () const
 operator T * ()
Vector2operator+= (const Vector2< T > &)
Vector2operator-= (const Vector2< T > &)
Vector2operator*= (T)
Vector2operator/= (T)
Vector2 operator- (const Vector2< T > &) const
Vector2 operator+ (const Vector2< T > &) const
Vector2 operator- () const
Vector2 operator+ () const
Vector2 operator* (T) const
Vector2 operator/ (T) const
dot (const Vector2< T > &) const
length () const
lengthSquared () const
void normalize ()

Public Attributes

v [2]

Detailed Description

template<class T>
class Vector2< T >

A templatized 2d vector compatible with openGL.

Use Vec2d or Vec2f typdef for vectors of double and float respectively.