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 
59  void ProcessSelectorPixelBuffers(vtkHardwareSelector *sel,
60  std::vector<unsigned int> &pixeloffsets,
61  vtkProp *prop) override;
62 
63 protected:
66 
67  void ReportReferences(vtkGarbageCollector* collector) override;
68 
69  std::vector<vtkOpenGLPointGaussianMapperHelper *> Helpers;
70  vtkOpenGLPointGaussianMapperHelper *CreateHelper();
71  void CopyMapperValuesToHelper(
72  vtkOpenGLPointGaussianMapperHelper *helper);
73 
74  vtkTimeStamp HelperUpdateTime;
75  vtkTimeStamp ScaleTableUpdateTime;
76  vtkTimeStamp OpacityTableUpdateTime;
77 
78  // unused
79  void RenderPiece(vtkRenderer *, vtkActor *) override {};
80 
82 
83  // create the table for opacity values
85 
86  // create the table for scale values
88 
89  float *OpacityTable; // the table
90  double OpacityScale; // used for quick lookups
91  double OpacityOffset; // used for quick lookups
92  float *ScaleTable; // the table
93  double ScaleScale; // used for quick lookups
94  double ScaleOffset; // used for quick lookups
95 
102 
107 
111  void ComputeBounds() override;
112 
113  // used by the hardware selector
114  std::vector<std::vector<unsigned int>> PickPixels;
115 
116 private:
118  void operator=(const vtkOpenGLPointGaussianMapper&) = delete;
119 };
120 
121 #endif
vtkOpenGLPointGaussianMapper::OpacityScale
double OpacityScale
Definition: vtkOpenGLPointGaussianMapper.h:90
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkPointGaussianMapper
draw PointGaussians using imposters
Definition: vtkPointGaussianMapper.h:38
vtkOpenGLPointGaussianMapper::OpacityOffset
double OpacityOffset
Definition: vtkOpenGLPointGaussianMapper.h:91
vtkOpenGLPointGaussianMapper::OpacityTable
float * OpacityTable
Definition: vtkOpenGLPointGaussianMapper.h:89
vtkPointGaussianMapper.h
vtkOpenGLPointGaussianMapper::CreateDefaultExecutive
vtkExecutive * CreateDefaultExecutive() override
We need to override this method because the standard streaming demand driven pipeline may not be what...
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkOpenGLPointGaussianMapper::PickPixels
std::vector< std::vector< unsigned int > > PickPixels
Definition: vtkOpenGLPointGaussianMapper.h:114
vtkOpenGLPointGaussianMapper::ScaleTable
float * ScaleTable
Definition: vtkOpenGLPointGaussianMapper.h:92
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkOpenGLPointGaussianMapper::ScaleScale
double ScaleScale
Definition: vtkOpenGLPointGaussianMapper.h:93
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:50
vtkOpenGLPointGaussianMapper::RenderInternal
void RenderInternal(vtkRenderer *, vtkActor *)
vtkHardwareSelector
Definition: vtkHardwareSelector.h:124
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkOpenGLPointGaussianMapper
draw PointGaussians using imposters
Definition: vtkOpenGLPointGaussianMapper.h:32
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:100
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkOpenGLPointGaussianMapper::BuildOpacityTable
void BuildOpacityTable()
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkOpenGLPointGaussianMapper::ComputeBounds
void ComputeBounds() override
Need to loop over the hierarchy to compute bounds.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkOpenGLPointGaussianMapper::New
static vtkOpenGLPointGaussianMapper * New()
vtkOpenGLPointGaussianMapper::ScaleOffset
double ScaleOffset
Definition: vtkOpenGLPointGaussianMapper.h:94
vtkOpenGLPointGaussianMapper::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Need to define the type of data handled by this mapper.
vtkOpenGLPointGaussianMapper::BuildScaleTable
void BuildScaleTable()