Changeset 5685
- Timestamp:
- Aug 26, 2008, 11:05:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anugavis/src/height_quantity.cc
r5684 r5685 57 57 throw nc_strerror(ncstatus); 58 58 } 59 59 #include "output.hh" 60 #include <sstream> 61 using std::ostringstream; 60 62 void HeightQuantity::compile(int frame){ 61 63 size_t start_1[1] = {0}; … … 78 80 glNewList(this->display_list, GL_COMPILE); 79 81 glBegin(GL_TRIANGLES);{ 80 for(int volume = 0 ; volume =this->sww_file->number_of_volumes ; ++volume){82 for(int volume = 0 ; volume < this->sww_file->number_of_volumes ; ++volume){ 81 83 /* Compute normal. */ 82 84 Vector vs[3]; … … 84 86 int offset = volume * this->sww_file->number_of_vertices + vertex; 85 87 vertIndex = this->sww_file->volumes[offset]; 88 vertIndex = 0; 86 89 vs[vertex] = Vector(this->sww_file->x[vertIndex], 87 this->sww_file->y[vertIndex],88 this->points [vertIndex]);90 this->sww_file->y[vertIndex], 91 this->points [vertIndex]); 89 92 } 90 93 Vector normal = (vs[1] - vs[0]).cross(vs[2] - vs[0]); … … 94 97 /* Insert vertices. */ 95 98 for(int vertex = 0 ; vertex < 3 ; ++vertex){ 96 vertIndex = this->sww_file->volumes[volume * 97 this->sww_file->number_of_vertices + 98 vertex]; 99 int offset = volume * this->sww_file->number_of_vertices + vertex; 100 vertIndex = this->sww_file->volumes[offset]; 99 101 glVertex3f(this->sww_file->x[vertIndex], 100 102 this->sww_file->y[vertIndex], 101 103 this->points[vertIndex]); 104 102 105 } 103 106 }
Note: See TracChangeset
for help on using the changeset viewer.