rtcMeshSet3DNode.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008
00003  * Robert Bosch LLC
00004  * Research and Technology Center North America
00005  * Palo Alto, California
00006  *
00007  * All rights reserved.
00008  *
00009  *------------------------------------------------------------------------------
00010  * project ....: PUMA: Probablistic Unsupervised Model Acquisition
00011  * file .......: MeshSet3DNode.h
00012  * authors ....: Benjamin Pitzer
00013  * organization: Robert Bosch LLC
00014  * creation ...: 09/04/2008
00015  * modified ...: $Date: 2009-09-10 13:26:19 -0700 (Thu, 10 Sep 2009) $
00016  * changed by .: $Author: benjaminpitzer $
00017  * revision ...: $Revision: 915 $
00018  */
00019 #ifndef MESHSET3DNODE_H
00020 #define MESHSET3DNODE_H
00021 
00022 //== INCLUDES ==================================================================
00023 #define GL_GLEXT_PROTOTYPES
00024 #include <GL/gl.h>
00025 #include <GL/glu.h>
00026 #include "rtc/rtcMeshSet3D.h"
00027 #include "rtc/rtcRenderNode.h"
00028 #include "rtc/rtcArray1.h"
00029 
00030 
00031 //== NAMESPACES ================================================================
00032 namespace rtc {
00033 class Mesh3DNode;
00034 class MeshSet3DNode : public RenderNode {
00035 public:
00036   // default constructor
00037   MeshSet3DNode(Renderer* renderer, MeshSet3D* meshset);
00038   MeshSet3DNode(Renderer* renderer, const char* filename);
00039   // destructor
00040   virtual ~MeshSet3DNode();
00041   // initialize rendering
00042   virtual void initialize(MeshSet3D* meshset);
00043   virtual void initialize(const char* filename);
00044   // rebuild node
00045   virtual void rebuild(MeshSet3D* meshset);
00046   virtual void rebuild(const char* filename);
00047   void setupColorTable();
00048   void loadToGPU();
00049   void unloadGPU();
00050 
00051   // clear rendering
00052   virtual void clear();
00053   // rendering call
00054   virtual void render();
00055   // prerendering call
00056   virtual void preRender();
00057   // postrendering call
00058   virtual void postRender();
00059   // display faces
00060   virtual void displayFaces(bool b);
00061   // display vertices
00062   virtual void displayVertices(bool b);
00063   // display wireframe
00064   virtual void displayWireframe(bool b);
00065   // use vertex color
00066   virtual void setColorMode(Parameters::ColorMode b);
00067   // draws n-th mesh in a highlite color
00068   virtual void highliteMesh(int n);
00069   // get the n-th child
00070   virtual Mesh3DNode* getChild(int n);
00071   std::vector<Mesh3DNode*> nodes;
00072   Array1< Vec4<float> > ref_colors;
00073 };
00074 
00075 //==============================================================================
00076 } // NAMESPACE puma
00077 //==============================================================================
00078 #endif // MESHSET3DNODE_H defined
00079 //==============================================================================
00080 


rtc
Author(s): Benjamin Pitzer
autogenerated on Thu Jan 2 2014 11:04:53