Files Classes Functions Hierarchy
#include <triangles3Tdisplay.h>
Public Member Functions | |
| triangles3TdisplayNC (uintc visize_, point3< uint > const *vi_, point3< W > const *pts_, point3< W > const *normals_, point3< C > const *colors_) | |
| Pass in the geometry to be displayed. | |
| void | draw () |
| Draw triangles with normals at each point. | |
Public Attributes | |
| point3< W > const * | normals |
| The global normals. | |
| point3< C > const * | colors |
| The global colors. | |
Definition at line 132 of file triangles3Tdisplay.h.
| triangles3TdisplayNC< T, W, C >::triangles3TdisplayNC | ( | uintc | visize_, | |
| point3< uint > const * | vi_, | |||
| point3< W > const * | pts_, | |||
| point3< W > const * | normals_, | |||
| point3< C > const * | colors_ | |||
| ) | [inline] |
Pass in the geometry to be displayed.
Definition at line 144 of file triangles3Tdisplay.h.
00151 : triangles3Tdisplay<T,W>(visize_,vi_,pts_), 00152 normals(normals_), colors(colors_) {}
| void triangles3TdisplayNC< T, W, C >::draw | ( | ) | [inline, virtual] |
Draw triangles with normals at each point.
Reimplemented from triangles3Tdisplay< T, W >.
Definition at line 155 of file triangles3Tdisplay.h.
References triangles3TdisplayNC< T, W, C >::colors, GOBJDEBUGCODE, triangles3TdisplayNC< T, W, C >::normals, point3< T >::x, point3< T >::y, and point3< T >::z.
00156 { 00157 GOBJDEBUGCODE 00158 point3<uint> const * t; 00159 glBegin(GL_TRIANGLES); 00160 for (uint i=0; i<triangles3Tdisplay<T,W>::visize; ++i) 00161 { 00162 t = & triangles3Tdisplay<T,W>::vi[i]; 00163 00164 uintc k0(t->x); 00165 point3<C> const & c0(colors[k0]); 00166 glColor3T<C>()(c0.x,c0.y,c0.z); 00167 point3<W> const & n0( normals[k0] ); 00168 glNormal3T<T>()(n0.x,n0.y,n0.z); 00169 point3<W> const & p0( triangles3Tdisplay<T,W>::pts[k0] ); 00170 glVertex3T<T>()(p0.x,p0.y,p0.z); 00171 00172 uintc k1(t->y); 00173 point3<C> const & c1(colors[k1]); 00174 glColor3T<C>()(c1.x,c1.y,c1.z); 00175 point3<W> const & n1( normals[k1] ); 00176 glNormal3T<T>()(n1.x,n1.y,n1.z); 00177 point3<W> const & p1( triangles3Tdisplay<T,W>::pts[k1] ); 00178 glVertex3T<T>()(p1.x,p1.y,p1.z); 00179 00180 uintc k2(t->z); 00181 point3<C> const & c2(colors[k2]); 00182 glColor3T<C>()(c2.x,c2.y,c2.z); 00183 point3<W> const & n2( normals[k2] ); 00184 glNormal3T<T>()(n2.x,n2.y,n2.z); 00185 point3<W> const & p2( triangles3Tdisplay<T,W>::pts[k2] ); 00186 glVertex3T<T>()(p2.x,p2.y,p2.z); 00187 } 00188 00189 glEnd(); 00190 }
| point3<C> const* triangles3TdisplayNC< T, W, C >::colors |
The global colors.
Definition at line 140 of file triangles3Tdisplay.h.
Referenced by triangles3TdisplayNC< T, W, C >::draw().
| point3<W> const* triangles3TdisplayNC< T, W, C >::normals |
The global normals.
Definition at line 137 of file triangles3Tdisplay.h.
Referenced by triangles3TdisplayNC< T, W, C >::draw().
1.5.8