VTK
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 "vtkRenderingContext2DModule.h" // For export macro
32 #include "vtkObject.h"
33 #include "vtkVector.h" // For the vector coordinates.
34 #include "vtkRect.h" // For the rectangles..
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  virtual void PrintSelf(ostream &os, vtkIndent indent);
46 
47  static vtkContextDevice3D * New();
48 
53  virtual void DrawPoly(const float *verts, int n,
54  const unsigned char *colors = 0, int nc = 0) = 0;
55 
60  virtual void DrawLines(const float *verts, int n,
61  const unsigned char *colors = 0, int nc = 0) = 0;
62 
66  virtual void DrawPoints(const float *verts, int n,
67  const unsigned char *colors = 0, int nc = 0) = 0;
68 
72  virtual void DrawTriangleMesh(const float *mesh, int n,
73  const unsigned char *colors, int nc) = 0;
74 
80  virtual void ApplyPen(vtkPen *pen) = 0;
81 
87  virtual void ApplyBrush(vtkBrush *brush) = 0;
88 
92  virtual void SetMatrix(vtkMatrix4x4 *m) = 0;
93 
97  virtual void GetMatrix(vtkMatrix4x4 *m) = 0;
98 
102  virtual void MultiplyMatrix(vtkMatrix4x4 *m) = 0;
103 
107  virtual void PushMatrix() = 0;
108 
112  virtual void PopMatrix() = 0;
113 
118  virtual void SetClipping(const vtkRecti &rect) = 0;
119 
124  virtual void DisableClipping() { this->EnableClipping(false); }
125 
129  virtual void EnableClipping(bool enable) = 0;
130 
132 
135  virtual void EnableClippingPlane(int i, double *planeEquation) = 0;
136  virtual void DisableClippingPlane(int i) = 0;
138 
139 protected:
142 
143 private:
144  vtkContextDevice3D(const vtkContextDevice3D &) VTK_DELETE_FUNCTION;
145  void operator=(const vtkContextDevice3D &) VTK_DELETE_FUNCTION;
146 };
147 
148 #endif
vtkContextDevice3D::DrawPoints
virtual void DrawPoints(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
Draw points at the vertex positions specified.
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:38
vtkContextDevice3D::New
static vtkContextDevice3D * New()
vtkContextDevice3D::DrawLines
virtual void DrawLines(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
Draw lines defined by specified pair of points.
vtkContextDevice3D::ApplyBrush
virtual void ApplyBrush(vtkBrush *brush)=0
Apply the supplied brush which controls the outlines of shapes, as well as lines, points and related ...
vtkContextDevice3D::SetClipping
virtual void SetClipping(const vtkRecti &rect)=0
Supply a float array of length 4 with x1, y1, width, height specifying clipping region for the device...
vtkContextDevice3D
Abstract class for drawing 3D primitives.
Definition: vtkContextDevice3D.h:42
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkVector.h
vtkContextDevice3D::~vtkContextDevice3D
~vtkContextDevice3D()
vtkContextDevice3D::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkContextDevice3D::PushMatrix
virtual void PushMatrix()=0
Push the current matrix onto the stack.
vtkContextDevice3D::DrawPoly
virtual void DrawPoly(const float *verts, int n, const unsigned char *colors=0, int nc=0)=0
Draw a polyline between the specified points.
vtkContextDevice3D::EnableClippingPlane
virtual void EnableClippingPlane(int i, double *planeEquation)=0
Enable/Disable the specified clipping plane.
vtkContextDevice3D::vtkContextDevice3D
vtkContextDevice3D()
vtkRect.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
vtkContextDevice3D::DrawTriangleMesh
virtual void DrawTriangleMesh(const float *mesh, int n, const unsigned char *colors, int nc)=0
Draw triangles to generate the specified mesh.
vtkContextDevice3D::SetMatrix
virtual void SetMatrix(vtkMatrix4x4 *m)=0
Set the model view matrix for the display.
vtkContextDevice3D::MultiplyMatrix
virtual void MultiplyMatrix(vtkMatrix4x4 *m)=0
Multiply the current model view matrix by the supplied one.
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkObject.h
vtkContextDevice3D::GetMatrix
virtual void GetMatrix(vtkMatrix4x4 *m)=0
Set the model view matrix for the display.
vtkContextDevice3D::ApplyPen
virtual void ApplyPen(vtkPen *pen)=0
Apply the supplied pen which controls the outlines of shapes, as well as lines, points and related pr...
vtkContextDevice3D::EnableClipping
virtual void EnableClipping(bool enable)=0
Enable or disable the clipping of the scene.
vtkContextDevice3D::DisableClipping
virtual void DisableClipping()
Disable clipping of the display.
Definition: vtkContextDevice3D.h:124
vtkRecti
Definition: vtkRect.h:288
vtkContextDevice3D::PopMatrix
virtual void PopMatrix()=0
Pop the current matrix off of the stack.
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:40
vtkContextDevice3D::DisableClippingPlane
virtual void DisableClippingPlane(int i)=0