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 =========================================================================*/
21 #ifndef vtkOpenGLSphereMapper_h
22 #define vtkOpenGLSphereMapper_h
23 
24 #include "vtkDomainsChemistryOpenGL2Module.h" // For export macro
25 #include "vtkOpenGLPolyDataMapper.h"
26 
27 class VTKDOMAINSCHEMISTRYOPENGL2_EXPORT vtkOpenGLSphereMapper : public vtkOpenGLPolyDataMapper
28 {
29 public:
30  static vtkOpenGLSphereMapper* New();
32  void PrintSelf(ostream& os, vtkIndent indent);
33 
35 
36  vtkSetStringMacro(ScaleArray);
38 
40  virtual void Render(vtkRenderer *ren, vtkActor *act);
41 
42 protected:
44  ~vtkOpenGLSphereMapper();
45 
47 
48  virtual void GetShaderTemplate(std::string &VertexCode,
49  std::string &fragmentCode,
50  std::string &geometryCode,
51  int lightComplexity,
52  vtkRenderer *ren, vtkActor *act);
54 
56 
57  virtual void ReplaceShaderValues(std::string &VertexCode,
58  std::string &fragmentCode,
59  std::string &geometryCode,
60  int lightComplexity,
61  vtkRenderer *ren, vtkActor *act);
63 
65  virtual void SetCameraShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
66 
68  virtual void SetMapperShaderParameters(vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act);
69 
70  const char *ScaleArray;
71 
73  virtual bool GetNeedToRebuildBufferObjects(vtkRenderer *ren, vtkActor *act);
74 
76  virtual void BuildBufferObjects(vtkRenderer *ren, vtkActor *act);
77 
78  virtual void RenderPieceDraw(vtkRenderer *ren, vtkActor *act);
79 
80  // used for transparency
81  bool Invert;
82 
83 private:
84  vtkOpenGLSphereMapper(const vtkOpenGLSphereMapper&); // Not implemented.
85  void operator=(const vtkOpenGLSphereMapper&); // Not implemented.
86 };
87 
88 #endif
a PolyDataMapper for the OpenGL library
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
static vtkOpenGLPolyDataMapper * New()
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
abstract specification for renderers
Definition: vtkRenderer.h:63
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
a simple class to control print indentation
Definition: vtkIndent.h:38
Definition: vtkgl.h:11267
draw spheres using imposters