#include <GlDrawWandFunctors.h>
Inheritance diagram for vrj::GlDrawRightAngleWandFunctor:


Public Methods | |
| virtual void | contextInit () |
| Called to initialize any context specific information. More... | |
| virtual void | draw () |
| Callback function for drawing. More... | |
Definition at line 84 of file GlDrawWandFunctors.h.
|
|
Called to initialize any context specific information.
Implements vrj::GlDrawObjectFunctor. Definition at line 88 of file GlDrawWandFunctors.h.
00089 {;}
|
|
|
Callback function for drawing. Called when the object should be drawn.
Implements vrj::GlDrawObjectFunctor. Definition at line 95 of file GlDrawWandFunctors.h.
00096 {
00097 static GLfloat VertexData[] = {
00098 0.0140000f, -0.140000f, 0.0140000f, 0.0140000f, 0.028000f, 0.0140000f, -0.0140000f, 0.028000f, 0.0140000f,
00099 -0.0140000f, -0.140000f, 0.0140000f, 0.0140000f, -0.140000f, -0.0140000f,
00100 0.0140000f, 0.00000f, -0.0140000f, 0.0140000f, 0.028000f, 0.0140000f,
00101 0.0140000f, -0.140000f, 0.0140000f, -0.0140000f, -0.140000f, -0.0140000f,
00102 -0.0140000f, 0.00000f, -0.0140000f, 0.0140000f, 0.00000f, -0.0140000f,
00103 0.0140000f, -0.140000f, -0.0140000f, -0.0140000f, -0.140000f, 0.0140000f,
00104 -0.0140000f, 0.028000f, 0.0140000f, -0.0140000f, 0.00000f, -0.0140000f,
00105 -0.0140000f, -0.140000f, -0.0140000f, -0.0140000f, -0.140000f, -0.0140000f,
00106 0.0140000f, -0.140000f, -0.0140000f, 0.0140000f, -0.140000f, 0.0140000f,
00107 -0.0140000f, -0.140000f, 0.0140000f, -0.0140000f, 0.028000f, 0.0140000f,
00108 0.0140000f, 0.028000f, 0.0140000f, 0.028000f, 0.056000f, -0.042000f,
00109 -0.028000f, 0.056000f, -0.042000f, 0.028000f, 0.042000f, -0.042000f,
00110 -0.028000f, 0.042000f, -0.042000f, -0.028000f, 0.056000f, -0.042000f,
00111 0.028000f, 0.056000f, -0.042000f, 0.0140000f, 0.028000f, 0.0140000f,
00112 0.0140000f, 0.00000f, -0.0140000f, 0.028000f, 0.042000f, -0.042000f,
00113 0.0140000f, 0.028000f, 0.0140000f, 0.028000f, 0.042000f, -0.042000f,
00114 0.028000f, 0.056000f, -0.042000f, -0.0140000f, 0.028000f, 0.0140000f,
00115 -0.028000f, 0.056000f, -0.042000f, -0.028000f, 0.042000f, -0.042000f,
00116 -0.028000f, 0.042000f, -0.042000f, -0.0140000f, 0.00000f, -0.0140000f,
00117 -0.0140000f, 0.028000f, 0.0140000f, 0.028000f, 0.042000f, -0.042000f,
00118 0.0140000f, 0.00000f, -0.0140000f, -0.0140000f, 0.00000f, -0.0140000f,
00119 -0.028000f, 0.042000f, -0.042000f
00120 };
00121 static GLint Indices[] = {
00122 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8,
00123 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21,
00124 22, 20, 22, 23, 24, 25, 26, 24, 26, 27, 28, 29, 30, 31, 32, 33,
00125 34, 35, 36, 37, 38, 39, 40, 41, 42, 40, 42, 43
00126 };
00127
00128 glEnableClientState(GL_VERTEX_ARRAY);
00129 glVertexPointer(3, GL_FLOAT, 0, VertexData);
00130
00131 glColor3f(0.00000f, 1.00000f, 0.00000f);
00132 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[0]);
00133 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[3]);
00134 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[6]);
00135 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[9]);
00136 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[12]);
00137 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[15]);
00138 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[18]);
00139 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[21]);
00140 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[24]);
00141 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[27]);
00142 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[30]);
00143 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[33]);
00144 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[36]);
00145 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[39]);
00146 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[42]);
00147 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[45]);
00148 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[48]);
00149 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[51]);
00150 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[54]);
00151 glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[57]);
00152 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002