geom::vec2< V > Class Template Reference

Gfx::vec2 is a 2-D vector class for representing 2-D points or distances. More...

#include <geom/vec2.h>

Inheritance diagram for geom::vec2< V >:

Inheritance graph
[legend]
Collaboration diagram for geom::vec2< V >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 vec2 (V x, V y)
template<class U>
 vec2 (const vec2< U > &other)
template<class U>
vec2operator= (const vec2< U > &other)
V & x ()
V & y ()
const V & x () const
const V & y () const
vec2 abs () const
void set (V x, V y)
bool operator== (const vec2< V > &b)
double length () const
void set_length (double len)
void set_polar_rad (double r, double theta)
double theta_deg () const
void set_theta_deg (double degrees)
void rotate_deg (double degrees)
double angle_to (const vec2< V > &b) const
 Result in radians.
double distance_to (const vec2< V > &b) const
template<class U>
void scale_by (const U &factor)
vec2 operator* (const V &factor) const
vec2 operator/ (const V &factor) const
template<class U>
vec2operator*= (const U &factor)
template<class U>
vec2operator/= (const U &factor)
vec2 operator+ (const vec2< V > &rhs) const
vec2 operator- (const vec2< V > &rhs) const
template<class U>
vec2 operator* (const vec2< U > &rhs) const
template<class U>
vec2 operator/ (const vec2< U > &rhs) const
template<class U>
vec2operator+= (const vec2< U > &rhs)
template<class U>
vec2operator-= (const vec2< U > &rhs)
template<class U>
vec2operator*= (const vec2< U > &factor)
template<class U>
vec2operator/= (const vec2< U > &factor)
void debug_dump () const throw ()

Static Public Member Functions

static vec2 zeros ()
static vec2 ones ()


Detailed Description

template<class V>
class geom::vec2< V >

Gfx::vec2 is a 2-D vector class for representing 2-D points or distances.

Definition at line 48 of file vec2.h.


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

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:15 2008 by Doxygen version 1.5.5.