VTK  9.2.6
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 =========================================================================*/
25 #ifndef vtkOpenGLMoleculeMapper_h
26 #define vtkOpenGLMoleculeMapper_h
27 
28 #include "vtkDomainsChemistryOpenGL2Module.h" // For export macro
29 #include "vtkMoleculeMapper.h"
30 #include "vtkNew.h" // For vtkNew
31 
34 
35 class VTKDOMAINSCHEMISTRYOPENGL2_EXPORT vtkOpenGLMoleculeMapper : public vtkMoleculeMapper
36 {
37 public:
38  static vtkOpenGLMoleculeMapper* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  void Render(vtkRenderer*, vtkActor*) override;
47  void ReleaseGraphicsResources(vtkWindow*) override;
49 
53  vtkOpenGLSphereMapper* GetFastAtomMapper() { return this->FastAtomMapper; }
59  vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
60 
65  void SetMapScalars(bool map) override;
66 
67 protected:
69  ~vtkOpenGLMoleculeMapper() override;
70 
71  void UpdateAtomGlyphPolyData() override;
72  void UpdateBondGlyphPolyData() override;
73 
75 
81 
82 private:
84  void operator=(const vtkOpenGLMoleculeMapper&) = delete;
85 };
86 
87 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkOpenGLSphereMapper * GetFastAtomMapper()
provide access to the underlying mappers
virtual void UpdateBondGlyphPolyData()
Cached variables and update methods.
use imposters to draw cylinders
abstract specification for renderers
Definition: vtkRenderer.h:72
virtual void ProcessSelectorPixelBuffers(vtkHardwareSelector *, std::vector< unsigned int > &, vtkProp *)
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
Definition: vtkMapper.h:477
vtkNew< vtkOpenGLSphereMapper > FastAtomMapper
Internal mappers.
void Render(vtkRenderer *, vtkActor *) override
Reimplemented from base class.
Mapper that draws vtkMolecule objects.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkNew< vtkOpenGLStickMapper > FastBondMapper
Internal mappers.
virtual void UpdateAtomGlyphPolyData()
Cached variables and update methods.
draw spheres using imposters
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReleaseGraphicsResources(vtkWindow *) override
Reimplemented from base class.
An accelerated class for rendering molecules.
virtual void SetMapScalars(bool map)
Helper method to set ScalarMode on both AtomGlyphMapper and BondGlyphMapper.
static vtkMoleculeMapper * New()