Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

Coordinate Class Reference

Contains x,y,z and r,g,b for a point in 3d space, plus a string label. More...

#include <Coordinate.h>

List of all members.

Public Methods

 Coordinate (unsigned int iid, GLdouble ix, GLdouble iy, GLdouble iz, GLfloat ir, GLfloat ig, GLfloat ib)
 Standard constructor given id, x,y,z, r,g,b it makes the coordinate. More...

 Coordinate ()
 Empty constructor. More...

Coordinate & operator= (const Coordinate &obj)
 Assignment. More...

void set (GLdouble ix, GLdouble iy, GLdouble iz)
 Reset x,y,z. More...

void set_rgb (GLfloat ir, GLfloat ig, GLfloat ib)
 Reset r,g,b. More...

void unsafe_set (GLdouble ix, GLdouble iy, GLdouble iz)
 Reset x,y,z but don't change the label. More...

GLdouble get_r ()
 Get the red color value. More...

GLdouble get_g ()
 Get the green color value. More...

GLdouble get_b ()
 Get the blue color value. More...

GLdouble get_x ()
 Get the x value. More...

void set_x (GLdouble ix)
 Set the x value, changes label for you. More...

GLdouble get_y ()
 Get the y value. More...

void set_y (GLdouble iy)
 Set the y value, changes label for you. More...

GLdouble get_z ()
 Set the z value. More...

void set_z (GLdouble iz)
 Set the z value, changes label for you. More...

char * get_label ()
 Get the label. More...

unsigned int get_id ()
 Get the id. More...

bool operator== (const Coordinate &obj) const
 Equivalence checks only x, y, z, colors and label ignored. More...

bool idmatch (const Coordinate &obj) const
 match on id only. More...

bool operator< (const Coordinate &obj) const
 less than operator checks only x, y, z, colors and label ignored. More...

void dump ()
 Prints the label. More...

void edump ()
void fdump (ofstream &outfile)
 Prints the label to an ofstream. More...


Private Attributes

unsigned int id
GLdouble x
GLdouble y
GLdouble z
GLfloat r
GLfloat g
GLfloat b
char label [30]


Detailed Description

Contains x,y,z and r,g,b for a point in 3d space, plus a string label.

Coordinate encapsulates the x,y,z and r,g,b for a point. get_label provides a premade label of the values in string form.

Definition at line 31 of file Coordinate.h.


Constructor & Destructor Documentation

Coordinate::Coordinate unsigned int    iid,
GLdouble    ix,
GLdouble    iy,
GLdouble    iz,
GLfloat    ir,
GLfloat    ig,
GLfloat    ib
[inline]
 

Standard constructor given id, x,y,z, r,g,b it makes the coordinate.

Definition at line 40 of file Coordinate.h.

References b, g, id, label, r, x, y, and z.

Coordinate::Coordinate   [inline]
 

Empty constructor.

Definition at line 48 of file Coordinate.h.

References id, label, x, y, and z.


Member Function Documentation

void Coordinate::dump   [inline]
 

Prints the label.

Definition at line 197 of file Coordinate.h.

References label.

Referenced by Timestep::dump.

void Coordinate::edump   [inline]
 

Definition at line 202 of file Coordinate.h.

References b, g, label, r, x, y, and z.

Referenced by Timestep::set_random_color.

void Coordinate::fdump ofstream &    outfile [inline]
 

Prints the label to an ofstream.

Definition at line 209 of file Coordinate.h.

References b, g, r, x, y, and z.

GLdouble Coordinate::get_b   [inline]
 

Get the blue color value.

Definition at line 111 of file Coordinate.h.

Referenced by Timestep::loadfile.

GLdouble Coordinate::get_g   [inline]
 

Get the green color value.

Definition at line 105 of file Coordinate.h.

Referenced by Timestep::loadfile.

unsigned int Coordinate::get_id   [inline]
 

Get the id.

Definition at line 161 of file Coordinate.h.

References id.

char* Coordinate::get_label   [inline]
 

Get the label.

Definition at line 155 of file Coordinate.h.

References label.

GLdouble Coordinate::get_r   [inline]
 

