VTK  9.3.1
vtkOpenGLPointGaussianMapper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkOpenGLPointGaussianMapper_h
15 #define vtkOpenGLPointGaussianMapper_h
16 
17 #include "vtkPointGaussianMapper.h"
18 #include "vtkRenderingOpenGL2Module.h" // For export macro
19 #include <vector> // for ivar
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkOpenGLPointGaussianMapperHelper;
23 
24 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPointGaussianMapper : public vtkPointGaussianMapper
25 {
26 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
36  void ReleaseGraphicsResources(vtkWindow*) override;
37 
41  bool HasTranslucentPolygonalGeometry() override;
42 
46  void Render(vtkRenderer* ren, vtkActor* act) override;
47 
53  vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
54 
55 protected:
57  ~vtkOpenGLPointGaussianMapper() override;
58 
59  void ReportReferences(vtkGarbageCollector* collector) override;
60 
61  std::vector<vtkOpenGLPointGaussianMapperHelper*> Helpers;
62  vtkOpenGLPointGaussianMapperHelper* CreateHelper();
63  void CopyMapperValuesToHelper(vtkOpenGLPointGaussianMapperHelper* helper);
64 
68 
69  // unused
70  void RenderPiece(vtkRenderer*, vtkActor*) override {}
71 
72  void RenderInternal(vtkRenderer*, vtkActor*);
73 
74  // create the table for opacity values
75  void BuildOpacityTable();
76 
77  // create the table for scale values
78  void BuildScaleTable();
79 
80  float* OpacityTable; // the table
81  double OpacityScale; // used for quick lookups
82  double OpacityOffset; // used for quick lookups
83  float* ScaleTable; // the table
84  double ScaleScale; // used for quick lookups
85  double ScaleOffset; // used for quick lookups
86 
93 
98 
102  void ComputeBounds() override;
103 
104  // used by the hardware selector
105  std::vector<std::vector<unsigned int>> PickPixels;
106 
107 private:
109  void operator=(const vtkOpenGLPointGaussianMapper&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
Store vtkAlgorithm input/output information.
void ReportReferences(vtkGarbageCollector *) override
record modification and/or execution time
Definition: vtkTimeStamp.h:24
virtual bool HasTranslucentPolygonalGeometry()
Some introspection on the type of data the mapper will render used by props to determine if they shou...
std::vector< vtkOpenGLPointGaussianMapperHelper * > Helpers
abstract specification for renderers
Definition: vtkRenderer.h:61
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:466
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:38
static vtkPointGaussianMapper * New()
Detect and break reference loops.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
void RenderPiece(vtkRenderer *, vtkActor *) override
Implemented by sub classes.
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
virtual void ComputeBounds()
Called in GetBounds().
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
std::vector< std::vector< unsigned int > > PickPixels
draw PointGaussians using imposters
draw PointGaussians using imposters
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:104