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

View Class Reference

View contains the loaded Tetrahedrons and the state of all flags. More...

#include <View.h>

List of all members.

Public Methods

 View ()
 openGL aspect used by reshape constructor. More...

unsigned int get_currstep ()
 get the value of current timestep. More...

void next_step ()
 display the next timestep. More...

void set_solo_chunk (int chunk)
 set the solo chunk. More...

void prev_step ()
 display the previous timestep. More...

void animate (int direction)
 animate the timestaps. More...

void action_view ()
void recenter ()
 translate object to be centered on origin. More...

void display_step (unsigned int)
 display the timestep step. More...

void display_first ()
 display the first timestep. More...

void display ()
 display the current timestep. More...

void redisplay_step (unsigned int step)
 do redisplay if the calllist exists. More...

bool loadfile (const char *filename)
 load a tetrahedron data file. More...

void note_update ()
 all our timesteps need updating. More...

void toggle_fillpoly ()
 change fillpoly. More...

void toggle_showlabel ()
 change showlabel. More...

void toggle_showlength ()
 change showlength. More...

void toggle_opaque ()
 change opaque. More...

void toggle_pointmode ()
 change pointmode. More...

void zoomin ()
 zoom in by scaling up. More...

void zoomout ()
 zoom out by scaling down. More...

void rotatecolormap ()
 cycle the color map. More...

void rotate ()
void rotate_x (int direction)
 rotate around X. More...

void rotate_y (int direction)
 rotate around Y. More...

void rotate_z (int direction)
 rotate around Z. More...

void move_x (float direction)
 translate X. More...

void move_y (float direction)
 translate Y. More...

void move_z (float direction)
 translate Z. More...

void make_random_color_set ()
 set one random color for each unique point. More...


Public Attributes

double scale
 the unique points of all tetras in all timesteps. More...

int ScreenWidth
 control scaling. More...

int ScreenHeight
 control scaling. More...

float aspect_ratio
 openGL window size. More...


Private Attributes

unsigned int fillpoly
unsigned int colormap
 fill mode or line mode. More...

bool showlabel
 random, chunk, or point. More...

bool showlength
 to show labels or not. More...

bool opaque
 to show edge length or not. More...

bool pointmode
 to view opaque with wire mode. More...

double xtri
 to show only the vertices. More...

double ytri
 control rotation around X axis. More...

double ztri
 control rotation around Y axis. More...

double ztran
 control rotation around Z axis. More...

double xtran
 control z translation. More...

double ytran
 control x translation. More...

unsigned int currstep
 control y translation. More...

int filenum
 current timestep. More...

int solo_chunk
 count of loaded files. More...

map< unsigned int, RGBchunks
 view a single chunk. More...

vector< bool > uptodate_step
 map of chunks to colors. More...

map< unsigned int, Timesteptimesteps
 flag if we need to rebuild the display for the timestep. More...

map< unsigned int, Timestep
>::iterator 
now
 the timesteps. More...

vector< Coordinatepoints
 the current timestep iterator. More...


Detailed Description

View contains the loaded Tetrahedrons and the state of all flags.

Does all the actual work of loading and displaying the tetrahedrons.

Definition at line 42 of file View.h.


Constructor & Destructor Documentation

View::View   [inline]
 

openGL aspect used by reshape constructor.

Definition at line 74 of file View.h.

References colormap, currstep, filenum, fillpoly, now, opaque, pointmode, scale, showlabel, showlength, solo_chunk, timesteps, uptodate_step, xtri, ytri, and ztri.


Member Function Documentation

void View::action_view  
 

void View::animate int    direction [inline]
 

animate the timestaps.

Definition at line 123 of file View.h.

References display_step, now, and timesteps.

Referenced by keyboard.

void View::display   [inline]
 

display the current timestep.

Definition at line 158 of file View.h.

References currstep, and display_step.

Referenced by bcallback, chunkcallback, display, keyboard, nochunkcallback, and set_solo_chunk.

void View::display_first   [inline]
 

display the first timestep.

Definition at line 151 of file View.h.

References display_step, now, and timesteps.

Referenced by main.

void View::display_step unsigned    int
 

display the timestep step.

uses redisplay if it can otherwise calls the timestep's display

