VTK
vtkOpenGLMoleculeMapper.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 vtkOpenGLMoleculeMapper_h
23 #define vtkOpenGLMoleculeMapper_h
24 
25 #include "vtkDomainsChemistryOpenGL2Module.h" // For export macro
26 #include "vtkMoleculeMapper.h"
27 #include "vtkNew.h" // For vtkNew
28 
31 
32 class VTKDOMAINSCHEMISTRYOPENGL2_EXPORT vtkOpenGLMoleculeMapper : public vtkMoleculeMapper
33 {
34 public:
35  static vtkOpenGLMoleculeMapper* New();
37 
38  //@{
42  void Render(vtkRenderer *, vtkActor *) VTK_OVERRIDE;
43  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
45 
50  return this->FastAtomMapper.Get(); }
51 
52 protected:
54  ~vtkOpenGLMoleculeMapper() VTK_OVERRIDE;
55 
56  void UpdateAtomGlyphPolyData() VTK_OVERRIDE;
57  void UpdateBondGlyphPolyData() VTK_OVERRIDE;
58 
60 
63  vtkNew<vtkOpenGLSphereMapper> FastAtomMapper;
64  vtkNew<vtkOpenGLStickMapper> FastBondMapper;
66 
67 private:
68  vtkOpenGLMoleculeMapper(const vtkOpenGLMoleculeMapper&) VTK_DELETE_FUNCTION;
69  void operator=(const vtkOpenGLMoleculeMapper&) VTK_DELETE_FUNCTION;
70 };
71 
72 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkOpenGLSphereMapper * GetFastAtomMapper()
provide access to the underlying mappers
use imposters to draw cylinders
abstract specification for renderers
Definition: vtkRenderer.h:57
void Render(vtkRenderer *, vtkActor *) override
Reimplemented from base class.
Mapper that draws vtkMolecule objects.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
draw spheres using imposters
void ReleaseGraphicsResources(vtkWindow *) override
Reimplemented from base class.
Allocate and hold a VTK object.
Definition: vtkNew.h:61
An accelerated class for rendering molecules.
static vtkMoleculeMapper * New()