]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/OpenGLMeshMapper.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / OpenGLMeshMapper.h
index 6a959e39329c4b2ef97004af70f67530889fd194..02ffeac9d9fc24216c2b83b6933a95b84772fad3 100644 (file)
@@ -6,69 +6,69 @@
 #include <cpExtensions/Visualization/MeshMapper.h>
 
 namespace cpExtensions
+{
+  namespace Visualization
   {
-    namespace Visualization
+    /**
+     */
+    template< class M >
+    class OpenGLMeshMapper
+      : public MeshMapper< M >
     {
-      /**
-       */
-      template< class M >
-      class OpenGLMeshMapper
-        : public MeshMapper< M >
-      {
-      public:
-        typedef OpenGLMeshMapper Self;
-        vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > );
-
-        typedef typename Superclass::TMesh   TMesh;
-        typedef typename Superclass::TPoint  TPoint;
-        typedef typename Superclass::TVector TVector;
-        typedef typename Superclass::TScalar TScalar;
-
-      protected:
-        typedef unsigned int                            TIndex;
-        typedef typename M::CellType                    TCell;
-        typedef typename M::CellsContainer              TCellsContainer;
-        typedef typename TCellsContainer::ConstIterator TCellIt;
-
-      public:
-        virtual const char* GetNameOfClass( ) const
-          { return( "cpExtensions::OpenGLMeshMapper" ); }
-        static Self* New( );
-
-        virtual void RenderPiece( vtkRenderer* aren, vtkActor* act );
-        virtual void ReleaseGraphicsResources( vtkWindow* win );
-        virtual int Draw( vtkRenderer* aren, vtkActor* act );
-
-      protected:
-        OpenGLMeshMapper( );
-        virtual ~OpenGLMeshMapper( );
-
-        bool _ConfigureOpenGL( );
-
-      private:
-        // Purposely not implemented
-        OpenGLMeshMapper( const Self& other );
-        Self& operator=( const Self& other );
-
-      protected:
-        vtkIdType TotalCells;
-        // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture;
-
-        bool FirstRendering;
-
-        bool VBOSupported;
-        unsigned int VBOID1, VBOID2;
-
-        std::vector< unsigned int > Sizes;
-        std::vector< TIndex > Indices;
-        long IndexElementType;
-        long ElementValueType;
-      };
-
-    } // ecapseman
+    public:
+      typedef OpenGLMeshMapper Self;
+      vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > );
+
+      typedef typename Superclass::TMesh   TMesh;
+      typedef typename Superclass::TPoint  TPoint;
+      typedef typename Superclass::TVector TVector;
+      typedef typename Superclass::TScalar TScalar;
+
+    protected:
+      typedef unsigned int                            TIndex;
+      typedef typename M::CellType                    TCell;
+      typedef typename M::CellsContainer              TCellsContainer;
+      typedef typename TCellsContainer::ConstIterator TCellIt;
+
+    public:
+      virtual const char* GetNameOfClass( ) const
+        { return( "cpExtensions::OpenGLMeshMapper" ); }
+      static Self* New( );
+
+      virtual void RenderPiece( vtkRenderer* aren, vtkActor* act );
+      virtual void ReleaseGraphicsResources( vtkWindow* win );
+      virtual int Draw( vtkRenderer* aren, vtkActor* act );
+
+    protected:
+      OpenGLMeshMapper( );
+      virtual ~OpenGLMeshMapper( );
+
+      bool _ConfigureOpenGL( );
+
+    private:
+      // Purposely not implemented
+      OpenGLMeshMapper( const Self& other );
+      Self& operator=( const Self& other );
+
+    protected:
+      vtkIdType TotalCells;
+      // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture;
+
+      bool FirstRendering;
+
+      bool VBOSupported;
+      unsigned int VBOID1, VBOID2;
+
+      std::vector< unsigned int > Sizes;
+      std::vector< TIndex > Indices;
+      long IndexElementType;
+      long ElementValueType;
+    };
 
   } // ecapseman
 
+} // ecapseman
+
 #include <cpExtensions/Visualization/OpenGLMeshMapper.hxx>
 
 #endif // __CPEXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__