VTK  9.3.1
vtkOpenGLGlyph3DMapper.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
16 #ifndef vtkOpenGLGlyph3DMapper_h
17 #define vtkOpenGLGlyph3DMapper_h
18 
19 #include "vtkGlyph3DMapper.h"
20 
21 #include "vtkColor.h" // for ivar
22 #include "vtkDataObjectTree.h" // for arg
23 #include "vtkNew.h" // For vtkNew
24 #include "vtkRenderingOpenGL2Module.h" // For export macro
25 #include "vtkVector.h" // for ivar
26 
27 #include <stack> // for ivar
28 
29 VTK_ABI_NAMESPACE_BEGIN
31 class vtkBitArray;
32 
33 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLGlyph3DMapper : public vtkGlyph3DMapper
34 {
35 public:
36  static vtkOpenGLGlyph3DMapper* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
44  void Render(vtkRenderer* ren, vtkActor* a) override;
45 
51  void ReleaseGraphicsResources(vtkWindow* window) override;
52 
54 
58  vtkIdType GetMaxNumberOfLOD() override;
59 
63  void SetNumberOfLOD(vtkIdType nb) override;
64 
74  vtkIdType index, float distance, float targetReduction) override;
76 
77 protected:
79  ~vtkOpenGLGlyph3DMapper() override;
80 
84  virtual void Render(vtkRenderer*, vtkActor*, vtkDataSet*);
85 
90  void CopyInformationToSubMapper(vtkOpenGLGlyph3DHelper*);
91 
92  void SetupColorMapper();
93 
99  void RenderChildren(
100  vtkRenderer* renderer, vtkActor* actor, vtkDataObject* dobjTree, unsigned int& flatIndex);
101 
103 
104  class vtkOpenGLGlyph3DMapperEntry;
105  class vtkOpenGLGlyph3DMapperSubArray;
106  class vtkOpenGLGlyph3DMapperArray;
107  vtkOpenGLGlyph3DMapperArray* GlyphValues; // array of value for datasets
108 
112  virtual void RebuildStructures(vtkOpenGLGlyph3DMapperSubArray* subarray, vtkIdType numPts,
113  vtkActor* actor, vtkDataSet* dataset, vtkBitArray* maskArray);
114 
115  vtkMTimeType BlockMTime; // Last time BlockAttributes was modified.
116 
117 private:
119  void operator=(const vtkOpenGLGlyph3DMapper&) = delete;
120 
121  struct RenderBlockState
122  {
123  std::stack<double> Opacity;
124  std::stack<bool> Visibility;
125  std::stack<bool> Pickability;
126  std::stack<vtkColor3d> Color;
127  };
128  RenderBlockState BlockState;
129 };
130 
131 VTK_ABI_NAMESPACE_END
132 #endif
vtkOpenGLGlyph3D on the GPU.
static vtkGlyph3DMapper * New()
void Render(vtkRenderer *ren, vtkActor *act) override
All the work is done is derived classes.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
abstract specification for renderers
Definition: vtkRenderer.h:61
int vtkIdType
Definition: vtkType.h:315
vtkGlyph3D on the GPU.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
virtual vtkIdType GetMaxNumberOfLOD()
Get the maximum number of LOD.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkOpenGLGlyph3DMapperArray * GlyphValues
virtual void SetNumberOfLOD(vtkIdType vtkNotUsed(nb))
Set the number of LOD.
PolyDataMapper using OpenGL to render.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:76
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:28
virtual void SetLODDistanceAndTargetReduction(vtkIdType vtkNotUsed(index), float vtkNotUsed(distance), float vtkNotUsed(targetReduction))
Configure LODs.
general representation of visualization data
Definition: vtkDataObject.h:54
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:104