#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
+
+#ifndef ITK_MANUAL_INSTANTIATION
#include <cpExtensions/Visualization/OpenGLMeshMapper.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
#endif // __CPEXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__