Stellarium 0.13.1
List of all members | Public Member Functions | Public Attributes
Vector2< T > Class Template Reference

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

#include <VecMath.hpp>

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 * ()
 
void operator+= (const Vector2< T > &)
 
void operator-= (const Vector2< T > &)
 
void operator*= (T)
 
void operator/= (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.

Definition at line 32 of file VecMath.hpp.


The documentation for this class was generated from the following file: