Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkSurfaceRendererUseVBO.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkSurfaceRendererUseVBO_h
00012 #define __mitkSurfaceRendererUseVBO_h
00013 
00014 #include "mitkSurfaceRenderer.h"
00015 
00016 class mitkSurfaceProperty;
00017 class mitkMesh;
00018 
00023 class MITK_VISUALIZATION_API mitkSurfaceRendererUseVBO : public mitkSurfaceRenderer
00024 {
00025 public:
00026     MITK_TYPE(mitkSurfaceRendererUseVBO, mitkSurfaceRenderer)
00027 
00028     virtual void PrintSelf(ostream &os);
00029 
00030     mitkSurfaceRendererUseVBO();
00031     
00032     // WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
00033     // DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS
00034     // Render the surface
00035     virtual int Render(mitkScene *scene, mitkSurfaceModel *surf);
00036 
00037 protected:
00038     virtual ~mitkSurfaceRendererUseVBO();
00039 
00040     void _setMaterial(mitkSurfaceProperty *prop);
00041     bool _buildVBOs(mitkMesh *mesh);
00042     bool _buildArrays(mitkMesh *mesh);
00043     void _clearArrays();
00044 
00045     GLuint m_VertVBO;
00046     GLuint m_FaceVBO;
00047     GLuint m_EdgeVBO;
00048     float *m_Vertices;
00049     unsigned int *m_Faces;
00050     unsigned int *m_Edges;
00051     unsigned long m_VertNum;
00052     unsigned long m_FaceNum;
00053     unsigned long m_EdgeNum;
00054     bool m_IsVBOSupported;
00055     bool m_VBOBuilt;
00056     bool m_NormalReversed;
00057 
00058 private:
00059     mitkSurfaceRendererUseVBO(const mitkSurfaceRendererUseVBO&);
00060     void operator = (const mitkSurfaceRendererUseVBO&);
00061 
00062 };
00063 
00064 
00065 //#define DEFINED_mitkSurfaceRendererUseVBO
00066 
00067 
00068 
00069 #endif
00070 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3