Files Classes Functions Hierarchy
#include <triangles3Tdisplay.h>
Public Member Functions | |
| triangles3TdisplayNCpertriangle (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 201 of file triangles3Tdisplay.h.
| triangles3TdisplayNCpertriangle< T, W, C >::triangles3TdisplayNCpertriangle | ( | 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 214 of file triangles3Tdisplay.h.
00221 : triangles3Tdisplay<T,W>(visize_,vi_,pts_), 00222 normals(normals_), colors(colors_) {}
| void triangles3TdisplayNCpertriangle< T, W, C >::draw | ( | ) | [inline, virtual] |
Draw triangles with normals at each point.
Reimplemented from triangles3Tdisplay< T, W >.
Definition at line 225 of file triangles3Tdisplay.h.
References triangles3TdisplayNCpertriangle< T, W, C >::colors, GOBJDEBUGCODE, triangles3TdisplayNCpertriangle< T, W, C >::normals, point3< T >::x, point3< T >::y, and point3< T >::z.
00226 { 00227 GOBJDEBUGCODE 00228 point3<uint> const * t; 00229 glBegin(GL_TRIANGLES); 00230 for (uint i=0; i<triangles3Tdisplay<T,W>::visize; ++i) 00231 { 00232 point3<C> const & c0(colors[i]); 00233 glColor3T<C>()(c0.x,c0.y,c0.z); 00234 00235 t = & triangles3Tdisplay<T,W>::vi[i]; 00236 00237 uintc k0(t->x); 00238 point3<W> const & n0( normals[k0] ); 00239 glNormal3T<T>()(n0.x,n0.y,n0.z); 00240 point3<W> const & p0( triangles3Tdisplay<T,W>::pts[k0] ); 00241 glVertex3T<T>()(p0.x,p0.y,p0.z); 00242 00243 uintc k1(t->y); 00244 point3<W> const & n1( normals[k1] ); 00245 glNormal3T<T>()(n1.x,n1.y,n1.z); 00246 point3<W> const & p1( triangles3Tdisplay<T,W>::pts[k1] ); 00247 glVertex3T<T>()(p1.x,p1.y,p1.z); 00248 00249 uintc k2(t->z); 00250 point3<W> const & n2( normals[k2] ); 00251 glNormal3T<T>()(n2.x,n2.y,n2.z); 00252 point3<W> const & p2( triangles3Tdisplay<T,W>::pts[k2] ); 00253 glVertex3T<T>()(p2.x,p2.y,p2.z); 00254 } 00255 00256 glEnd(); 00257 }
| point3<C> const* triangles3TdisplayNCpertriangle< T, W, C >::colors |
The global colors.
Definition at line 210 of file triangles3Tdisplay.h.
Referenced by triangles3TdisplayNCpertriangle< T, W, C >::draw().
| point3<W> const* triangles3TdisplayNCpertriangle< T, W, C >::normals |
The global normals.
Definition at line 207 of file triangles3Tdisplay.h.
Referenced by triangles3TdisplayNCpertriangle< T, W, C >::draw().
1.5.8