Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mlib::VEXEL Class Reference
["PIXEL" Coordinate System]

A vector in pixel coordinates. More...

#include <points.H>

Inheritance diagram for mlib::VEXEL:

Inheritance graph
[legend]
Collaboration diagram for mlib::VEXEL:

Collaboration graph
[legend]
List of all members.

Public Types

typedef double value_type

Public Member Functions

 Vec2 ()
 Vec2 (double x, double y)
VEXEL operator+ (const VEXEL &v) const
VEXEL operator- (const VEXEL &v) const
VEXEL operator- () const
double operator * (const VEXEL &v) const
VEXEL operator * (double s) const
VEXEL operator/ (double s) const
void operator+= (const VEXEL &v)
void operator-= (const VEXEL &v)
void operator *= (double s)
void operator/= (double s)
double operator[] (int index) const
double & operator[] (int index)
double length () const
double length_sqrd () const
bool is_exact_null () const
bool is_null (double epsSqrdMath=epsNorSqrdMath()) const
 Tells if the vector is basically the zero vector.
VEXEL normalized () const
 Returns a unit-length copy of this vector.
VEXEL perpend () const
 Returns a copy of the vector rotated 90 degrees CCW.
double dist (const VEXEL &v) const
double dist_sqrd (const VEXEL &v) const
double signed_angle (const VEXEL &) const
 Returns the signed angle between this vector and the given one.
double angle (const VEXEL &v) const
 Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians.
double tlen (const VEXEL &b) const
 Return (this * b) / (b * b).
VEXEL projected (const VEXEL &b) const
 Returns the projection of this onto b.
VEXEL orthogonalized (const VEXEL &b) const
 Returns this vector minus its projection onto b.
bool is_equal (const VEXEL &v, double epsSqrd=epsNorSqrdMath()) const
bool is_parallel (const VEXEL &) const
bool operator== (const VEXEL &v) const
bool operator!= (const VEXEL &v) const
Constructors
 VEXEL ()
 VEXEL (double x, double y)
 VEXEL (CXYvec &)
 VEXEL (CNDCvec &)
 VEXEL (CWpt &, CWvec &)

Static Public Member Functions

static CVEXELnull ()
static CVEXELX ()
static CVEXELY ()
static int dim ()

Protected Attributes

double _x
double _y

Static Protected Attributes

static CVEXEL _null_vec
static CVEXEL _x_axis
static CVEXEL _y_axis

Detailed Description

A vector in pixel coordinates.

Definition at line 1096 of file points.H.


Member Typedef Documentation

typedef double mlib::Vec2< VEXEL >::value_type [inherited]
 

Definition at line 47 of file vec2.H.


Constructor & Destructor Documentation

mlib::VEXEL::VEXEL  )  [inline]
 

Definition at line 1109 of file points.H.

mlib::VEXEL::VEXEL double  x,
double  y
[inline]
 

Definition at line 1110 of file points.H.

mlib::VEXEL::VEXEL CXYvec  ) 
 

Definition at line 504 of file points.C.

References mlib::Vec2< VEXEL >::_x, mlib::Vec2< VEXEL >::_y, and VIEW_SIZE.

mlib::VEXEL::VEXEL CNDCvec  ) 
 

Definition at line 466 of file points.C.

References mlib::Vec2< VEXEL >::_x, mlib::Vec2< VEXEL >::_y, VIEW_ASPECT, and VIEW_SIZE.

mlib::VEXEL::VEXEL CWpt ,
CWvec
 

Definition at line 481 of file points.C.


Member Function Documentation

double mlib::Vec2< VEXEL >::angle const VEXEL v  )  const [inherited]
 

Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians.

static int mlib::Vec2< VEXEL >::dim  )  [inline, static, inherited]
 

Definition at line 48 of file vec2.H.

double mlib::Vec2< VEXEL >::dist const VEXEL v  )  const [inline, inherited]
 

Definition at line 107 of file vec2.H.

double mlib::Vec2< VEXEL >::dist_sqrd const VEXEL v  )  const [inline, inherited]
 

Definition at line 108 of file vec2.H.

bool mlib::Vec2< VEXEL >::is_equal const VEXEL v,
double  epsSqrd = epsNorSqrdMath()
const [inline, inherited]
 

Definition at line 141 of file vec2.H.

References mlib::Vec2< V >::dist_sqrd().

bool mlib::Vec2< VEXEL >::is_exact_null  )  const [inline, inherited]
 

Definition at line 84 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

bool mlib::Vec2< VEXEL >::is_null double  epsSqrdMath = epsNorSqrdMath()  )  const [inline, inherited]
 

Tells if the vector is basically the zero vector.

Definition at line 87 of file vec2.H.

References mlib::Vec2< V >::length_sqrd().

bool mlib::Vec2< VEXEL >::is_parallel const VEXEL  )  const [inherited]
 

