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

mlib::NDCZvec Class Reference
["NDCZ" Coordinate System]

A vector in NDCZ coordinates. More...

#include <points.H>

Inheritance diagram for mlib::NDCZvec:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef double value_type

Public Member Functions

 Vec3 ()
 Default constructor. Creates a zero length vector.
 Vec3 (double x, double y, double z)
 Constructor that sets the components of the vector to the values specified in the arguments.
const double * data () const
 Returns the elements of the vector as an array.
void set (double x, double y, double z)
 Sets the components of the vector to the values specified in the arguments.
double operator[] (int index) const
double & operator[] (int index)
NDCZvec operator+ (const NDCZvec &v) const
NDCZvec operator- (const NDCZvec &v) const
NDCZvec operator- () const
double operator * (const NDCZvec &v) const
NDCZvec operator * (double s) const
NDCZvec operator/ (double s) const
void operator+= (const NDCZvec &v)
void operator-= (const NDCZvec &v)
void operator *= (double s)
void operator/= (double s)
int operator> (const NDCZvec &v) const
int operator< (const NDCZvec &v) const
bool operator== (const NDCZvec &v) const
bool operator!= (const NDCZvec &v) const
double length () const
double length_sqrd () const
double length_rect () const
bool is_null (double epsSqrd=epsNorSqrdMath()) const
 Is the vector's length equal to zero?
double dist (const NDCZvec &v) const
 Compute the distance between the two vectors.
double dist_sqrd (const NDCZvec &v) const
 Compute the distance squared between the two vectors.
double angle (const NDCZvec &) const
 Compute the angle between the two vectors. The result will be in the range 0 to pi radians.
double tlen (const NDCZvec &b) const
 Returns (this * b) / (b * b).
NDCZvec projected (const NDCZvec &b) const
 Returns the projection of this onto b.
NDCZvec orthogonalized (const NDCZvec &b) const
 Returns this vector minus its projection onto b.
bool is_equal (const NDCZvec &v, double epsSqrd=epsNorSqrdMath()) const
 Are the two vectors equal?
bool is_parallel (const NDCZvec &) const
 Are the two vectors parallel?
bool is_perpend (const NDCZvec &) const
 Are the two vectors perpendicular?
NDCZvec normalized () const
 Return a unit-length copy of this vector.
NDCZvec perpend () const
 Return a vector perpendicular to this one using an arbitrary axis algorithm.
Constructors
 NDCZvec ()
 NDCZvec (double x, double y, double z)
 NDCZvec (CNDCvec &)
 NDCZvec (CXYvec &)
 NDCZvec (CWvec &v, CWtransf &obj_to_ndc_der)
 NDCZvec (CVEXEL &)
Vector Operations
NDCZvec perpendicular () const
 Computes an arbitrary vector that is perpendicular to this one and that lies in the xy-plane.
Vector Property Queries
double planar_length () const
 Computes the length of the vector in the xy-plane (i.e. ignores depth).

Static Public Member Functions

static CNDCZvecnull ()
static CNDCZvecX ()
static CNDCZvecY ()
static CNDCZvecZ ()
static int dim ()

Protected Attributes

double _x
double _y
double _z

Static Protected Attributes

static CNDCZvec _null_vec
static CNDCZvec _x_axis
static CNDCZvec _y_axis
static CNDCZvec _z_axis

Detailed Description

A vector in NDCZ coordinates.

Definition at line 675 of file points.H.


Member Typedef Documentation

typedef double mlib::Vec3< NDCZvec >::value_type [inherited]
 

Definition at line 49 of file vec3.H.


Constructor & Destructor Documentation

mlib::NDCZvec::NDCZvec  )  [inline]
 

Definition at line 689 of file points.H.

Referenced by perpendicular().

mlib::NDCZvec::NDCZvec double  x,
double  y,
double  z
[inline]
 

Definition at line 690 of file points.H.

mlib::NDCZvec::NDCZvec CNDCvec  ) 
 

Definition at line 310 of file points.C.

References mlib::Vec3< NDCZvec >::_x, mlib::Vec3< NDCZvec >::_y, and mlib::Vec3< NDCZvec >::_z.

mlib::NDCZvec::NDCZvec CXYvec  ) 
 

Definition at line 317 of file points.C.

