proj home

Files   Classes   Functions   Hierarchy  

gobjglBegin Class Reference

#include <gobj.h>

Inheritance diagram for gobjglBegin:
Collaboration diagram for gobjglBegin:

List of all members.

Public Member Functions

 gobjglBegin (GLenum mode_)
 gobjglBegin (stringc &arg)
 Construct from string.
boolc serializeInverse (stringc &arg)
 Construct from string.
void draw ()
 Draw the object.

Public Attributes

GLenum mode


Detailed Description

Definition at line 296 of file gobj.h.


Constructor & Destructor Documentation

gobjglBegin::gobjglBegin ( GLenum  mode_  )  [inline]

Definition at line 302 of file gobj.h.

00303     : mode(mode_) {}

gobjglBegin::gobjglBegin ( stringc arg  ) 

Construct from string.

Definition at line 366 of file gobj.cpp.

References asserteval, and serializeInverse().

00367 {  
00368   asserteval(serializeInverse(arg));
00369 }


Member Function Documentation

void gobjglBegin::draw (  )  [inline, virtual]

Draw the object.

Implements gobj.

Definition at line 309 of file gobj.h.

References GOBJDEBUGCODE, and mode.

00310     { GOBJDEBUGCODE glBegin(mode); }

boolc gobjglBegin::serializeInverse ( stringc arg  ) 

Construct from string.

Definition at line 296 of file gobj.cpp.

References mode.

Referenced by gobjglBegin().

00297 {
00298   string s1(arg);
00299   spacertrim<>()(s1);
00300 
00301   if (s1=="GL_POINTS")
00302   {
00303     mode = GL_POINTS;
00304     return true;
00305   }
00306 
00307   if (s1=="GL_LINES")
00308   {
00309     mode = GL_LINES;
00310     return true;
00311   }
00312 
00313   if (s1=="GL_LINE_STRIP")
00314   {
00315     mode = GL_LINE_STRIP;
00316     return true;
00317   }
00318 
00319   if (s1=="GL_LINE_LOOP")
00320   {
00321     mode = GL_LINE_LOOP;
00322     return true;
00323   }
00324 
00325   if (s1=="GL_TRIANGLES")
00326   {
00327     mode = GL_TRIANGLES;
00328     return true;
00329   }
00330 
00331   if (s1=="GL_TRIANGLE_STRIP")
00332   {
00333     mode = GL_TRIANGLE_STRIP;
00334     return true;
00335   }
00336 
00337   if (s1=="GL_TRIANGLE_FAN")
00338   {
00339     mode = GL_TRIANGLE_FAN;
00340     return true;
00341   }
00342   if (s1=="GL_QUADS")
00343   {
00344     mode = GL_QUADS;
00345     return true;
00346   }
00347 
00348   if (s1=="GL_QUAD_STRIP")
00349   {
00350     mode = GL_QUAD_STRIP;
00351     return true;
00352   }
00353 
00354   if (s1=="GL_POLYGON")
00355   {
00356     mode = GL_POLYGON;
00357     return true;
00358   }
00359 
00360   cout << "error: gobjglBegin(" << arg << ");" << endl; 
00361   assert(false); 
00362 
00363   return false;
00364 }


Member Data Documentation

Definition at line 300 of file gobj.h.

Referenced by draw(), and serializeInverse().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:49:58 2011 for Chelton Evans Source by  doxygen 1.5.8