proj home

Files   Classes   Functions   Hierarchy  

vrmlshapediffuseColor Class Reference

Identify VRML diffuseColor vector. More...

#include <vrmlshapeparse.h>

Inheritance diagram for vrmlshapediffuseColor:
Collaboration diagram for vrmlshapediffuseColor:

List of all members.

Public Member Functions

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


Detailed Description

Identify VRML diffuseColor vector.

Definition at line 213 of file vrmlshapeparse.h.


Constructor & Destructor Documentation

vrmlshapediffuseColor::vrmlshapediffuseColor (  )  [inline]

A diffuse color token.

Definition at line 219 of file vrmlshapeparse.h.

00220     : vrmlshapetoken("diffuseColor") {}


Member Function Documentation

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 }


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