Definition at line 114 of file View.C.

References aspect_ratio, colormap, currstep, fillpoly, now, opaque, pointmode, scale, ScreenHeight, ScreenWidth, showlabel, showlength, solo_chunk, timesteps, uptodate_step, xtran, xtri, ytran, ytri, ztran, and ztri.

Referenced by animate, display, display_first, next_step, prev_step, redisplay_step, and timecallback.

unsigned int View::get_currstep   [inline]
 

get the value of current timestep.

Definition at line 95 of file View.h.

References currstep.

Referenced by keyboard, and timecallback.

bool View::loadfile const char *    filename
 

load a tetrahedron data file.

Filename is the (path included) string of the file to load. Format of the filename should be baseChunknum.Timestamp where Chunknum and Timestamp are integers. E.g dbg_msh1.1. Loading multiple chunks at one timestep is best done with shell wildcards. Such as: dbg_msh[0-9]*.1 check chunk map, if present use the chunk color if not present add new color to chunk map create new timestep call loadfile on the timestep

Definition at line 41 of file View.C.

References chunks, filenum, timesteps, and uptodate_step.

Referenced by main.

void View::make_random_color_set  
 

set one random color for each unique point.

iterate through all timesteps and get all the points. assign a color for each point

Definition at line 156 of file View.C.

References points, and timesteps.

Referenced by main.

void View::move_x float    direction [inline]
 

translate X.

Definition at line 259 of file View.h.

References note_update, and xtran.

Referenced by keyboard.

void View::move_y float    direction [inline]
 

translate Y.

Definition at line 265 of file View.h.

References note_update, and ytran.

Referenced by keyboard.

void View::move_z float    direction [inline]
 

translate Z.

Definition at line 271 of file View.h.

References note_update, and ztran.

Referenced by keyboard.

void View::next_step   [inline]
 

display the next timestep.

Definition at line 101 of file View.h.

References display_step, and now.

Referenced by bcallback, and keyboard.

void View::note_update   [inline]
 

all our timesteps need updating.

Definition at line 175 of file View.h.

References uptodate_step.

Referenced by move_x, move_y, move_z, rotate_x, rotate_y, rotate_z, rotatecolormap, set_solo_chunk, toggle_fillpoly, toggle_opaque, toggle_pointmode, toggle_showlabel, toggle_showlength, zoomin, and zoomout.

void View::prev_step   [inline]
 

display the previous timestep.

Definition at line 116 of file View.h.

References display_step, and now.

Referenced by keyboard.

void View::recenter  
 

translate object to be centered on origin.

Definition at line 139 of file View.C.

References points, and timesteps.

Referenced by main.

void View::redisplay_step unsigned int    step [inline]
 

do redisplay if the calllist exists.

Definition at line 164 of file View.h.

References display_step.

void View::rotate  
 

void View::rotate_x int    direction [inline]
 

rotate around X.

Definition at line 241 of file View.h.

References note_update, and xtri.

Referenced by movers.

void View::rotate_y int    direction [inline]
 

rotate around Y.

Definition at line 247 of file View.h.

References note_update, and ytri.

Referenced by movers.

void View::rotate_z int    direction [inline]
 

rotate around Z.

Definition at line 253 of file View.h.

References note_update, and ztri.

Referenced by movers.

void View::rotatecolormap   [inline]
 

cycle the color map.

Definition at line 230 of file View.h.

References colormap, and note_update.

Referenced by keyboard.

void View::set_solo_chunk int    chunk [inline]
 

set the solo chunk.

Definition at line 108 of file View.h.

References display, note_update, and solo_chunk.

Referenced by chunkcallback, keyboard, and nochunkcallback.

void View::toggle_fillpoly   [inline]
 

change fillpoly.

Definition at line 181 of file View.h.

References fillpoly, and note_update.

Referenced by keyboard.

void View::toggle_opaque   [inline]
 

change opaque.

Definition at line 202 of file View.h.

References note_update, and opaque.

Referenced by keyboard.

void View::toggle_pointmode   [inline]
 

change pointmode.

Definition at line 209 of file View.h.

References note_update, and pointmode.

Referenced by keyboard.

void View::toggle_showlabel   [inline]
 

change showlabel.