double mlib::Vec2< VEXEL >::length  )  const [inline, inherited]
 

Definition at line 81 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

double mlib::Vec2< VEXEL >::length_sqrd  )  const [inline, inherited]
 

Definition at line 82 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::normalized  )  const [inherited]
 

Returns a unit-length copy of this vector.

static CVEXEL& mlib::VEXEL::null  )  [inline, static]
 

Definition at line 1117 of file points.H.

References _null_vec.

VEXEL mlib::Vec2< VEXEL >::operator * double  s  )  const [inline, inherited]
 

Definition at line 60 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

double mlib::Vec2< VEXEL >::operator * const VEXEL v  )  const [inline, inherited]
 

Definition at line 57 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

void mlib::Vec2< VEXEL >::operator *= double  s  )  [inline, inherited]
 

Definition at line 65 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

bool mlib::Vec2< VEXEL >::operator!= const VEXEL v  )  const [inline, inherited]
 

Definition at line 151 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::operator+ const VEXEL v  )  const [inline, inherited]
 

Definition at line 55 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

void mlib::Vec2< VEXEL >::operator+= const VEXEL v  )  [inline, inherited]
 

Definition at line 63 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::operator-  )  const [inline, inherited]
 

Definition at line 58 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::operator- const VEXEL v  )  const [inline, inherited]
 

Definition at line 56 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

void mlib::Vec2< VEXEL >::operator-= const VEXEL v  )  [inline, inherited]
 

Definition at line 64 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::operator/ double  s  )  const [inline, inherited]
 

Definition at line 61 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

void mlib::Vec2< VEXEL >::operator/= double  s  )  [inline, inherited]
 

Definition at line 66 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

bool mlib::Vec2< VEXEL >::operator== const VEXEL v  )  const [inline, inherited]
 

Definition at line 150 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

double& mlib::Vec2< VEXEL >::operator[] int  index  )  [inline, inherited]
 

Definition at line 74 of file vec2.H.

References mlib::Vec2< V >::_x.

double mlib::Vec2< VEXEL >::operator[] int  index  )  const [inline, inherited]
 

Definition at line 73 of file vec2.H.

References mlib::Vec2< V >::_x.

VEXEL mlib::Vec2< VEXEL >::orthogonalized const VEXEL b  )  const [inline, inherited]
 

Returns this vector minus its projection onto b.

Definition at line 134 of file vec2.H.

References mlib::Vec2< V >::projected().

VEXEL mlib::Vec2< VEXEL >::perpend  )  const [inline, inherited]
 

Returns a copy of the vector rotated 90 degrees CCW.

Definition at line 100 of file vec2.H.

References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y.

VEXEL mlib::Vec2< VEXEL >::projected const VEXEL b  )  const [inline, inherited]
 

Returns the projection of this onto b.

Definition at line 131 of file vec2.H.

References mlib::Vec2< V >::tlen().

double mlib::Vec2< VEXEL >::signed_angle const VEXEL  )  const [inherited]
 

Returns the signed angle between this vector and the given one.

I.e., returns the angle by which to rotate this vector counter-clockwise to align with the given vector. The result will be negative if the smallest rotation to get to the given vector is in the clockwise direction. The result will lie between -pi and pi radians:

double mlib::Vec2< VEXEL >::tlen const VEXEL b  )  const [inline, inherited]
 

Return (this * b) / (b * b).

Definition at line 125 of file vec2.H.

References mlib::isZero().

mlib::Vec2< VEXEL >::Vec2 double  x,
double  y
[inline, inherited]
 

Definition at line 40 of file vec2.H.

mlib::Vec2< VEXEL >::Vec2  )  [inline, inherited]
 

Definition at line 39 of file vec2.H.

static CVEXEL& mlib::VEXEL::X  )  [inline, static]
 

Definition at line 1118 of file points.H.

References _x_axis.

static CVEXEL& mlib::VEXEL::Y  )  [inline, static]
 

Definition at line 1119 of file points.H.

References _y_axis.


Member Data Documentation

CVEXEL mlib::VEXEL::_null_vec [static, protected]
 

Definition at line 1100 of file points.H.

Referenced by null().

double mlib::Vec2< VEXEL >::_x [protected, inherited]
 

Definition at line 32 of file vec2.H.

Referenced by VEXEL().

CVEXEL mlib::VEXEL::_x_axis [static, protected]
 

Definition at line 1101 of file points.H.

Referenced by X().

double mlib::Vec2< VEXEL >::_y [protected, inherited]
 

Definition at line 32 of file vec2.H.

Referenced by VEXEL().

CVEXEL mlib::VEXEL::_y_axis [static, protected]
 

Definition at line 1102 of file points.H.

Referenced by Y().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:48:21 2006 for jot by  doxygen 1.4.4