VTK
vtkPrimitivePainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPrimitivePainter.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 =========================================================================*/
29 #ifndef vtkPrimitivePainter_h
30 #define vtkPrimitivePainter_h
31 
32 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkPolyDataPainter.h"
34 
35 class vtkDataArray;
36 class vtkPoints;
38 
39 class VTKRENDERINGOPENGL_EXPORT vtkPrimitivePainter : public vtkPolyDataPainter
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
50  vtkGetMacro(SupportedPrimitive, int);
52 
53 protected:
56 
57  enum {
58  VTK_PDM_NORMALS = 0x001,
59  VTK_PDM_COLORS = 0x002,
60  VTK_PDM_TCOORDS = 0x004,
61  VTK_PDM_CELL_COLORS = 0x008,
62  VTK_PDM_CELL_NORMALS = 0x010,
63  VTK_PDM_OPAQUE_COLORS = 0x020,
64  VTK_PDM_FIELD_COLORS = 0x040,
65  VTK_PDM_EDGEFLAGS = 0x080,
66  VTK_PDM_GENERIC_VERTEX_ATTRIBUTES = 0x100
67  };
68 
78  virtual void PrepareForRendering(vtkRenderer*, vtkActor*);
79 
84  virtual void ProcessInformation(vtkInformation*);
85 
89  virtual vtkDataObject* GetOutput();
90 
102  virtual int RenderPrimitive(unsigned long flags, vtkDataArray* n,
104 
112  virtual void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
113  unsigned long typeflags,
114  bool forceCompileOnly);
115 
119  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
120 
121  int SupportedPrimitive; // must be set by subclasses.
122  vtkSetMacro(SupportedPrimitive, int);
123 
124  int DisableScalarColor;
125 
130 
131 private:
132  vtkPrimitivePainter(const vtkPrimitivePainter&) VTK_DELETE_FUNCTION;
133  void operator=(const vtkPrimitivePainter&) VTK_DELETE_FUNCTION;
134 };
135 
136 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkPolyDataPainter::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPrimitivePainter::OutputUpdateTime
vtkTimeStamp OutputUpdateTime
Definition: vtkPrimitivePainter.h:127
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkPolyDataPainter
Abstract class for drawing poly data.
Definition: vtkPolyDataPainter.h:54
vtkPolyDataPainter::ProcessInformation
virtual void ProcessInformation(vtkInformation *)
Called before RenderInternal() if the Information has been changed since the last time this method wa...
vtkPrimitivePainter::OutputData
vtkPolyData * OutputData
Definition: vtkPrimitivePainter.h:126
vtkPrimitivePainter::MultiTextureAttributes
bool MultiTextureAttributes
Definition: vtkPrimitivePainter.h:129
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkPrimitivePainter::DisableScalarColor
int DisableScalarColor
Definition: vtkPrimitivePainter.h:122
vtkPrimitivePainter
superclass for class that handle single privmitives.
Definition: vtkPrimitivePainter.h:39
vtkPainter::RenderInternal
virtual void RenderInternal(vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
Performs the actual rendering.
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPrimitivePainter::SupportedPrimitive
int SupportedPrimitive
Definition: vtkPrimitivePainter.h:121
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:99
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkPainter::GetOutput
virtual vtkDataObject * GetOutput()
Get the output data object from this painter.
Definition: vtkPainter.h:174
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPrimitivePainter::GenericVertexAttributes
bool GenericVertexAttributes
Definition: vtkPrimitivePainter.h:128
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkPainter::PrepareForRendering
virtual void PrepareForRendering(vtkRenderer *, vtkActor *)
Some subclasses may need to do some preprocessing before the actual rendering can be done eg.
Definition: vtkPainter.h:210
vtkPainter::ReportReferences
void ReportReferences(vtkGarbageCollector *collector) override
Take part in garbage collection.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkPolyDataPainter.h