Definition at line 188 of file View.h.

References note_update, and showlabel.

Referenced by keyboard.

void View::toggle_showlength   [inline]
 

change showlength.

Definition at line 195 of file View.h.

References note_update, and showlength.

Referenced by keyboard.

void View::zoomin   [inline]
 

zoom in by scaling up.

Definition at line 216 of file View.h.

References note_update, and scale.

Referenced by keyboard.

void View::zoomout   [inline]
 

zoom out by scaling down.

Definition at line 223 of file View.h.

References note_update, and scale.

Referenced by keyboard.


Member Data Documentation

float View::aspect_ratio
 

openGL window size.

Definition at line 72 of file View.h.

Referenced by display_step, and reshape.

map<unsigned int, RGB> View::chunks [private]
 

view a single chunk.

Definition at line 60 of file View.h.

Referenced by loadfile.

unsigned int View::colormap [private]
 

fill mode or line mode.

Definition at line 46 of file View.h.

Referenced by display_step, rotatecolormap, and View.

unsigned int View::currstep [private]
 

control y translation.

Definition at line 57 of file View.h.

Referenced by display, display_step, get_currstep, and View.

int View::filenum [private]
 

current timestep.

Definition at line 58 of file View.h.

Referenced by loadfile, and View.

unsigned int View::fillpoly [private]
 

Definition at line 45 of file View.h.

Referenced by display_step, toggle_fillpoly, and View.

map< unsigned int, Timestep >::iterator View::now [private]
 

the timesteps.

Definition at line 66 of file View.h.

Referenced by animate, display_first, display_step, next_step, prev_step, and View.

bool View::opaque [private]
 

to show edge length or not.

Definition at line 49 of file View.h.

Referenced by display_step, toggle_opaque, and View.

bool View::pointmode [private]
 

to view opaque with wire mode.

Definition at line 50 of file View.h.

Referenced by display_step, toggle_pointmode, and View.

vector<Coordinate> View::points [private]
 

the current timestep iterator.

Definition at line 67 of file View.h.

Referenced by make_random_color_set, and recenter.

double View::scale
 

the unique points of all tetras in all timesteps.

Definition at line 70 of file View.h.

Referenced by display_step, View, zoomin, and zoomout.

int View::ScreenHeight
 

control scaling.

Definition at line 71 of file View.h.

Referenced by display_step, and reshape.

int View::ScreenWidth
 

control scaling.

Definition at line 71 of file View.h.

Referenced by display_step, and reshape.

bool View::showlabel [private]
 

random, chunk, or point.

Definition at line 47 of file View.h.

Referenced by display_step, toggle_showlabel, and View.

bool View::showlength [private]
 

to show labels or not.

Definition at line 48 of file View.h.

Referenced by display_step, toggle_showlength, and View.

int View::solo_chunk [private]
 

count of loaded files.

Definition at line 59 of file View.h.

Referenced by display_step, set_solo_chunk, and View.

map< unsigned int, Timestep > View::timesteps [private]
 

flag if we need to rebuild the display for the timestep.

note, vector<bool> is not a proper container so do not expect &uptodate_step[0] to work.

Definition at line 65 of file View.h.

Referenced by animate, display_first, display_step, loadfile, make_random_color_set, recenter, and View.

vector<bool> View::uptodate_step [private]
 

map of chunks to colors.

Definition at line 61 of file View.h.

Referenced by display_step, loadfile, note_update, and View.

double View::xtran [private]
 

control z translation.

Definition at line 55 of file View.h.

Referenced by display_step, and move_x.

double View::xtri [private]
 

to show only the vertices.

Definition at line 51 of file View.h.

Referenced by display_step, rotate_x, and View.

double View::ytran [private]
 

control x translation.

Definition at line 56 of file View.h.

Referenced by display_step, and move_y.

double View::ytri [private]
 

control rotation around X axis.

Definition at line 52 of file View.h.

Referenced by display_step, rotate_y, and View.

double View::ztran [private]
 

control rotation around Z axis.

Definition at line 54 of file View.h.

Referenced by display_step, and move_z.

double View::ztri [private]
 

control rotation around Y axis.

Definition at line 53 of file View.h.

Referenced by display_step, rotate_z, and View.


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