VTK
vtkContext3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContext3D.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 
26 #ifndef vtkContext3D_h
27 #define vtkContext3D_h
28 
29 #include "vtkRenderingContext2DModule.h" // For export macro
30 #include "vtkObject.h"
31 #include "vtkVector.h" // For the vector coordinates.
32 #include "vtkSmartPointer.h" // For SP ivars.
33 
34 class vtkContextDevice3D;
35 class vtkPen;
36 class vtkBrush;
37 class vtkTransform;
38 
40 {
41 public:
43  virtual void PrintSelf(ostream &os, vtkIndent indent);
44 
46  static vtkContext3D *New();
47 
51  bool Begin(vtkContextDevice3D *device);
52 
55 
59  bool End();
60 
62  void DrawLine(const vtkVector3f &start, const vtkVector3f &end);
63 
65  void DrawPoly(const float *points, int n);
66 
68  void DrawPoint(const vtkVector3f &point);
69 
71  void DrawPoints(const float *points, int n);
72 
74 
77  void DrawPoints(const float *points, int n,
78  unsigned char *colors, int nc_comps);
80 
82 
83  void DrawTriangleMesh(const float *mesh, int n,
84  const unsigned char *colors, int nc);
86 
91  void ApplyPen(vtkPen *pen);
92 
97  void ApplyBrush(vtkBrush *brush);
98 
103 
106 
112 
114 
116  void PushMatrix();
117  void PopMatrix();
119 
121 
126  void EnableClippingPlane(int i, double *planeEquation);
127  void DisableClippingPlane(int i);
129 
130 protected:
133 
134  vtkSmartPointer<vtkContextDevice3D> Device; // The underlying device
136 
137 private:
138  vtkContext3D(const vtkContext3D &); // Not implemented.
139  void operator=(const vtkContext3D &); // Not implemented.
140 };
141 
142 #endif // VTKCONTEXT3D_H
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:37
vtkContext3D::DrawLine
void DrawLine(const vtkVector3f &start, const vtkVector3f &end)
vtkContext3D::PushMatrix
void PushMatrix()
vtkContext3D::GetDevice
vtkContextDevice3D * GetDevice()
vtkContext3D::New
static vtkContext3D * New()
vtkContext3D::DrawPoints
void DrawPoints(const float *points, int n)
VTKRENDERINGCONTEXT2D_EXPORT
#define VTKRENDERINGCONTEXT2D_EXPORT
Definition: vtkRenderingContext2DModule.h:15
vtkContext3D::vtkContext3D
vtkContext3D()
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
vtkSmartPointer< vtkContextDevice3D >
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkgl::end
GLuint GLuint end
Definition: vtkgl.h:11315
vtkVector.h
vtkContext3D::~vtkContext3D
~vtkContext3D()
vtkContext3D::AppendTransform
void AppendTransform(vtkTransform *transform)
vtkContext3D::Device
vtkSmartPointer< vtkContextDevice3D > Device
Definition: vtkContext3D.h:134
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:60
vtkgl::points
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
vtkContext3D::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkContext3D::DrawTriangleMesh
void DrawTriangleMesh(const float *mesh, int n, const unsigned char *colors, int nc)
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkContext3D::DisableClippingPlane
void DisableClippingPlane(int i)
vtkVector3f
Definition: vtkVector.h:314
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkgl::start
GLuint start
Definition: vtkgl.h:11315
vtkContext3D::DrawPoint
void DrawPoint(const vtkVector3f &point)
vtkContext3D::End
bool End()
vtkSmartPointer.h
vtkContext3D::GetTransform
vtkTransform * GetTransform()
vtkObject.h
vtkContext3D::DrawPoints
void DrawPoints(const float *points, int n, unsigned char *colors, int nc_comps)
vtkContext3D::SetTransform
void SetTransform(vtkTransform *transform)
vtkContext3D::DrawPoly
void DrawPoly(const float *points, int n)
vtkContext3D::ApplyPen
void ApplyPen(vtkPen *pen)
vtkContext3D
Class for drawing 3D primitives to a graphical context.
Definition: vtkContext3D.h:40
vtkContext3D::ApplyBrush
void ApplyBrush(vtkBrush *brush)
vtkContext3D::Begin
bool Begin(vtkContextDevice3D *device)
vtkContext3D::PopMatrix
void PopMatrix()
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:39
vtkContext3D::Transform
vtkSmartPointer< vtkTransform > Transform
Definition: vtkContext3D.h:135
vtkgl::transform
GLuint GLenum GLenum transform
Definition: vtkgl.h:16451
vtkRenderingContext2DModule.h
vtkContext3D::EnableClippingPlane
void EnableClippingPlane(int i, double *planeEquation)