File: vtkPolyDataPainter.h

package info (click to toggle)
vtk6 6.3.0%2Bdfsg2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 118,972 kB
  • sloc: cpp: 1,442,790; ansic: 113,395; python: 72,383; tcl: 46,998; xml: 8,119; yacc: 4,525; java: 4,239; perl: 3,108; lex: 1,694; sh: 1,093; asm: 154; makefile: 68; objc: 17
file content (110 lines) | stat: -rw-r--r-- 3,980 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkPolyDataPainter.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/*
 * Copyright 2004 Sandia Corporation.
 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
 * license for use of this work by or on behalf of the
 * U.S. Government. Redistribution and use in source and binary forms, with
 * or without modification, are permitted provided that this Notice and any
 * statement of authorship are reproduced on all copies.
 */

// .NAME vtkPolyDataPainter - Abstract class for drawing poly data.
//
// .SECTION Description
// vtkPolyDataPainter encapsulates a method of drawing poly data.  This is a subset
// of what a mapper does.  The painter does no maintenance of the rendering
// state (camera, lights, etc.).  It is solely responsible for issuing
// rendering commands that build graphics primitives.
//
// To simplify coding, an implementation of vtkPolyDataPainter is allowed to support
// only certain types of poly data or certain types of primitives.
//
// .SECTION See Also
// vtkDefaultPainter
// vtkStandardPainter
// vtkPainterDeviceAdapter
//

#ifndef vtkPolyDataPainter_h
#define vtkPolyDataPainter_h

#include "vtkRenderingOpenGLModule.h" // For export macro
#include "vtkPainter.h"

class vtkInformationIntegerKey;
class vtkInformationObjectBaseKey;
class vtkPolyData;

class VTKRENDERINGOPENGL_EXPORT vtkPolyDataPainter : public vtkPainter
{
public:
  vtkTypeMacro(vtkPolyDataPainter, vtkPainter);
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  // Description:
  // Get/set the poly data to render.
  vtkPolyData* GetInputAsPolyData();

  // Description:
  // Get the output polydata from this Painter. The default
  // implementation forwards the input polydata as the output.
  vtkPolyData* GetOutputAsPolyData();

  // Description:
  // Keys used to specify control the behaviour of the painter.
  // When on, the painter creates normals when none are available in the
  // polydata. On by default.
  static vtkInformationIntegerKey* BUILD_NORMALS();

  // Description:
  // Key added to disable any scalar coloring for the current pass.
  static vtkInformationIntegerKey* DISABLE_SCALAR_COLOR();

  // Set the mapping between vtkPointData (vtkCellData) arrays and
  // generic vertex attributes.
  static vtkInformationObjectBaseKey* DATA_ARRAY_TO_VERTEX_ATTRIBUTE();

  // Description:
  // Key to store the shader device adaptor.
  static vtkInformationObjectBaseKey* SHADER_DEVICE_ADAPTOR();

  // Description:
  // Overridden to stop the render call if input polydata is not set,
  // since PolyDataPainter cannot paint without any polydata input.
  virtual void Render(vtkRenderer* renderer, vtkActor* actor,
                      unsigned long typeflags, bool forceCompileOnly);

protected:
  vtkPolyDataPainter();
  ~vtkPolyDataPainter();

  int BuildNormals; // ivar synchornized with this->Information before
    // RenderInternal() is called. The ivar are purposefully protected,
    // the only way to affecting these from outside should be using
    // the information object.
  vtkSetMacro(BuildNormals, int);

  // Description:
  // Called before RenderInternal() if the Information has been changed
  // since the last time this method was called.
  virtual void ProcessInformation(vtkInformation*);

private:
  vtkPolyDataPainter(const vtkPolyDataPainter &); // Not implemented.
  void operator=(const vtkPolyDataPainter &); // Not implemented.
};

#endif //_vtkPolyDataPainter_h