void AddSFColor(float color[3]) { switch (GetCurrentNodeType()) { case VRML_NODETYPE_COLOR: { ((ColorNode *)GetCurrentNodeObject())->addColor(color); } break; case VRML_NODETYPE_BACKGROUND_GROUNDCOLOR: { BackgroundNode *bg = (BackgroundNode *)GetCurrentNodeObject(); bg->addGroundColor(color); } break; case VRML_NODETYPE_BACKGROUND_SKYCOLOR: { BackgroundNode *bg = (BackgroundNode *)GetCurrentNodeObject(); bg->addSkyColor(color); } break; case VRML_NODETYPE_INTERPOLATOR_KEYVALUE: switch (GetPrevNodeType()) { case VRML_NODETYPE_COLORINTERPOLATOR: { ColorInterpolatorNode *colorInterp = (ColorInterpolatorNode *)GetCurrentNodeObject(); colorInterp->addKeyValue(color); } break; } break; } }
void CyberX3D::AddSFColor(float color[3]) { switch (ParserGetCurrentNodeType()) { case VRML97_COLOR: { ((ColorNode *)ParserGetCurrentNode())->addColor(color); } break; case VRML97_BACKGROUND_GROUNDCOLOR: { BackgroundNode *bg = (BackgroundNode *)ParserGetCurrentNode(); bg->addGroundColor(color); } break; case VRML97_BACKGROUND_SKYCOLOR: { BackgroundNode *bg = (BackgroundNode *)ParserGetCurrentNode(); bg->addSkyColor(color); } break; case VRML97_INTERPOLATOR_KEYVALUE: switch (ParserGetParentNodeType()) { case VRML97_COLORINTERPOLATOR: { ColorInterpolatorNode *colorInterp = (ColorInterpolatorNode *)ParserGetCurrentNode(); colorInterp->addKeyValue(color); } break; } break; } }