VTK  9.0.20201122
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 
26 #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, vtkRenderer* ren, vtkActor* act) override;
65 
70  std::map<vtkShader::Type, vtkShader*> shaders, vtkRenderer* ren, vtkActor* act) override;
71 
75  void SetCameraShaderParameters(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act) override;
76 
80  void SetMapperShaderParameters(vtkOpenGLHelper& cellBO, vtkRenderer* ren, vtkActor* act) override;
81 
82  const char* ScaleArray;
83  const char* OrientationArray;
84  const char* SelectionIdArray;
85 
89  bool GetNeedToRebuildBufferObjects(vtkRenderer* ren, vtkActor* act) override;
90 
94  void BuildBufferObjects(vtkRenderer* ren, vtkActor* act) override;
95 
96  void RenderPieceDraw(vtkRenderer* ren, vtkActor* act) override;
97 
98 private:
100  void operator=(const vtkOpenGLStickMapper&) = delete;
101 };
102 
103 #endif
vtkOpenGLPolyDataMapper::BuildBufferObjects
virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Build the VBO/IBO, called by UpdateBufferObjects.
vtkOpenGLPolyDataMapper::ReplaceShaderValues
virtual void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacements on the shader templates.
vtkOpenGLStickMapper::OrientationArray
const char * OrientationArray
Definition: vtkOpenGLStickMapper.h:83
vtkOpenGLPolyDataMapper::GetNeedToRebuildBufferObjects
virtual bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Does the VBO/IBO need to be rebuilt.
vtkOpenGLPolyDataMapper::New
static vtkOpenGLPolyDataMapper * New()
vtkOpenGLPolyDataMapper::RenderPieceDraw
virtual void RenderPieceDraw(vtkRenderer *ren, vtkActor *act)
vtkOpenGLStickMapper::ScaleArray
const char * ScaleArray
Definition: vtkOpenGLStickMapper.h:82
vtkOpenGLPolyDataMapper::GetShaderTemplate
virtual void GetShaderTemplate(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Create the basic shaders before replacement.
vtkOpenGLHelper
Definition: vtkOpenGLHelper.h:30
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkOpenGLPolyDataMapper::SetCameraShaderParameters
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the Camera, called by UpdateShader.
vtkOpenGLStickMapper::SelectionIdArray
const char * SelectionIdArray
Definition: vtkOpenGLStickMapper.h:84
vtkOpenGLStickMapper
use imposters to draw cylinders
Definition: vtkOpenGLStickMapper.h:28
vtkOpenGLPolyDataMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkOpenGLPolyDataMapper::SetMapperShaderParameters
virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameters related to the mapper/input data, called by UpdateShader.
vtkOpenGLPolyDataMapper.h
vtkOpenGLPolyDataMapper
PolyDataMapper using OpenGL to render.
Definition: vtkOpenGLPolyDataMapper.h:58