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

HSVCOLVEC Class Reference

#include <color.H>

Inheritance diagram for HSVCOLVEC:

Inheritance graph
[legend]
Collaboration diagram for HSVCOLVEC:

Collaboration graph
[legend]
List of all members.

Public Types

typedef double value_type

Public Member Functions

 HSVCOLVEC ()
 HSVCOLVEC (double h, double s, double v)
 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)
HSVCOLVEC operator+ (const HSVCOLVEC &v) const
HSVCOLVEC operator- (const HSVCOLVEC &v) const
HSVCOLVEC operator- () const
double operator * (const HSVCOLVEC &v) const
HSVCOLVEC operator * (double s) const
HSVCOLVEC operator/ (double s) const
void operator+= (const HSVCOLVEC &v)
void operator-= (const HSVCOLVEC &v)
void operator *= (double s)
void operator/= (double s)
int operator> (const HSVCOLVEC &v) const
int operator< (const HSVCOLVEC &v) const
bool operator== (const HSVCOLVEC &v) const
bool operator!= (const HSVCOLVEC &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 HSVCOLVEC &v) const
 Compute the distance between the two vectors.
double dist_sqrd (const HSVCOLVEC &v) const
 Compute the distance squared between the two vectors.
double angle (const HSVCOLVEC &) const
 Compute the angle between the two vectors. The result will be in the range 0 to pi radians.
double tlen (const HSVCOLVEC &b) const
 Returns (this * b) / (b * b).
HSVCOLVEC projected (const HSVCOLVEC &b) const
 Returns the projection of this onto b.
HSVCOLVEC orthogonalized (const HSVCOLVEC &b) const
 Returns this vector minus its projection onto b.
bool is_equal (const HSVCOLVEC &v, double epsSqrd=epsNorSqrdMath()) const
 Are the two vectors equal?
bool is_parallel (const HSVCOLVEC &) const
 Are the two vectors parallel?
bool is_perpend (const HSVCOLVEC &) const
 Are the two vectors perpendicular?
HSVCOLVEC normalized () const
 Return a unit-length copy of this vector.
HSVCOLVEC perpend () const
 Return a vector perpendicular to this one using an arbitrary axis algorithm.

Static Public Member Functions

static int dim ()

Protected Attributes

double _x
double _y
double _z

Detailed Description

Definition at line 66 of file color.H.


Member Typedef Documentation

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

Definition at line 49 of file vec3.H.


Constructor & Destructor Documentation

HSVCOLVEC::HSVCOLVEC  )  [inline]
 

Definition at line 68 of file color.H.

HSVCOLVEC::HSVCOLVEC double  h,
double  s,
double  v
[inline]
 

Definition at line 69 of file color.H.


Member Function Documentation

double mlib::Vec3< HSVCOLVEC >::angle const HSVCOLVEC  )  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< HSVCOLVEC >::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< HSVCOLVEC >::dim  )  [inline, static, inherited]
 

Definition at line 50 of file vec3.H.

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

Compute the distance between the two vectors.

Definition at line 120 of file vec3.H.

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

Compute the distance squared between the two vectors.

Definition at line 122 of file vec3.H.

bool mlib::Vec3< HSVCOLVEC >::is_equal const HSVCOLVEC 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< HSVCOLVEC >::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< HSVCOLVEC >::is_parallel const HSVCOLVEC  )  const [inline, inherited]
 

Are the two vectors parallel?

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

Are the two vectors perpendicular?

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

Definition at line 106 of file vec3.H.

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

Definition at line 108 of file vec3.H.

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

Definition at line 107 of file vec3.H.

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

Return a unit-length copy of this vector.

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

Definition at line 76 of file vec3.H.

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

Definition at line 74 of file vec3.H.

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

Definition at line 81 of file vec3.H.

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

Definition at line 99 of file vec3.H.

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

Definition at line 72 of file vec3.H.

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

Definition at line 79 of file vec3.H.

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

Definition at line 75 of file vec3.H.

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

Definition at line 73 of file vec3.H.

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

Definition at line 80 of file vec3.H.

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

Definition at line 77 of file vec3.H.

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

Definition at line 82 of file vec3.H.

int mlib::Vec3< HSVCOLVEC >::operator< const HSVCOLVEC 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< HSVCOLVEC >::operator== const HSVCOLVEC v  )  const [inline, inherited]
 

Definition at line 98 of file vec3.H.

int mlib::Vec3< HSVCOLVEC >::operator> const HSVCOLVEC 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< HSVCOLVEC >::operator[] int  index  )  [inline, inherited]
 

Definition at line 65 of file vec3.H.

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

Definition at line 64 of file vec3.H.

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

Returns this vector minus its projection onto b.

Definition at line 138 of file vec3.H.

HSVCOLVEC mlib::Vec3< HSVCOLVEC >::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.

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

Returns the projection of this onto b.

Definition at line 135 of file vec3.H.

void mlib::Vec3< HSVCOLVEC >::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< HSVCOLVEC >::tlen const HSVCOLVEC b  )  const [inline, inherited]
 

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

Definition at line 129 of file vec3.H.

mlib::Vec3< HSVCOLVEC >::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< HSVCOLVEC >::Vec3  )  [inline, inherited]
 

Default constructor. Creates a zero length vector.

Definition at line 39 of file vec3.H.


Member Data Documentation

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

Definition at line 31 of file vec3.H.

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

Definition at line 31 of file vec3.H.

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

Definition at line 31 of file vec3.H.


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