Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GLRendererGLShapeVisitor.cpp

Go to the documentation of this file.
00001 #include "GLRendererGLShapeVisitor.h"
00002 #include "GLAppearance.h"
00003 #include "GLFillProperties.h"
00004 #include "GLLineProperties.h"
00005 #include "GLMaterial.h"
00006 #include "GLShape.h"
00007 
00008 using namespace X3DTK;
00009 
00010 GLRendererGLShapeVisitor::GLRendererGLShapeVisitor()
00011 : GLShapeVisitor()
00012 {
00013   // Enter functions.
00014   defineNewEnterFunction<GLRendererGLShapeVisitor, GLAppearance>(&GLRendererGLShapeVisitor::enterGLAppearance);
00015   defineNewEnterFunction<GLRendererGLShapeVisitor, GLFillProperties>(&GLRendererGLShapeVisitor::enterGLFillProperties);
00016   defineNewEnterFunction<GLRendererGLShapeVisitor, GLLineProperties>(&GLRendererGLShapeVisitor::enterGLLineProperties);
00017   defineNewEnterFunction<GLRendererGLShapeVisitor, GLMaterial>(&GLRendererGLShapeVisitor::enterGLMaterial);
00018   defineNewEnterFunction<GLRendererGLShapeVisitor, GLShape>(&GLRendererGLShapeVisitor::enterGLShape);
00019 
00020 
00021   // GlobalVariables assignation.
00022   globalVariables = GVManager::getInstanceOf<GLRendererGlobalVariables>();
00023 }
00024 
00025 GLRendererGLShapeVisitor::~GLRendererGLShapeVisitor()
00026 {
00027 }
00028 
00029 void GLRendererGLShapeVisitor::enterGLAppearance(GLAppearance *G) const
00030 {
00031 }
00032 
00033 void GLRendererGLShapeVisitor::enterGLFillProperties(GLFillProperties *G) const
00034 {
00035 }
00036 
00037 void GLRendererGLShapeVisitor::enterGLLineProperties(GLLineProperties *G) const
00038 {
00039 }
00040 
00041 void GLRendererGLShapeVisitor::enterGLMaterial(GLMaterial *G) const
00042 {
00043   glMaterialfv(GL_FRONT, GL_DIFFUSE, &G->getDiffuseColor().front());
00044   glMaterialfv(GL_FRONT, GL_AMBIENT, &G->getAmbientColor().front());
00045   glMaterialfv(GL_FRONT, GL_EMISSION, &G->getEmissiveColor().front());
00046   glMaterialfv(GL_FRONT, GL_SHININESS, &G->getShininess()); 
00047   glMaterialfv(GL_FRONT, GL_SPECULAR, &G->getSpecularColor().front());
00048 }
00049 
00050 void GLRendererGLShapeVisitor::enterGLShape(GLShape *G) const
00051 {
00052 }
00053 

Generated on Wed May 14 10:03:09 2003 for X3DToolKit by doxygen1.3