VTK  9.0.3
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 
47 
52 
56  void Render(vtkRenderer* ren, vtkActor* act) override;
57 
63  vtkHardwareSelector* sel, std::vector<unsigned int>& pixeloffsets, vtkProp* prop) override;
64 
65 protected:
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 
83 
84  // create the table for opacity values
86 
87  // create the table for scale values
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 
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
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:47
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store vtkAlgorithm input/output information.
draw PointGaussians using imposters
void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel, std::vector< unsigned int > &pixeloffsets, vtkProp *prop) override
allows a mapper to update a selections color buffers Called from a prop which in turn is called from ...
std::vector< std::vector< unsigned int > > PickPixels
bool HasTranslucentPolygonalGeometry() override
Based on emissive setting.
void Render(vtkRenderer *ren, vtkActor *act) override
This calls RenderPiece (in a for loop if streaming is necessary).
vtkExecutive * CreateDefaultExecutive() override
We need to override this method because the standard streaming demand driven pipeline may not be what...
std::vector< vtkOpenGLPointGaussianMapperHelper * > Helpers
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
void RenderPiece(vtkRenderer *, vtkActor *) override
Implemented by sub classes.
void CopyMapperValuesToHelper(vtkOpenGLPointGaussianMapperHelper *helper)
void ComputeBounds() override
Need to loop over the hierarchy to compute bounds.
~vtkOpenGLPointGaussianMapper() override
void ReportReferences(vtkGarbageCollector *collector) override
void RenderInternal(vtkRenderer *, vtkActor *)
static vtkOpenGLPointGaussianMapper * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLPointGaussianMapperHelper * CreateHelper()
int FillInputPortInformation(int port, vtkInformation *info) override
Need to define the type of data handled by this mapper.
draw PointGaussians using imposters
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:54
abstract specification for renderers
Definition: vtkRenderer.h:68
record modification and/or execution time
Definition: vtkTimeStamp.h:33
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453