VTK
vtkOpenGLStickMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4 
5  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
22 #ifndef vtkOpenGLStickMapper_h
23 #define vtkOpenGLStickMapper_h
24 
25 #include "vtkRenderingOpenGL2Module.h" // For export macro
27 
28 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLStickMapper : public vtkOpenGLPolyDataMapper
29 {
30 public:
31  static vtkOpenGLStickMapper* New();
33  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
34 
36 
39  vtkSetStringMacro(ScaleArray);
41 
43 
46  vtkSetStringMacro(OrientationArray);
48 
50 
53  vtkSetStringMacro(SelectionIdArray);
55 
56 protected:
58  ~vtkOpenGLStickMapper() VTK_OVERRIDE;
59 
63  void GetShaderTemplate(
64  std::map<vtkShader::Type, vtkShader *> shaders,
65  vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
66 
70  void ReplaceShaderValues(
71  std::map<vtkShader::Type, vtkShader *> shaders,
72  vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
73 
77  void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
78 
82  void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
83 
84  const char *ScaleArray;
85  const char *OrientationArray;
86  const char *SelectionIdArray;
87 
91  bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
92 
96  void BuildBufferObjects(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
97 
98  void RenderPieceDraw(vtkRenderer *ren, vtkActor *act) VTK_OVERRIDE;
99 
100 private:
101  vtkOpenGLStickMapper(const vtkOpenGLStickMapper&) VTK_DELETE_FUNCTION;
102  void operator=(const vtkOpenGLStickMapper&) VTK_DELETE_FUNCTION;
103 };
104 
105 #endif
a PolyDataMapper for the OpenGL library
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
static vtkOpenGLPolyDataMapper * New()
use imposters to draw cylinders
abstract specification for renderers
Definition: vtkRenderer.h:57
a simple class to control print indentation
Definition: vtkIndent.h:33
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:37
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.