VTK  9.4.20241221
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
35VTK_ABI_NAMESPACE_BEGIN
37class vtkInformation;
38class vtkRenderer;
39class vtkActor;
40
41class VTKRENDERINGCORE_EXPORT vtkCompositeCellGridMapper : public vtkMapper
42{
43
44public:
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
67
69
74 bool HasOpaqueGeometry() override;
75 bool RecursiveHasTranslucentGeometry(vtkDataObject* dobj, unsigned int& flat_index);
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
112
115
116protected:
119
126
130 int FillInputPortInformation(int port, vtkInformation* info) override;
131
137 vtkRenderer* renderer, vtkActor* actor, vtkDataObject* dobj, unsigned int& flatIndex);
138
143
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
170private:
172 void operator=(const vtkCompositeCellGridMapper&) = delete;
173
174 class vtkInternals;
175 std::unique_ptr<vtkInternals> Internals;
176};
177
178VTK_ABI_NAMESPACE_END
179#endif
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
map a vtkCellGrid to graphics primitives.
a class that renders hierarchical cell-grid data
vtkTimeStamp BoundsMTime
Time stamp for computation of bounds.
void BuildRenderValues(vtkRenderer *renderer, vtkActor *actor, vtkDataObject *dobj, unsigned int &flatIndex)
This is the build method for creating the internal polydata mapper that do the actual work.
vtkGetStringTokenMacro(PointIdAttributeName)
vtkGetStringTokenMacro(ProcessIdAttributeName)
vtkSmartPointer< vtkCompositeDataDisplayAttributes > CompositeDataDisplayAttributes
bool HasOpaqueGeometry() override
Some introspection on the type of data the mapper will render used by props to determine if they shou...
virtual void SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes *)
void ReleaseGraphicsResources(vtkWindow *) override
Release the underlying resources associated with this mapper.
static vtkCompositeCellGridMapper * New()
vtkMTimeType GetMTime() override
Account for mtime of vtkCompositeDataDisplayAttributes.
void SetProcessIdArrayName(const char *)
FIXME: These are temporary.
bool HasTranslucentPolygonalGeometry() override
Some introspection on the type of data the mapper will render used by props to determine if they shou...
vtkSetStringTokenMacro(CellIdAttributeName)
Set/get the name of the cell ID attribute used during selection.
vtkSetStringTokenMacro(PointIdAttributeName)
Set/get the name of the point ID attribute used during selection.
vtkStringToken ProcessIdAttributeName
Names of attributes.
~vtkCompositeCellGridMapper() override
vtkSetStringTokenMacro(ProcessIdAttributeName)
Set/get the name of the process ID attribute used during selection.
double * GetBounds() override
Standard vtkProp method to get 3D bounds of a 3D prop.
vtkGetStringTokenMacro(CompositeIdAttributeName)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExecutive * CreateDefaultExecutive() override
We need to override this method because the standard streaming demand driven pipeline is not what we ...
virtual vtkCellGridMapper * MakeAMapper()
BuildRenderValues uses this for each mapper.
void ComputeBounds()
Need to loop over the hierarchy to compute bounds.
vtkSetStringTokenMacro(CompositeIdAttributeName)
Set/get the name of the composite ID attribute used during selection.
bool RecursiveHasTranslucentGeometry(vtkDataObject *dobj, unsigned int &flat_index)
Some introspection on the type of data the mapper will render used by props to determine if they shou...
vtkGetStringTokenMacro(CellIdAttributeName)
void Render(vtkRenderer *ren, vtkActor *a) override
Standard method for rendering a mapper.
vtkGetSmartPointerMacro(CompositeDataDisplayAttributes, vtkCompositeDataDisplayAttributes)
Set/get a data structure that can be used to control per-object visibility, opacity,...
int FillInputPortInformation(int port, vtkInformation *info) override
Need to define the type of data handled by this mapper.
Rendering attributes for a multi-block dataset.
general representation of visualization data
Superclass for all pipeline executives in VTK.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
abstract class specifies interface to map data to graphics primitives
Definition vtkMapper.h:137
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.
Class to make storing and comparing state quick and easy.
Represent a string by its integer hash.
record modification and/or execution time
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_SIZEHINT(...)