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

COLOR Class Reference

#include <color.H>

Inheritance diagram for COLOR:

Inheritance graph
[legend]
Collaboration diagram for COLOR:

Collaboration graph
[legend]
List of all members.

Public Types

typedef double value_type

Public Member Functions

 COLOR ()
 COLOR (double x, double y, double z)
 COLOR (const double col[4])
 COLOR (CHSVCOLOR &c)
double luminance () const
COLOR blend (CCOLOR &dest, double amount) const
 Point3 ()
 Point3 (double s)
 Point3 (double x, double y, double z)
void set (double x, double y, double z)
const double * data () const
double operator[] (int index) const
double & operator[] (int index)
COLOR operator * (double s) const
COLOR operator/ (double s) const
COLOR operator+ (const COLOR &p) const
 Adds a point to a point.
COLOR operator+ (const COLVEC &v) const
COLVEC operator- (const COLOR &p) const
COLOR operator- (const COLVEC &v) const
COLOR operator- () const
void operator+= (const COLOR &p)
 Adds a point to a point.
void operator+= (const COLVEC &v)
void operator-= (const COLVEC &v)
void operator *= (double s)
void operator/= (double s)
double dist_sqrd (const COLOR &p) const
 Computes the distance squared between two points.
double dist (const COLOR &p) const
 Computes the distance between two points.
bool operator== (const COLOR &p) const
 Are the two points exactly equal (component wise)?
bool operator!= (const COLOR &p) const
 Are the two points not equal (component wise)?
bool is_equal (const COLOR &p, double epsSqrd=epsAbsSqrdMath()) const
 Is the distance squared between the two points essentially zero?

Static Public Member Functions

static COLOR any ()
static COLOR random ()
static int dim ()

Static Public Attributes

static CCOLOR black
static CCOLOR white
static CCOLOR red
static CCOLOR green
static CCOLOR blue

Protected Attributes

double _x
double _y
double _z

Detailed Description

Definition at line 21 of file color.H.


Member Typedef Documentation

typedef double mlib::Point3< COLOR , COLVEC >::value_type [inherited]
 

Definition at line 62 of file point3.H.


Constructor & Destructor Documentation

COLOR::COLOR  )  [inline]
 

Definition at line 25 of file color.H.

Referenced by any(), blend(), and random().

COLOR::COLOR double  x,
double  y,
double  z
[inline]
 

Definition at line 26 of file color.H.

COLOR::COLOR const double  col[4]  )  [inline]
 

Definition at line 28 of file color.H.

COLOR::COLOR CHSVCOLOR c  ) 
 

Definition at line 15 of file color.C.

References mlib::Point3< COLOR, COLVEC >::_x, mlib::Point3< COLOR, COLVEC >::_y, mlib::Point3< COLOR, COLVEC >::_z, and int().


Member Function Documentation

static COLOR COLOR::any  )  [inline, static]
 

Definition at line 31 of file color.H.

References COLOR().

COLOR COLOR::blend CCOLOR dest,
double  amount
const [inline]
 

Definition at line 40 of file color.H.

References mlib::Point3< COLOR, COLVEC >::_x, mlib::Point3< COLOR, COLVEC >::_y, mlib::Point3< COLOR, COLVEC >::_z, and COLOR().

const double* mlib::Point3< COLOR , COLVEC >::data  )  const [inline, inherited]
 

Definition at line 71 of file point3.H.

static int mlib::Point3< COLOR , COLVEC >::dim  )  [inline, static, inherited]
 

Definition at line 63 of file point3.H.

double mlib::Point3< COLOR , COLVEC >::dist const COLOR p  )  const [inline, inherited]
 

Computes the distance between two points.

Definition at line 111 of file point3.H.

double mlib::Point3< COLOR , COLVEC >::dist_sqrd const COLOR p  )  const [inline, inherited]
 

Computes the distance squared between two points.

Definition at line 107 of file point3.H.

bool mlib::Point3< COLOR , COLVEC >::is_equal const COLOR p,
double  epsSqrd = epsAbsSqrdMath()
const [inline, inherited]
 

Is the distance squared between the two points essentially zero?

Definition at line 129 of file point3.H.

double COLOR::luminance  )  const [inline]
 

Definition at line 36 of file color.H.

References mlib::Point3< COLOR, COLVEC >::_x, mlib::Point3< COLOR, COLVEC >::_y, and mlib::Point3< COLOR, COLVEC >::_z.

COLOR mlib::Point3< COLOR , COLVEC >::operator * double  s  )  const [inline, inherited]
 

Definition at line 81 of file point3.H.

void mlib::Point3< COLOR , COLVEC >::operator *= double  s  )  [inline, inherited]
 

Definition at line 98 of file point3.H.

