VTK  9.7.1
vtkCompositeCellGridMapper.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
22 #ifndef vtkCompositeCellGridMapper_h
23 #define vtkCompositeCellGridMapper_h
24 
25 #include "vtkMapper.h"
26 
27 #include "vtkCompositeDataDisplayAttributes.h" // for ivar
28 #include "vtkRenderingCoreModule.h" // For export macro.
29 #include "vtkSmartPointer.h" // for ivar
30 #include "vtkStateStorage.h" // for ivar
31 #include "vtkStringToken.h" // For ivars
32 
33 #include <memory> // for ivar
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkCellGridMapper;
37 class vtkInformation;
38 class vtkRenderer;
39 class vtkActor;
40 
41 class VTKRENDERINGCORE_EXPORT vtkCompositeCellGridMapper : public vtkMapper
42 {
43 
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
53  void Render(vtkRenderer* ren, vtkActor* a) override;
54 
56 
59  double* GetBounds() VTK_SIZEHINT(6) override;
60  void GetBounds(double bounds[6]) override { this->Superclass::GetBounds(bounds); }
62 
66  void ReleaseGraphicsResources(vtkWindow*) override;
67 
69 
74  bool HasOpaqueGeometry() override;
75  bool RecursiveHasTranslucentGeometry(vtkDataObject* dobj, unsigned int& flat_index);
76  bool HasTranslucentPolygonalGeometry() override;
78 
80  vtkSetStringTokenMacro(ProcessIdAttributeName);
81  vtkGetStringTokenMacro(ProcessIdAttributeName);
83  vtkSetStringTokenMacro(CompositeIdAttributeName);
84  vtkGetStringTokenMacro(CompositeIdAttributeName);
86  vtkSetStringTokenMacro(PointIdAttributeName);
87  vtkGetStringTokenMacro(PointIdAttributeName);
89  vtkSetStringTokenMacro(CellIdAttributeName);
90  vtkGetStringTokenMacro(CellIdAttributeName);
91 
96  void SetProcessIdArrayName(const char*) {}
97  void SetCompositeIdArrayName(const char*) {}
98  void SetPointIdArrayName(const char*) {}
99  void SetCellIdArrayName(const char*) {}
100 
110  vtkGetSmartPointerMacro(CompositeDataDisplayAttributes, vtkCompositeDataDisplayAttributes);
111  virtual void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes*);
112 
114  vtkMTimeType GetMTime() override;
115 
116 protected:
118  ~vtkCompositeCellGridMapper() override;
119 
126 
130  int FillInputPortInformation(int port, vtkInformation* info) override;
131 
136  void BuildRenderValues(
137  vtkRenderer* renderer, vtkActor* actor, vtkDataObject* dobj, unsigned int& flatIndex);
138 
142  virtual vtkCellGridMapper* MakeAMapper();
143 
147  void ComputeBounds();
148 
153 
154  // State at the time translucent tests were performed.
156  // State at the time render values were built.
158  // Temporary state used for comparisons against above states.
160  // Cached result of HasTranslucentPolygonalGeometry
161  bool HasTranslucentGeometry = false;
162 
169 
170 private:
172  void operator=(const vtkCompositeCellGridMapper&) = delete;
173 
174  class vtkInternals;
175  std::unique_ptr<vtkInternals> Internals;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
void GetBounds(T a, double bds[6])
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
record modification and/or execution time
Definition: vtkTimeStamp.h:24
Rendering attributes for a multi-block dataset.
void SetProcessIdArrayName(const char *)
FIXME: These are temporary.
virtual bool HasOpaqueGeometry()
Some introspection on the type of data the mapper will render used by props to determine if they shou...
virtual bool HasTranslucentPolygonalGeometry()
Some introspection on the type of data the mapper will render used by props to determine if they shou...
abstract specification for renderers
Definition: vtkRenderer.h:63
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:39
vtkTimeStamp BoundsMTime
Time stamp for computation of bounds.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
vtkSmartPointer< vtkCompositeDataDisplayAttributes > CompositeDataDisplayAttributes
a simple class to control print indentation
Definition: vtkIndent.h:28
map a vtkCellGrid to graphics primitives.
a class that renders hierarchical cell-grid data
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime() override
Overload standard modified time function.
Represent a string by its integer hash.
#define VTK_SIZEHINT(...)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
vtkStringToken ProcessIdAttributeName
Names of attributes.
static vtkAlgorithm * New()
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
general representation of visualization data
Definition: vtkDataObject.h:55
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.
Class to make storing and comparing state quick and easy.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
Definition: vtkMapper.h:105