References mlib::Vec3< NDCZvec >::_x, mlib::Vec3< NDCZvec >::_y, mlib::Vec3< NDCZvec >::_z, and VIEW_ASPECT.

mlib::NDCZvec::NDCZvec CWvec v,
CWtransf obj_to_ndc_der
 

Definition at line 345 of file points.C.

References mlib::Vec3< NDCZvec >::_x, mlib::Vec3< NDCZvec >::_y, and mlib::Vec3< NDCZvec >::_z.

mlib::NDCZvec::NDCZvec CVEXEL  ) 
 

Definition at line 330 of file points.C.

References mlib::Vec3< NDCZvec >::_x, mlib::Vec3< NDCZvec >::_y, mlib::Vec3< NDCZvec >::_z, VIEW_ASPECT, and VIEW_SIZE.


Member Function Documentation

double mlib::Vec3< NDCZvec >::angle const NDCZvec  )  const [inline, inherited]
 

Compute the angle between the two vectors. The result will be in the range 0 to pi radians.

const double* mlib::Vec3< NDCZvec >::data  )  const [inline, inherited]
 

Returns the elements of the vector as an array.

Definition at line 58 of file vec3.H.

static int mlib::Vec3< NDCZvec >::dim  )  [inline, static, inherited]
 

Definition at line 50 of file vec3.H.

double mlib::Vec3< NDCZvec >::dist const NDCZvec v  )  const [inline, inherited]
 

Compute the distance between the two vectors.

Definition at line 120 of file vec3.H.

double mlib::Vec3< NDCZvec >::dist_sqrd const NDCZvec v  )  const [inline, inherited]
 

Compute the distance squared between the two vectors.

Definition at line 122 of file vec3.H.

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

Are the two vectors equal?

Note:
Checks to see if the distance between the two vectors is less than or equal to epsSqrd.

Definition at line 148 of file vec3.H.

bool mlib::Vec3< NDCZvec >::is_null double  epsSqrd = epsNorSqrdMath()  )  const [inline, inherited]
 

Is the vector's length equal to zero?

Definition at line 111 of file vec3.H.

bool mlib::Vec3< NDCZvec >::is_parallel const NDCZvec  )  const [inline, inherited]
 

Are the two vectors parallel?

bool mlib::Vec3< NDCZvec >::is_perpend const NDCZvec  )  const [inline, inherited]
 

Are the two vectors perpendicular?

double mlib::Vec3< NDCZvec >::length  )  const [inline, inherited]
 

Definition at line 106 of file vec3.H.

double mlib::Vec3< NDCZvec >::length_rect  )  const [inline, inherited]
 

Definition at line 108 of file vec3.H.

double mlib::Vec3< NDCZvec >::length_sqrd  )  const [inline, inherited]
 

Definition at line 107 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::normalized  )  const [inline, inherited]
 

Return a unit-length copy of this vector.

static CNDCZvec& mlib::NDCZvec::null  )  [inline, static]
 

Definition at line 719 of file points.H.

References _null_vec.

NDCZvec mlib::Vec3< NDCZvec >::operator * double  s  )  const [inline, inherited]
 

Definition at line 76 of file vec3.H.

double mlib::Vec3< NDCZvec >::operator * const NDCZvec v  )  const [inline, inherited]
 

Definition at line 74 of file vec3.H.

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

Definition at line 81 of file vec3.H.

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

Definition at line 99 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::operator+ const NDCZvec v  )  const [inline, inherited]
 

Definition at line 72 of file vec3.H.

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

Definition at line 79 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::operator-  )  const [inline, inherited]
 

Definition at line 75 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::operator- const NDCZvec v  )  const [inline, inherited]
 

Definition at line 73 of file vec3.H.

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

Definition at line 80 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::operator/ double  s  )  const [inline, inherited]
 

Definition at line 77 of file vec3.H.

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

Definition at line 82 of file vec3.H.

int mlib::Vec3< NDCZvec >::operator< const NDCZvec v  )  const [inline, inherited]
 

Provided so that min(V, V) and max(V, V) work.

Note:
Comparison is done by length (not by comparing individual components).

Definition at line 96 of file vec3.H.

bool mlib::Vec3< NDCZvec >::operator== const NDCZvec v  )  const [inline, inherited]
 

Definition at line 98 of file vec3.H.

int mlib::Vec3< NDCZvec >::operator> const NDCZvec v  )  const [inline, inherited]
 

