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:
57  ~vtkOpenGLSphereMapper();
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
a PolyDataMapper for the OpenGL library
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
static vtkOpenGLPolyDataMapper * New()
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
draw spheres using imposters
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Vertex or Fragment shader, combined into a ShaderProgram.
Definition: vtkShader.h:40