bool mlib::Point3< COLOR , COLVEC >::operator!= const COLOR p  )  const [inline, inherited]
 

Are the two points not equal (component wise)?

Definition at line 121 of file point3.H.

COLOR mlib::Point3< COLOR , COLVEC >::operator+ const COLVEC v  )  const [inline, inherited]
 

Definition at line 87 of file point3.H.

COLOR mlib::Point3< COLOR , COLVEC >::operator+ const COLOR p  )  const [inline, inherited]
 

Adds a point to a point.

Warning:
This should only be used to add points that have already been pre-weighted by coefficients that add up to 1.

Definition at line 86 of file point3.H.

void mlib::Point3< COLOR , COLVEC >::operator+= const COLVEC v  )  [inline, inherited]
 

Definition at line 96 of file point3.H.

void mlib::Point3< COLOR , COLVEC >::operator+= const COLOR p  )  [inline, inherited]
 

Adds a point to a point.

Warning:
This should only be used to add points that have already been pre-weighted by coefficients that add up to 1.

Definition at line 95 of file point3.H.

COLOR mlib::Point3< COLOR , COLVEC >::operator-  )  const [inline, inherited]
 

Definition at line 90 of file point3.H.

COLOR mlib::Point3< COLOR , COLVEC >::operator- const COLVEC v  )  const [inline, inherited]
 

Definition at line 89 of file point3.H.

COLVEC mlib::Point3< COLOR , COLVEC >::operator- const COLOR p  )  const [inline, inherited]
 

Definition at line 88 of file point3.H.

void mlib::Point3< COLOR , COLVEC >::operator-= const COLVEC v  )  [inline, inherited]
 

Definition at line 97 of file point3.H.

COLOR mlib::Point3< COLOR , COLVEC >::operator/ double  s  )  const [inline, inherited]
 

Definition at line 82 of file point3.H.

void mlib::Point3< COLOR , COLVEC >::operator/= double  s  )  [inline, inherited]
 

Definition at line 99 of file point3.H.

bool mlib::Point3< COLOR , COLVEC >::operator== const COLOR p  )  const [inline, inherited]
 

Are the two points exactly equal (component wise)?

Definition at line 119 of file point3.H.

double& mlib::Point3< COLOR , COLVEC >::operator[] int  index  )  [inline, inherited]
 

Definition at line 74 of file point3.H.

double mlib::Point3< COLOR , COLVEC >::operator[] int  index  )  const [inline, inherited]
 

Definition at line 73 of file point3.H.

mlib::Point3< COLOR , COLVEC >::Point3 double  x,
double  y,
double  z
[inline, inherited]
 

Definition at line 55 of file point3.H.

mlib::Point3< COLOR , COLVEC >::Point3 double  s  )  [inline, explicit, inherited]
 

Definition at line 54 of file point3.H.

mlib::Point3< COLOR , COLVEC >::Point3  )  [inline, inherited]
 

Definition at line 53 of file point3.H.

static COLOR COLOR::random  )  [inline, static]
 

Definition at line 34 of file color.H.

References COLOR().

void mlib::Point3< COLOR , COLVEC >::set double  x,
double  y,
double  z
[inline, inherited]
 

Definition at line 70 of file point3.H.


Member Data Documentation

double mlib::Point3< COLOR , COLVEC >::_x [protected, inherited]
 

Definition at line 46 of file point3.H.

Referenced by blend(), COLOR(), and luminance().

double mlib::Point3< COLOR , COLVEC >::_y [protected, inherited]
 

Definition at line 46 of file point3.H.

Referenced by blend(), COLOR(), and luminance().

double mlib::Point3< COLOR , COLVEC >::_z [protected, inherited]
 

Definition at line 46 of file point3.H.

Referenced by blend(), COLOR(), and luminance().

CCOLOR COLOR::black [static]
 

Definition at line 48 of file color.H.

Referenced by LINE3D::draw_vis_ref(), and GRIDwidget_anchor::GRIDwidget_anchor().

CCOLOR COLOR::blue [static]
 

Definition at line 53 of file color.H.

Referenced by VertUVTexture::draw(), DEBUG_ELLIPSE::draw(), and REF_CLASS().

CCOLOR COLOR::green [static]
 

Definition at line 52 of file color.H.

Referenced by VertUVTexture::draw().

CCOLOR COLOR::red [static]
 

Definition at line 51 of file color.H.

Referenced by VertNormalsTexture::draw(), and GLUT_WINSYS::draw().

CCOLOR COLOR::white [static]
 

Definition at line 49 of file color.H.

Referenced by APPEAR::color(), GEOM::draw(), KeyLineTexture::draw_hidden(), ZcrossFrameTexture::set_color(), SilFrameTexture::set_color(), and APPEAR::specular_color().


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