VTK
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 =========================================================================*/
22 #ifndef vtkOpenGLPointGaussianMapper_h
23 #define vtkOpenGLPointGaussianMapper_h
24 
25 #include "vtkRenderingOpenGL2Module.h" // For export macro
26 #include "vtkPointGaussianMapper.h"
27 #include <vector> // for ivar
28 
29 class vtkOpenGLPointGaussianMapperHelper;
30 
31 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLPointGaussianMapper : public vtkPointGaussianMapper
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
43  void ReleaseGraphicsResources(vtkWindow *) override;
44 
48  bool GetIsOpaque() override;
49 
53  void Render(vtkRenderer *ren, vtkActor *act) override;
54 
60  std::vector<unsigned int> &pixeloffsets,
61  vtkProp *prop) override;
62 
63 protected:
65  ~vtkOpenGLPointGaussianMapper() override;
66 
67  void ReportReferences(vtkGarbageCollector* collector) override;
68 
69  std::vector<vtkOpenGLPointGaussianMapperHelper *> Helpers;
70  vtkOpenGLPointGaussianMapperHelper *CreateHelper();
71  void CopyMapperValuesToHelper(
72  vtkOpenGLPointGaussianMapperHelper *helper);
73 
75 
76  // unused
77  void RenderPiece(vtkRenderer *, vtkActor *) override {};
78 
79  void RenderInternal(vtkRenderer *, vtkActor *);
80 
81  // create the table for opacity values
82  void BuildOpacityTable();
83 
84  // create the table for scale values
85  void BuildScaleTable();
86 
87  float *OpacityTable; // the table
88  double OpacityScale; // used for quick lookups
89  double OpacityOffset; // used for quick lookups
90  float *ScaleTable; // the table
91  double ScaleScale; // used for quick lookups
92  double ScaleOffset; // used for quick lookups
93 
100 
104  int FillInputPortInformation(int port, vtkInformation* info) override;
105 
109  void ComputeBounds() override;
110 
111  // used by the hardware selector
112  std::vector<std::vector<unsigned int>> PickPixels;
113 
114 private:
116  void operator=(const vtkOpenGLPointGaussianMapper&) = delete;
117 };
118 
119 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:46
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
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:32
abstract specification for renderers
Definition: vtkRenderer.h:57
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:490
virtual bool GetIsOpaque()
Returns if the mapper does not expect to have translucent geometry.
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:46
static vtkPointGaussianMapper * New()
Detect and break reference loops.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
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:33
void RenderPiece(vtkRenderer *, vtkActor *) override
Implemented by sub classes.
std::vector< vtkOpenGLPointGaussianMapperHelper * > Helpers
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:108