proj home

Files   Classes   Functions   Hierarchy  

vrmlshapepoint Class Reference

Identify VRML point data. More...

#include <vrmlshapeparse.h>

Inheritance diagram for vrmlshapepoint:
Collaboration diagram for vrmlshapepoint:

List of all members.

Public Member Functions

 vrmlshapepoint ()
 A point token.
void eval (vrmlshapeparse &p) const
 Expecting [ -2.7756e-017 13.047 -2.4339,.


Detailed Description

Identify VRML point data.

Definition at line 264 of file vrmlshapeparse.h.


Constructor & Destructor Documentation

vrmlshapepoint::vrmlshapepoint (  )  [inline]

A point token.

Definition at line 270 of file vrmlshapeparse.h.

00271     : vrmlshapetoken("point") {}


Member Function Documentation

void vrmlshapepoint::eval ( vrmlshapeparse p  )  const [virtual]

Expecting [ -2.7756e-017 13.047 -2.4339,.

. ] in parser scope.

Implements vrmlshapetoken.

Definition at line 289 of file vrmlshapeparse.cpp.

References dbg, vrmlshapeparse::tokenstream, and vrmlshapeparse::vshp.

00290 {
00291   assert(p.vshp.empty()==false);
00292   ++p.tokenstream;
00293   assert(p.tokenstream()=="[");
00294   ++p.tokenstream;
00295   double d;
00296   while((p.tokenstream()!="]") && !p.tokenstream)
00297   {
00298     stringstream s(p.tokenstream());
00299     s >> d;
00300     p.vshp.back().point.push_back(d);
00301 
00302     ++p.tokenstream;
00303   }
00304   ++p.tokenstream;
00305 
00306   assert((p.vshp.back().point.size()%3)==0);
00307 
00308 #ifdef DEBUG_VRMLSHAPEPARSE
00309 dbg() << id << endl;
00310 #endif
00311 }


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

Generated on Fri Mar 4 00:50:24 2011 for Chelton Evans Source by  doxygen 1.5.8