Get the red color value.

Definition at line 99 of file Coordinate.h.

Referenced by Timestep::loadfile.

GLdouble Coordinate::get_x   [inline]
 

Get the x value.

Definition at line 117 of file Coordinate.h.

Referenced by Timestep::calc_and_move, Timestep::loadfile, and PointAverage::operator().

GLdouble Coordinate::get_y   [inline]
 

Get the y value.

Definition at line 130 of file Coordinate.h.

Referenced by Timestep::calc_and_move, Timestep::loadfile, and PointAverage::operator().

GLdouble Coordinate::get_z   [inline]
 

Set the z value.

Definition at line 142 of file Coordinate.h.

Referenced by Timestep::calc_and_move, Timestep::loadfile, and PointAverage::operator().

bool Coordinate::idmatch const Coordinate &    obj const [inline]
 

match on id only.

Definition at line 172 of file Coordinate.h.

References id.

bool Coordinate::operator< const Coordinate &    obj const [inline]
 

less than operator checks only x, y, z, colors and label ignored.

Definition at line 178 of file Coordinate.h.

References x, y, and z.

Coordinate& Coordinate::operator= const Coordinate &    obj [inline]
 

Assignment.

Definition at line 56 of file Coordinate.h.

References b, g, id, label, r, x, y, and z.

bool Coordinate::operator== const Coordinate &    obj const [inline]
 

Equivalence checks only x, y, z, colors and label ignored.

Definition at line 166 of file Coordinate.h.

References x, y, and z.

void Coordinate::set GLdouble    ix,
GLdouble    iy,
GLdouble    iz
[inline]
 

Reset x,y,z.

Definition at line 74 of file Coordinate.h.

References id, label, x, y, and z.

void Coordinate::set_rgb GLfloat    ir,
GLfloat    ig,
GLfloat    ib
[inline]
 

Reset r,g,b.

Definition at line 83 of file Coordinate.h.

References b, g, and r.

void Coordinate::set_x GLdouble    ix [inline]
 

Set the x value, changes label for you.

Definition at line 123 of file Coordinate.h.

References id, label, x, y, and z.

void Coordinate::set_y GLdouble    iy [inline]
 

Set the y value, changes label for you.

Definition at line 136 of file Coordinate.h.

References id, label, x, y, and z.

void Coordinate::set_z GLdouble    iz [inline]
 

Set the z value, changes label for you.

Definition at line 148 of file Coordinate.h.

References id, label, x, y, and z.

void Coordinate::unsafe_set GLdouble    ix,
GLdouble    iy,
GLdouble    iz
[inline]
 

Reset x,y,z but don't change the label.

Definition at line 91 of file Coordinate.h.

References x, y, and z.

Referenced by Timestep::calc_and_move.


Member Data Documentation

GLfloat Coordinate::b [private]
 

Definition at line 36 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator=, and set_rgb.

GLfloat Coordinate::g [private]
 

Definition at line 36 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator=, and set_rgb.

unsigned int Coordinate::id [private]
 

Definition at line 34 of file Coordinate.h.

Referenced by Coordinate, get_id, idmatch, operator=, set, set_x, set_y, and set_z.

char Coordinate::label[30] [private]
 

Definition at line 37 of file Coordinate.h.

Referenced by Coordinate, dump, edump, get_label, operator=, set, set_x, set_y, and set_z.

GLfloat Coordinate::r [private]
 

Definition at line 36 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator=, and set_rgb.

GLdouble Coordinate::x [private]
 

Definition at line 35 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator<, operator=, operator==, set, set_x, set_y, set_z, and unsafe_set.

GLdouble Coordinate::y [private]
 

Definition at line 35 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator<, operator=, operator==, set, set_x, set_y, set_z, and unsafe_set.

GLdouble Coordinate::z [private]
 

Definition at line 35 of file Coordinate.h.

Referenced by Coordinate, edump, fdump, operator<, operator=, operator==, set, set_x, set_y, set_z, and unsafe_set.


The documentation for this class was generated from the following file:
Generated on Wed Oct 29 10:01:52 2003 for Tetraviewer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002