VTK  9.2.6
vtkContextDevice3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContextDevice3D.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 
28 #ifndef vtkContextDevice3D_h
29 #define vtkContextDevice3D_h
30 
31 #include "vtkObject.h"
32 #include "vtkRect.h" // For the rectangles..
33 #include "vtkRenderingContext2DModule.h" // For export macro
34 #include "vtkVector.h" // For the vector coordinates.
35 
36 class vtkMatrix4x4;
37 class vtkViewport;
38 class vtkPen;
39 class vtkBrush;
40 
41 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextDevice3D : public vtkObject
42 {
43 public:
44  vtkTypeMacro(vtkContextDevice3D, vtkObject);
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
47  static vtkContextDevice3D* New();
48 
53  virtual void DrawPoly(
54  const float* verts, int n, const unsigned char* colors = nullptr, int nc = 0) = 0;
55 
60  virtual void DrawLines(
61  const float* verts, int n, const unsigned char* colors = nullptr, int nc = 0) = 0;
62 
66  virtual void DrawPoints(
67  const float* verts, int n, const unsigned char* colors = nullptr, int nc = 0) = 0;
68 
72  virtual void DrawTriangleMesh(const float* mesh, int n, const unsigned char* colors, int nc) = 0;
73 
79  virtual void ApplyPen(vtkPen* pen) = 0;
80 
86  virtual void ApplyBrush(vtkBrush* brush) = 0;
87 
91  virtual void SetMatrix(vtkMatrix4x4* m) = 0;
92 
96  virtual void GetMatrix(vtkMatrix4x4* m) = 0;
97 
101  virtual void MultiplyMatrix(vtkMatrix4x4* m) = 0;
102 
106  virtual void PushMatrix() = 0;
107 
111  virtual void PopMatrix() = 0;
112 
117  virtual void SetClipping(const vtkRecti& rect) = 0;
118 
123  virtual void DisableClipping() { this->EnableClipping(false); }
124 
128  virtual void EnableClipping(bool enable) = 0;
129 
131 
134  virtual void EnableClippingPlane(int i, double* planeEquation) = 0;
135  virtual void DisableClippingPlane(int i) = 0;
137 
138 protected:
140  ~vtkContextDevice3D() override;
141 
142 private:
143  vtkContextDevice3D(const vtkContextDevice3D&) = delete;
144  void operator=(const vtkContextDevice3D&) = delete;
145 };
146 
147 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
Abstract class for drawing 3D primitives.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for Viewports
Definition: vtkViewport.h:55
virtual void DisableClipping()
Disable clipping of the display.
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:40
a simple class to control print indentation
Definition: vtkIndent.h:39
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:39
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...