VTK
vtkOpenGLSphereMapper.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 vtkOpenGLSphereMapper_h
23 #define vtkOpenGLSphereMapper_h
24 
25 #include "vtkRenderingOpenGL2Module.h" // For export macro
27 
28 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLSphereMapper : public vtkOpenGLPolyDataMapper
29 {
30 public:
31  static vtkOpenGLSphereMapper* New();
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
36 
39  vtkSetStringMacro(ScaleArray);
41 
43 
47  vtkSetMacro(Radius, float);
48  vtkGetMacro(Radius, float);
49 
53  virtual void Render(vtkRenderer *ren, vtkActor *act);
54 
55 protected:
58 
62  virtual void GetShaderTemplate(
63  std::map<vtkShader::Type, vtkShader *> shaders,
64  vtkRenderer *ren, vtkActor *act);
65 
69  virtual void ReplaceShaderValues(
70  std::map<vtkShader::Type, vtkShader *> shaders,
71  vtkRenderer *ren, vtkActor *act);
72 
76  virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
77 
81  virtual void SetMapperShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act);
82 
83  const char *ScaleArray;
84 
88  virtual bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act);
89 
93  virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act);
94 
95  virtual void RenderPieceDraw(vtkRenderer *ren, vtkActor *act);
96 
97  // used for transparency
98  bool Invert;
99  float Radius;
100 
101 private:
102  vtkOpenGLSphereMapper(const vtkOpenGLSphereMapper&) VTK_DELETE_FUNCTION;
103  void operator=(const vtkOpenGLSphereMapper&) VTK_DELETE_FUNCTION;
104 };
105 
106 #endif
vtkOpenGLPolyDataMapper::BuildBufferObjects
virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act)
Build the VBO/IBO, called by UpdateBufferObjects.
vtkOpenGLSphereMapper::Radius
float Radius
Definition: vtkOpenGLSphereMapper.h:99
vtkOpenGLPolyDataMapper::ReplaceShaderValues
virtual void ReplaceShaderValues(std::map< vtkShader::Type, vtkShader * > shaders, vtkRenderer *ren, vtkActor *act)
Perform string replacments on the shader templates.
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)
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:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkOpenGLPolyDataMapper::SetCameraShaderParameters
virtual void SetCameraShaderParameters(vtkOpenGLHelper &cellBO, vtkRenderer *ren, vtkActor *act)
Set the shader parameteres related to the Camera, called by UpdateShader.
vtkOpenGLSphereMapper::Invert
bool Invert
Definition: vtkOpenGLSphereMapper.h:98
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
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:63
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
vtkOpenGLSphereMapper
draw spheres using imposters
Definition: vtkOpenGLSphereMapper.h:28
vtkPolyDataMapper::Render
virtual void Render(vtkRenderer *ren, vtkActor *act)
This calls RenderPiece (in a for loop if streaming is necessary).
vtkOpenGLPolyDataMapper
a PolyDataMapper for the OpenGL library
Definition: vtkOpenGLPolyDataMapper.h:40
vtkOpenGLSphereMapper::ScaleArray
const char * ScaleArray
Definition: vtkOpenGLSphereMapper.h:83