VTK  9.0.20200928
vtkOpenGLPointGaussianMapper.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 vtkOpenGLPointGaussianMapper_h
26 #define vtkOpenGLPointGaussianMapper_h
27 
28 #include "vtkPointGaussianMapper.h"
29 #include "vtkRenderingOpenGL2Module.h" // For export macro
30 #include <vector> // for ivar
31 
32 class vtkOpenGLPointGaussianMapperHelper;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPointGaussianMapper : public vtkPointGaussianMapper
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
46  void ReleaseGraphicsResources(vtkWindow*) override;
47 
51  bool HasTranslucentPolygonalGeometry() override;
52 
56  void Render(vtkRenderer* ren, vtkActor* act) override;
57 
63  vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
64 
65 protected:
67  ~vtkOpenGLPointGaussianMapper() override;
68 
69  void ReportReferences(vtkGarbageCollector* collector) override;
70 
71  std::vector<vtkOpenGLPointGaussianMapperHelper*> Helpers;
72  vtkOpenGLPointGaussianMapperHelper* CreateHelper();
73  void CopyMapperValuesToHelper(vtkOpenGLPointGaussianMapperHelper* helper);
74 
78 
79  // unused
80  void RenderPiece(vtkRenderer*, vtkActor*) override {}
81 
82  void RenderInternal(vtkRenderer*, vtkActor*);
83 
84  // create the table for opacity values
85  void BuildOpacityTable();
86 
87  // create the table for scale values
88  void BuildScaleTable();
89 
90  float* OpacityTable; // the table
91  double OpacityScale; // used for quick lookups
92  double OpacityOffset; // used for quick lookups
93  float* ScaleTable; // the table
94  double ScaleScale; // used for quick lookups
95  double ScaleOffset; // used for quick lookups
96 
103 
107  int FillInputPortInformation(int port, vtkInformation* info) override;
108 
112  void ComputeBounds() override;
113 
114  // used by the hardware selector
115  std::vector<std::vector<unsigned int>> PickPixels;
116 
117 private:
119  void operator=(const vtkOpenGLPointGaussianMapper&) = delete;
120 };
121 
122 #endif
vtkAlgorithm::CreateDefaultExecutive
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
vtkOpenGLPointGaussianMapper::OpacityScale
double OpacityScale
Definition: vtkOpenGLPointGaussianMapper.h:91
vtkOpenGLPointGaussianMapper::ScaleTableUpdateTime
vtkTimeStamp ScaleTableUpdateTime
Definition: vtkOpenGLPointGaussianMapper.h:76
vtkPointGaussianMapper
draw PointGaussians using imposters
Definition: vtkPointGaussianMapper.h:34
vtkOpenGLPointGaussianMapper::OpacityOffset
double OpacityOffset
Definition: vtkOpenGLPointGaussianMapper.h:92
vtkOpenGLPointGaussianMapper::OpacityTable
float * OpacityTable
Definition: vtkOpenGLPointGaussianMapper.h:90
vtkPointGaussianMapper.h
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkOpenGLPointGaussianMapper::PickPixels
std::vector< std::vector< unsigned int > > PickPixels
Definition: vtkOpenGLPointGaussianMapper.h:115
vtkOpenGLPointGaussianMapper::ScaleTable
float * ScaleTable
Definition: vtkOpenGLPointGaussianMapper.h:93
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkX3D::port
Definition: vtkX3D.h:453
vtkOpenGLPointGaussianMapper::ScaleScale
double ScaleScale
Definition: vtkOpenGLPointGaussianMapper.h:94
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:46
vtkMapper::HasTranslucentPolygonalGeometry
virtual bool HasTranslucentPolygonalGeometry()
vtkMapper::ProcessSelectorPixelBuffers
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:471
vtkHardwareSelector
Definition: vtkHardwareSelector.h:123
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyDataMapper::Render
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
vtkOpenGLPointGaussianMapper
draw PointGaussians using imposters
Definition: vtkOpenGLPointGaussianMapper.h:34
vtkPolyDataMapper::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkOpenGLPointGaussianMapper::HelperUpdateTime
vtkTimeStamp HelperUpdateTime
Definition: vtkOpenGLPointGaussianMapper.h:75
vtkOpenGLPointGaussianMapper::OpacityTableUpdateTime
vtkTimeStamp OpacityTableUpdateTime
Definition: vtkOpenGLPointGaussianMapper.h:77
vtkPointGaussianMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:109
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:94
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkX3D::info
Definition: vtkX3D.h:382
vtkPointGaussianMapper::New
static vtkPointGaussianMapper * New()
vtkAlgorithm::ReportReferences
void ReportReferences(vtkGarbageCollector *) override
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkPolyDataMapper::ComputeBounds
virtual void ComputeBounds()
Called in GetBounds().
vtkOpenGLPointGaussianMapper::ScaleOffset
double ScaleOffset
Definition: vtkOpenGLPointGaussianMapper.h:95
vtkOpenGLPointGaussianMapper::Helpers
std::vector< vtkOpenGLPointGaussianMapperHelper * > Helpers
Definition: vtkOpenGLPointGaussianMapper.h:71
vtkOpenGLPointGaussianMapper::RenderPiece
void RenderPiece(vtkRenderer *, vtkActor *) override
Implemented by sub classes.
Definition: vtkOpenGLPointGaussianMapper.h:80