VTK
dox/Rendering/Context2D/vtkOpenGLContextDevice3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkOpenGLContextDevice3D.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00024 #ifndef __vtkOpenGLContextDevice3D_h
00025 #define __vtkOpenGLContextDevice3D_h
00026 
00027 #include "vtkRenderingContext2DModule.h" // For export macro
00028 #include "vtkContextDevice3D.h"
00029 #include "vtkNew.h"             // For ivars.
00030 
00031 class vtkBrush;
00032 class vtkPen;
00033 
00034 class VTKRENDERINGCONTEXT2D_EXPORT vtkOpenGLContextDevice3D : public vtkContextDevice3D
00035 {
00036 public:
00037   vtkTypeMacro(vtkOpenGLContextDevice3D, vtkContextDevice3D);
00038   void PrintSelf(ostream &os, vtkIndent indent);
00039 
00040   static vtkOpenGLContextDevice3D * New();
00041 
00043   void DrawPoly(const float *verts, int n, const unsigned char *colors, int nc);
00044 
00046 
00047   void DrawPoints(const float *verts, int n,
00048                   const unsigned char *colors, int nc);
00050 
00052 
00053   void DrawTriangleMesh(const float *mesh, int n,
00054                         const unsigned char *colors, int nc);
00056 
00061   void ApplyPen(vtkPen *pen);
00062 
00067   void ApplyBrush(vtkBrush *brush);
00068 
00070   void SetMatrix(vtkMatrix4x4 *m);
00071 
00073   void GetMatrix(vtkMatrix4x4 *m);
00074 
00076   void MultiplyMatrix(vtkMatrix4x4 *m);
00077 
00079   void PushMatrix();
00080 
00082   void PopMatrix();
00083 
00086   void SetClipping(const vtkRecti &rect);
00087 
00089   void EnableClipping(bool enable);
00090 
00092 
00097   void EnableClippingPlane(int i, double *planeEquation);
00098   void DisableClippingPlane(int i);
00100 
00101 protected:
00102   vtkOpenGLContextDevice3D();
00103   ~vtkOpenGLContextDevice3D();
00104 
00106   virtual void EnableDepthBuffer();
00107 
00109   virtual void DisableDepthBuffer();
00110 
00111 private:
00112   vtkOpenGLContextDevice3D(const vtkOpenGLContextDevice3D &); // Not implemented.
00113   void operator=(const vtkOpenGLContextDevice3D &);   // Not implemented.
00114 
00116 
00117   class Private;
00118   Private *Storage;
00120 
00121   vtkNew<vtkBrush> Brush;
00122   vtkNew<vtkPen>   Pen;
00123 };
00124 
00125 #endif