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 
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 
74 
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
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:37
vtkOpenGLContextDevice3D
OpenGL class drawing 3D primitives.
Definition: vtkOpenGLContextDevice3D.h:35
vtkOpenGLContextDevice3D::EnableClippingPlane
void EnableClippingPlane(int i, double *planeEquation)
vtkOpenGLContextDevice3D::PopMatrix
void PopMatrix()
vtkOpenGLContextDevice3D::DrawLines
void DrawLines(const float *verts, int n, const unsigned char *colors, int nc)
vtkgl::m
const GLfloat * m
Definition: vtkgl.h:18169
vtkOpenGLContextDevice3D::ApplyBrush
void ApplyBrush(vtkBrush *brush)
VTKRENDERINGCONTEXTOPENGL_EXPORT
#define VTKRENDERINGCONTEXTOPENGL_EXPORT
Definition: vtkRenderingContextOpenGLModule.h:15
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkContextDevice3D
Abstract class for drawing 3D primitives.
Definition: vtkContextDevice3D.h:41
vtkgl::n
GLclampd n
Definition: vtkgl.h:14370
vtkgl::enable
GLboolean enable
Definition: vtkgl.h:18647
vtkRenderingContextOpenGLModule.h
vtkOpenGLContextDevice3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkOpenGLContextDevice3D::SetMatrix
void SetMatrix(vtkMatrix4x4 *m)
vtkOpenGLContextDevice3D::DrawPoly
void DrawPoly(const float *verts, int n, const unsigned char *colors, int nc)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:39
vtkOpenGLContextDevice3D::DrawPoints
void DrawPoints(const float *verts, int n, const unsigned char *colors, int nc)
vtkOpenGLContextDevice3D::~vtkOpenGLContextDevice3D
~vtkOpenGLContextDevice3D()
vtkContextDevice3D.h
vtkOpenGLContextDevice3D::EnableClipping
void EnableClipping(bool enable)
vtkOpenGLContextDevice3D::DrawTriangleMesh
void DrawTriangleMesh(const float *mesh, int n, const unsigned char *colors, int nc)
vtkNew< vtkBrush >
vtkOpenGLContextDevice3D::ApplyPen
void ApplyPen(vtkPen *pen)
vtkOpenGLContextDevice3D::GetMatrix
void GetMatrix(vtkMatrix4x4 *m)
vtkOpenGLContextDevice3D::DisableDepthBuffer
virtual void DisableDepthBuffer()
vtkNew.h
vtkOpenGLContextDevice3D::New
static vtkOpenGLContextDevice3D * New()
vtkOpenGLContextDevice3D::DisableClippingPlane
void DisableClippingPlane(int i)
vtkOpenGLContextDevice3D::EnableDepthBuffer
virtual void EnableDepthBuffer()
vtkRecti
Definition: vtkRect.h:88
vtkOpenGLContextDevice3D::PushMatrix
void PushMatrix()
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:39
vtkOpenGLContextDevice3D::vtkOpenGLContextDevice3D
vtkOpenGLContextDevice3D()
vtkOpenGLContextDevice3D::MultiplyMatrix
void MultiplyMatrix(vtkMatrix4x4 *m)
vtkOpenGLContextDevice3D::SetClipping
void SetClipping(const vtkRecti &rect)