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) override;
34 
36 
39  vtkSetStringMacro(ScaleArray);
41 
43 
46  vtkSetStringMacro(OrientationArray);
48 
50 
53  vtkSetStringMacro(SelectionIdArray);
55 
56 protected:
58  ~vtkOpenGLStickMapper() override;
59 
63  void GetShaderTemplate(
64  std::map<vtkShader::Type, vtkShader *> shaders,
65  vtkRenderer *ren, vtkActor *act) override;
66 
70  void ReplaceShaderValues(
71  std::map<vtkShader::Type, vtkShader *> shaders,
72  vtkRenderer *ren, vtkActor *act) override;
73 
77  void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override;
78 
82  void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act) override;
83 
84  const char *ScaleArray;
85  const char *OrientationArray;
86  const char *SelectionIdArray;
87 
91  bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act) override;
92 
96  void BuildBufferObjects(vtkRenderer *ren, vtkActor *act) override;
97 
98  void RenderPieceDraw(vtkRenderer *ren, vtkActor *act) override;
99 
100 private:
101  vtkOpenGLStickMapper(const vtkOpenGLStickMapper&) = delete;
102  void operator=(const vtkOpenGLStickMapper&) = delete;
103 };
104 
105 #endif
PolyDataMapper using OpenGL to render.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
static vtkOpenGLPolyDataMapper * New()
use imposters to draw cylinders
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:40