VTK
vtkOpenGLContextDevice3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLContextDevice3D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
24 #ifndef vtkOpenGLContextDevice3D_h
25 #define vtkOpenGLContextDevice3D_h
26 
27 #include "vtkRenderingContextOpenGLModule.h" // For export macro
28 #include "vtkContextDevice3D.h"
29 #include "vtkNew.h" // For ivars.
30 
31 class vtkBrush;
32 class vtkPen;
33 
35 {
36 public:
38  void PrintSelf(ostream &os, vtkIndent indent);
39 
40  static vtkOpenGLContextDevice3D * New();
41 
43  void DrawPoly(const float *verts, int n, const unsigned char *colors, int nc);
44 
46  void DrawLines(const float *verts, int n, const unsigned char *colors, int nc);
47 
49 
50  void DrawPoints(const float *verts, int n,
51  const unsigned char *colors, int nc);
53 
55 
56  void DrawTriangleMesh(const float *mesh, int n,
57  const unsigned char *colors, int nc);
59 
64  void ApplyPen(vtkPen *pen);
65 
70  void ApplyBrush(vtkBrush *brush);
71 
73  void SetMatrix(vtkMatrix4x4 *m);
74 
76  void GetMatrix(vtkMatrix4x4 *m);
77 
80 
82  void PushMatrix();
83 
85  void PopMatrix();
86 
89  void SetClipping(const vtkRecti &rect);
90 
92  void EnableClipping(bool enable);
93 
95 
100  void EnableClippingPlane(int i, double *planeEquation);
101  void DisableClippingPlane(int i);
103 
104 protected:
107 
109  virtual void EnableDepthBuffer();
110 
112  virtual void DisableDepthBuffer();
113 
114 private:
115  vtkOpenGLContextDevice3D(const vtkOpenGLContextDevice3D &); // Not implemented.
116  void operator=(const vtkOpenGLContextDevice3D &); // Not implemented.
117 
119 
120  class Private;
121  Private *Storage;
123 
124  vtkNew<vtkBrush> Brush;
125  vtkNew<vtkPen> Pen;
126 };
127 
128 #endif
virtual void MultiplyMatrix(vtkMatrix4x4 *m)=0
virtual void DrawTriangleMesh(const float *mesh, int n, const unsigned char *colors, int nc)=0
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:38
Abstract class for drawing 3D primitives.
virtual void DisableClippingPlane(int i)=0
static vtkContextDevice3D * New()
virtual void ApplyPen(vtkPen *pen)=0
#define VTKRENDERINGCONTEXTOPENGL_EXPORT
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:36
virtual void SetMatrix(vtkMatrix4x4 *m)=0
virtual void DrawPoints(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void DrawLines(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
virtual void EnableClipping(bool enable)=0
virtual void SetClipping(const vtkRecti &rect)=0
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:38
virtual void PopMatrix()=0
virtual void ApplyBrush(vtkBrush *brush)=0
OpenGL class drawing 3D primitives.
virtual void PushMatrix()=0
virtual void GetMatrix(vtkMatrix4x4 *m)=0
virtual void DrawPoly(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
virtual void EnableClippingPlane(int i, double *planeEquation)=0