vector2 Struct Reference

2 component vector More...

#include <3dmath.h>

List of all members.

Public Member Functions

 vector2 (float _x=0, float _y=0)
 Constructor.
 vector2 (const float *v)
 Constructor.
 vector2 (const vector2 &v)
 Copy constructor.
bool operator!= (const vector2 &v) const
 Not Equal operator.
bool operator< (const vector2 &v) const
 Less then operator.

Public Attributes

union {
   struct {
      float   x
 Components.
      float   y
   } 
   float   _v [2]
 Components.
}; 


Detailed Description

2 component vector

Definition at line 24 of file 3dmath.h.


Constructor & Destructor Documentation

vector2::vector2 ( float  _x = 0,
float  _y = 0 
) [inline]

Constructor.

Definition at line 38 of file 3dmath.h.

00038 : x(_x), y(_y)  {}

vector2::vector2 ( const float *  v  )  [inline]

Constructor.

Definition at line 40 of file 3dmath.h.

00040 : x(v[0]), y(v[1])         {}

vector2::vector2 ( const vector2 v  )  [inline]

Copy constructor.

Definition at line 42 of file 3dmath.h.

00042 : x(v.x), y(v.y)         {}


Member Function Documentation

bool vector2::operator!= ( const vector2 v  )  const [inline]

Not Equal operator.

Definition at line 44 of file 3dmath.h.

00045        {
00046               return (x != v.x) || ( y != v.y);
00047        }

bool vector2::operator< ( const vector2 v  )  const [inline]

Less then operator.

Definition at line 49 of file 3dmath.h.

00050        {
00051               return (x < v.x) || ((x == v.x) && ( y < v.y));
00052        }


Member Data Documentation

float vector2::x

Components.

Definition at line 31 of file 3dmath.h.

float vector2::y

Definition at line 31 of file 3dmath.h.

float vector2::_v[2]

Components.

Definition at line 34 of file 3dmath.h.

union { ... }


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

Generated on Tue Mar 10 14:41:39 2009 for VRUT by  doxygen 1.5.5