Files Classes Functions Hierarchy
#include <polytopeD2tessdisp01.h>
Public Member Functions | |
| polytopeD2tessdisp01 (VPTS const &pts_, VPOLY const &vi_) | |
| References to a tessellation. | |
| void | eval (gobjContainer &gr) |
| Write the graphics as unprocessed graphics. | |
Public Attributes | |
| VPTS const & | pts |
| Global points. | |
| VPOLY const & | vi |
| Vector of polytopes indexes to the points. | |
| bool | lines |
| bool | multicolored |
| bool | labelpoints |
| bool | labelpolytopes |
| vector< point3< float > > | multicoloredvec |
| vector< point2< float > > | vicenter |
Definition at line 12 of file polytopeD2tessdisp01.h.
| polytopeD2tessdisp01< VPTS, VPOLY >::polytopeD2tessdisp01 | ( | VPTS const & | pts_, | |
| VPOLY const & | vi_ | |||
| ) | [inline] |
| void polytopeD2tessdisp01< VPTS, VPOLY >::eval | ( | gobjContainer & | gr | ) | [inline] |
Write the graphics as unprocessed graphics.
Definition at line 47 of file polytopeD2tessdisp01.h.
References pts, gobjContainer::push(), r, point2< T >::x, and point2< T >::y.
00050 { 00051 random11<double> r; 00052 00053 /* 00054 if (labelpoints) 00055 { 00056 00057 } 00058 */ 00059 uintc imax = vi.size(); 00060 assert(imax>1); 00061 00062 if (multicolored) 00063 { 00064 // Dummy to start index at 1. 00065 multicoloredvec.push_back( point3<float>() ); 00066 for (uint i=1; i<imax; ++i) 00067 { 00068 if (vi[i].isnull()) 00069 { 00070 multicoloredvec.push_back( point3<float>() ); 00071 continue; 00072 } 00073 00074 multicoloredvec.push_back( point3<float>(r(),r(),r()) ); 00075 } 00076 } 00077 00078 if (lines) 00079 { 00080 gr.push( new gobjglEnable(GL_LINE_STIPPLE) ); 00081 gr.push( new gobjglLineStipple(1,0x1C47) ); 00082 00083 uint kmax; 00084 gr.push( new gobjglBegin(GL_LINES) ); 00085 for (uint i=1; i<imax; ++i) 00086 { 00087 if (vi[i].isnull()) 00088 continue; 00089 00090 //gr.push_back( new gobjglLineStipple(1,(GLushort)rand()) ); 00091 00092 if (multicolored) 00093 gr.push( new gobjglColor3f( 00094 multicoloredvec[i].x,multicoloredvec[i].y,multicoloredvec[i].z) ); 00095 00096 kmax = vi[i].pi.size(); 00097 for (uint k=0; k<kmax; ++k) 00098 { 00099 gr.push( new gobjglVertex2f(pts[ vi[i].pi[k]]) ); 00100 gr.push( new gobjglVertex2f(pts[ vi[i].pi[(k+1)%kmax]]) ); 00101 } 00102 } 00103 00104 gr.push( new gobjglEnd() ); 00105 00106 gr.push(new gobjglDisable(GL_LINE_STIPPLE)); 00107 } 00108 00109 if (labelpolytopes) 00110 { 00111 uint kmax; 00112 vicenter.push_back( point2<float>() ); 00113 for (uint i=1; i<imax; ++i) 00114 { 00115 if (vi[i].isnull()) 00116 { 00117 vicenter.push_back( point2<float>() ); 00118 continue; 00119 } 00120 00121 kmax = vi[i].pi.size(); 00122 assert(kmax!=0); 00123 00124 point2<float> c(0.0,0.0); 00125 for (uint k=0; k<kmax; ++k) 00126 { 00127 c.x += pts[vi[i].pi[k]].x; 00128 c.y += pts[vi[i].pi[k]].y; 00129 } 00130 00131 c.x /= (double)kmax; 00132 c.y /= (double)kmax; 00133 00134 vicenter.push_back(c); 00135 } 00136 00137 gr.push(new gobjglColor3f(1.0,0.0,0.0)); 00138 00139 pointsdisplay2D< point2<float> > * dp = 00140 new pointsdisplay2D< point2<float> >(gr,vicenter,false,true); 00141 gr.push(dp); 00142 } 00143 00144 if (labelpoints) 00145 { 00146 gr.push(new gobjglColor3f(0.0,1.0,0.0)); 00147 gr.push( new pointsdisplay2D< point2<double> >(gr,pts,false,true)); 00148 } 00149 00150 }
| bool polytopeD2tessdisp01< VPTS, VPOLY >::labelpoints |
Definition at line 31 of file polytopeD2tessdisp01.h.
| bool polytopeD2tessdisp01< VPTS, VPOLY >::labelpolytopes |
Definition at line 32 of file polytopeD2tessdisp01.h.
| bool polytopeD2tessdisp01< VPTS, VPOLY >::lines |
Definition at line 29 of file polytopeD2tessdisp01.h.
| bool polytopeD2tessdisp01< VPTS, VPOLY >::multicolored |
Definition at line 30 of file polytopeD2tessdisp01.h.
| vector< point3<float> > polytopeD2tessdisp01< VPTS, VPOLY >::multicoloredvec |
Definition at line 37 of file polytopeD2tessdisp01.h.
| VPTS const& polytopeD2tessdisp01< VPTS, VPOLY >::pts |
| VPOLY const& polytopeD2tessdisp01< VPTS, VPOLY >::vi |
| vector< point2<float> > polytopeD2tessdisp01< VPTS, VPOLY >::vicenter |
Definition at line 38 of file polytopeD2tessdisp01.h.
1.5.8