#include <Timestep.h>
Public Methods | |
Timestep () | |
constructor. More... | |
Timestep & | operator= (const Timestep &obj) |
void | calc_and_move () |
determine the center of all the tetrahedrons. More... | |
void | display_wire (unsigned int) |
void | display_point (unsigned int) |
void | draw_polygons (GLdouble ScreenWidth, GLdouble ScreenHeight, unsigned int colormap, GLdouble aspect_ratio, GLdouble scale, GLdouble xtri, GLdouble ytri, GLdouble ztri, GLdouble xtran, GLdouble ytran, GLdouble ztran, unsigned int fillpoly, bool showlabel, bool showlength, bool opaque, bool pointmode, int chunk) |
draw all the polygons. More... | |
void | showlabels () |
show coordinate labels. More... | |
void | showlengths () |
show edge lengths at the midpoint of each edge. More... | |
bool | loadfile (const char *filename, GLfloat *tetcolor, unsigned int step, unsigned int chunk) |
load a tetrahedron data file. More... | |
void | dump () |
dump the points. More... | |
vector< Coordinate > | get_points () |
yeild up copy of our points. More... | |
void | set_random_color (vector< Coordinate > randompoints) |
set the randomvector points to the color values in randompoints. More... | |
void | display (unsigned int cmap, bool wire, bool pointmode, unsigned int fillpoly, int chunk) |
display the tetrahedrons using the cmap color scheme with wireframe. More... | |
Private Attributes | |
vector< GLdouble > | vertexarray |
vector< GLfloat > | pointcolor |
the drawarray. More... | |
vector< GLfloat > | chunkcolor |
point color array. More... | |
vector< GLfloat > | linecolor |
chunk color array r,g,b +i. More... | |
vector< GLfloat > | randomcolor |
wire line color array. More... | |
vector< Coordinate > | points |
random color array. More... | |
vector< Midpoint > | midpoints |
array of unique coordinates. More... | |
map< unsigned int, pair< unsigned int, unsigned int > > | chunkmap |
array of unique edge midpoints. More... | |
double | radius |
map of chunk offsets and lengths in the drawarray. More... | |
unsigned int | step |
max dimension of the tetras. More... |
Does all the actual work of loading and displaying the tetrahedrons.
Definition at line 54 of file Timestep.h.
|
constructor.
Definition at line 70 of file Timestep.h. References radius. |
|
determine the center of all the tetrahedrons. calculates the center for use as a translation and rotation point. calculates the width of all tetras in x,y,z to set the view. moves all points to new origin center. These two operations are combined in one function to avoid carrying around the otherwise useless max,min, etc variables Definition at line 283 of file Timestep.C. References Midpoint::get_mx, Midpoint::get_my, Midpoint::get_mz, Coordinate::get_x, Coordinate::get_y, Coordinate::get_z, midpoints, points, radius, Midpoint::set_mx, Midpoint::set_my, Midpoint::set_mz, Coordinate::unsafe_set, and vertexarray. |
|
display the tetrahedrons using the cmap color scheme with wireframe. draws the polygons assuming fill, then draw a line poly over it. can interact oddly with non fill mode. cmap must be 0,1,2 Definition at line 343 of file Timestep.C. References chunkcolor, chunkmap, linecolor, pointcolor, randomcolor, and vertexarray. Referenced by draw_polygons. |
|
|
|
|
|
draw all the polygons. do any necessary rotatation and scaling draw all the polygons enact any changes such as opaque, point view, fill, and colormap cycle translate so tet center will be at origin. perform rotation, scale draw move camera for viewability Definition at line 59 of file Timestep.C. References display, radius, showlabels, showlengths, and step. |
|
dump the points.
Definition at line 96 of file Timestep.h. References Coordinate::dump, and points. |
|
yeild up copy of our points.
Definition at line 101 of file Timestep.h. References points. |
|
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 or even just dbg_msh* if you want access to all chunks and timestamps. Tetcolor is a glfloat[3] with the colors of the chunk this file represents. datafile layout is x y z r g b x y z r g b ... x y z r g b foo c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 ... c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 where x y z are double, r g b are float c1-c12 are integers ... means as many lines of the preceding format as you like. x,y,z are the coordinates of the vertex and r,g,b is its color c1-12 are integer indexical references to the preceding vertices counting from 0 Definition at line 176 of file Timestep.C. References chunkcolor, chunkmap, Coordinate::get_b, Coordinate::get_g, Coordinate::get_r, Coordinate::get_x, Coordinate::get_y, Coordinate::get_z, linecolor, midpoints, pointcolor, points, step, and vertexarray. |
|
Definition at line 74 of file Timestep.h. References chunkcolor, linecolor, midpoints, pointcolor, points, radius, randomcolor, and vertexarray. |
|
set the randomvector points to the color values in randompoints.
Definition at line 440 of file Timestep.C. References CoordIterPair, Coordinate::edump, randomcolor, and vertexarray. |
|
show coordinate labels. shows the label "id x, y, z" each point using Outputstring3 on label Definition at line 429 of file Timestep.C. References OutputString3, and points. Referenced by draw_polygons. |
|
show edge lengths at the midpoint of each edge. shows the length of each edge using Outputstring3 on the midpoint length label vector Definition at line 416 of file Timestep.C. References midpoints, and OutputString3. Referenced by draw_polygons. |
|
point color array.
Definition at line 59 of file Timestep.h. |
|
array of unique edge midpoints.
Definition at line 64 of file Timestep.h. |
|
chunk color array r,g,b +i.
Definition at line 60 of file Timestep.h. |
|
array of unique coordinates.
Definition at line 63 of file Timestep.h. Referenced by calc_and_move, loadfile, operator=, and showlengths. |
|
the drawarray.
Definition at line 58 of file Timestep.h. |
|
random color array.
Definition at line 62 of file Timestep.h. Referenced by calc_and_move, dump, get_points, loadfile, operator=, and showlabels. |
|
map of chunk offsets and lengths in the drawarray.
Definition at line 65 of file Timestep.h. Referenced by calc_and_move, draw_polygons, operator=, and Timestep. |
|
wire line color array.
Definition at line 61 of file Timestep.h. Referenced by display, operator=, and set_random_color. |
|
max dimension of the tetras.
Definition at line 66 of file Timestep.h. Referenced by draw_polygons, and loadfile. |
|
Definition at line 57 of file Timestep.h. Referenced by calc_and_move, display, loadfile, operator=, and set_random_color. |