VTK  9.3.20240418
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:
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 
59 
63  void SetNumberOfLOD(vtkIdType nb) override;
64 
74  vtkIdType index, float distance, float targetReduction) override;
76 
77 protected:
80 
84  virtual void Render(vtkRenderer*, vtkActor*, vtkDataSet*);
85 
91 
93 
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
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:151
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:29
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkGlyph3D on the GPU.
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:137
PolyDataMapper using OpenGL to render.
vtkOpenGLGlyph3D on the GPU.
vtkIdType GetMaxNumberOfLOD() override
Get the maximum number of LOD.
void Render(vtkRenderer *ren, vtkActor *a) override
Method initiates the mapping process.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetLODDistanceAndTargetReduction(vtkIdType index, float distance, float targetReduction) override
Configure LODs.
~vtkOpenGLGlyph3DMapper() override
static vtkOpenGLGlyph3DMapper * New()
virtual void Render(vtkRenderer *, vtkActor *, vtkDataSet *)
Render setup.
void RenderChildren(vtkRenderer *renderer, vtkActor *actor, vtkDataObject *dobjTree, unsigned int &flatIndex)
Renders children of the given dobjTree recursively.
void CopyInformationToSubMapper(vtkOpenGLGlyph3DHelper *)
Send mapper ivars to sub-mapper.
void SetNumberOfLOD(vtkIdType nb) override
Set the number of LOD.
virtual void RebuildStructures(vtkOpenGLGlyph3DMapperSubArray *subarray, vtkIdType numPts, vtkActor *actor, vtkDataSet *dataset, vtkBitArray *maskArray)
Build data structures associated with.
vtkOpenGLGlyph3DMapperArray * GlyphValues
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this mapper.
abstract specification for renderers
Definition: vtkRenderer.h:172
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
@ Color
Definition: vtkX3D.h:46
@ index
Definition: vtkX3D.h:246
int vtkIdType
Definition: vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270