VTK  9.7.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 "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20 #include <vector> // for ivar
21 
22 VTK_ABI_NAMESPACE_BEGIN
25 
26 class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLPointGaussianMapper
27  : public vtkPointGaussianMapper
28 {
29 public:
32  static vtkOverrideAttribute* CreateOverrideAttributes();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
41  void ReleaseGraphicsResources(vtkWindow*) override;
42 
46  bool HasTranslucentPolygonalGeometry() override;
47 
51  void Render(vtkRenderer* ren, vtkActor* act) override;
52 
58  vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
59 
60 protected:
62  ~vtkOpenGLPointGaussianMapper() override;
63 
64  void ReportReferences(vtkGarbageCollector* collector) override;
65 
66  std::vector<vtkOpenGLPointGaussianMapperHelper*> Helpers;
67 
68  virtual vtkOpenGLPointGaussianMapperHelper* CreateHelper();
69  virtual void CopyMapperValuesToHelper(vtkOpenGLPointGaussianMapperHelper* helper);
70 
74 
75  // unused
76  void RenderPiece(vtkRenderer*, vtkActor*) override {}
77 
78  void RenderInternal(vtkRenderer*, vtkActor*);
79 
80  // create the table for opacity values
81  void BuildOpacityTable();
82 
83  // create the table for scale values
84  void BuildScaleTable();
85 
86  float* OpacityTable; // the table
87  double OpacityScale; // used for quick lookups
88  double OpacityOffset; // used for quick lookups
89  float* ScaleTable; // the table
90  double ScaleScale; // used for quick lookups
91  double ScaleOffset; // used for quick lookups
92 
99 
103  int FillInputPortInformation(int port, vtkInformation* info) override;
104 
108  void ComputeBounds() override;
109 
110  // used by the hardware selector
111  std::vector<std::vector<unsigned int>> PickPixels;
112 
113 private:
115  void operator=(const vtkOpenGLPointGaussianMapper&) = delete;
116 };
117 
118 #define vtkOpenGLPointGaussianMapper_OVERRIDE_ATTRIBUTES \
119  vtkOpenGLPointGaussianMapper::CreateOverrideAttributes()
120 VTK_ABI_NAMESPACE_END
121 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
Attribute for vtkObjectFactory overrides.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
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:63
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:469
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:39
static vtkPointGaussianMapper * New()
Detect and break reference loops.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
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).
#define VTK_NEWINSTANCE
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
#define VTK_MARSHALAUTO
draw PointGaussians using imposters
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:105