Files Classes Functions Hierarchy
#include <vrmlshapeparse.h>
Public Member Functions | |
| vrmlshapepoint () | |
| A point token. | |
| void | eval (vrmlshapeparse &p) const |
| Expecting [ -2.7756e-017 13.047 -2.4339,. | |
Definition at line 264 of file vrmlshapeparse.h.
| vrmlshapepoint::vrmlshapepoint | ( | ) | [inline] |
| 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 }
1.5.8