Files Classes Functions Hierarchy
#include <vrmlshapeparse.h>
Public Member Functions | |
| vrmlshapediffuseColor () | |
| A diffuse color token. | |
| void | eval (vrmlshapeparse &p) const |
| Expecting three real numbers in parser scope. | |
Definition at line 213 of file vrmlshapeparse.h.
| vrmlshapediffuseColor::vrmlshapediffuseColor | ( | ) | [inline] |
A diffuse color token.
Definition at line 219 of file vrmlshapeparse.h.
00220 : vrmlshapetoken("diffuseColor") {}
| void vrmlshapediffuseColor::eval | ( | vrmlshapeparse & | p | ) | const [virtual] |
Expecting three real numbers in parser scope.
Implements vrmlshapetoken.
Definition at line 316 of file vrmlshapeparse.cpp.
References dbg, vrmlshapeparse::tokenstream, and vrmlshapeparse::vshp.
00319 { 00320 assert(p.vshp.empty()==false); 00321 ++p.tokenstream; 00322 double x; 00323 stringstream(p.tokenstream()) >> x; 00324 p.vshp.back().diffuseColor[0] = x; 00325 ++p.tokenstream; 00326 stringstream(p.tokenstream()) >> x; 00327 p.vshp.back().diffuseColor[1] = x; 00328 ++p.tokenstream; 00329 stringstream(p.tokenstream()) >> x; 00330 p.vshp.back().diffuseColor[2] = x; 00331 ++p.tokenstream; 00332 00333 #ifdef DEBUG_VRMLSHAPEPARSE 00334 dbg() << id << endl; 00335 #endif 00336 }
1.5.8