proj home

Files   Classes   Functions   Hierarchy  

vrmlshapeemissiveColor Class Reference

Identify VRML emissiveColor vector. More...

#include <vrmlshapeparse.h>

Inheritance diagram for vrmlshapeemissiveColor:
Collaboration diagram for vrmlshapeemissiveColor:

List of all members.

Public Member Functions

 vrmlshapeemissiveColor ()
 A emissive color token.
void eval (vrmlshapeparse &p) const
 Expecting three real numbers in parser scope.


Detailed Description

Identify VRML emissiveColor vector.

Definition at line 230 of file vrmlshapeparse.h.


Constructor & Destructor Documentation

vrmlshapeemissiveColor::vrmlshapeemissiveColor (  )  [inline]

A emissive color token.

Definition at line 236 of file vrmlshapeparse.h.

00237     : vrmlshapetoken("emissiveColor") {}


Member Function Documentation

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

Expecting three real numbers in parser scope.

Implements vrmlshapetoken.

Definition at line 339 of file vrmlshapeparse.cpp.

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

00342 {
00343   assert(p.vshp.empty()==false);
00344   ++p.tokenstream;
00345   double x;
00346   uintc last(p.vshp.size()-1);
00347   stringstream(p.tokenstream()) >> x;
00348   p.vshp[last].emissiveColor[0] = x;
00349   ++p.tokenstream;
00350   stringstream(p.tokenstream()) >> x;
00351   p.vshp[last].emissiveColor[1] = x;
00352   ++p.tokenstream;
00353   stringstream(p.tokenstream()) >> x;
00354   p.vshp[last].emissiveColor[2] = x;
00355   ++p.tokenstream;
00356 
00357 #ifdef DEBUG_VRMLSHAPEPARSE
00358 dbg() << id << endl;
00359 #endif
00360 }


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