Provided so that min(V, V) and max(V, V) work.

Note:
Comparison is done by length (not by comparing individual components).

Definition at line 92 of file vec3.H.

double& mlib::Vec3< NDCZvec >::operator[] int  index  )  [inline, inherited]
 

Definition at line 65 of file vec3.H.

double mlib::Vec3< NDCZvec >::operator[] int  index  )  const [inline, inherited]
 

Definition at line 64 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::orthogonalized const NDCZvec b  )  const [inline, inherited]
 

Returns this vector minus its projection onto b.

Definition at line 138 of file vec3.H.

NDCZvec mlib::Vec3< NDCZvec >::perpend  )  const [inline, inherited]
 

Return a vector perpendicular to this one using an arbitrary axis algorithm.

The arbitrary perpendicular vector is found as follows. First, the minimum length component of the vector is found. Second, a new vector is created that is the unit vector along the direction of the minimum component. Third, the perpendicular vector is found by taking the cross product of the vector with the minimum component set to zero and the original vector. Fourth, the perpendicular vector is normalized.

NDCZvec mlib::NDCZvec::perpendicular  )  const [inline]
 

Computes an arbitrary vector that is perpendicular to this one and that lies in the xy-plane.

Differs from the perpend() function becayse it only takes the x and y coordinates into account (i.e. it ignores depth).

Definition at line 706 of file points.H.

References mlib::Vec3< NDCZvec >::_x, mlib::Vec3< NDCZvec >::_y, and NDCZvec().

double mlib::NDCZvec::planar_length  )  const [inline]
 

Computes the length of the vector in the xy-plane (i.e. ignores depth).

Definition at line 715 of file points.H.

References mlib::Vec3< NDCZvec >::_x, and mlib::Vec3< NDCZvec >::_y.

NDCZvec mlib::Vec3< NDCZvec >::projected const NDCZvec b  )  const [inline, inherited]
 

Returns the projection of this onto b.

Definition at line 135 of file vec3.H.

void mlib::Vec3< NDCZvec >::set double  x,
double  y,
double  z
[inline, inherited]
 

Sets the components of the vector to the values specified in the arguments.

Definition at line 62 of file vec3.H.

double mlib::Vec3< NDCZvec >::tlen const NDCZvec b  )  const [inline, inherited]
 

Returns (this * b) / (b * b).

Definition at line 129 of file vec3.H.

mlib::Vec3< NDCZvec >::Vec3 double  x,
double  y,
double  z
[inline, inherited]
 

Constructor that sets the components of the vector to the values specified in the arguments.

Definition at line 42 of file vec3.H.

mlib::Vec3< NDCZvec >::Vec3  )  [inline, inherited]
 

Default constructor. Creates a zero length vector.

Definition at line 39 of file vec3.H.

static CNDCZvec& mlib::NDCZvec::X  )  [inline, static]
 

Definition at line 720 of file points.H.

References _x_axis.

static CNDCZvec& mlib::NDCZvec::Y  )  [inline, static]
 

Definition at line 721 of file points.H.

References _y_axis.

static CNDCZvec& mlib::NDCZvec::Z  )  [inline, static]
 

Definition at line 722 of file points.H.

References _z_axis.


Member Data Documentation

CNDCZvec mlib::NDCZvec::_null_vec [static, protected]
 

Definition at line 679 of file points.H.

Referenced by null().

double mlib::Vec3< NDCZvec >::_x [protected, inherited]
 

Definition at line 31 of file vec3.H.

Referenced by NDCZvec(), perpendicular(), and planar_length().

CNDCZvec mlib::NDCZvec::_x_axis [static, protected]
 

Definition at line 680 of file points.H.

Referenced by X().

double mlib::Vec3< NDCZvec >::_y [protected, inherited]
 

Definition at line 31 of file vec3.H.

Referenced by NDCZvec(), perpendicular(), and planar_length().

CNDCZvec mlib::NDCZvec::_y_axis [static, protected]
 

Definition at line 681 of file points.H.

Referenced by Y().

double mlib::Vec3< NDCZvec >::_z [protected, inherited]
 

Definition at line 31 of file vec3.H.

Referenced by NDCZvec().

CNDCZvec mlib::NDCZvec::_z_axis [static, protected]
 

Definition at line 682 of file points.H.

Referenced by Z().


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