18#ifndef vtkCellGridRenderRequest_h
19#define vtkCellGridRenderRequest_h
21#include "vtkRenderingCoreModule.h"
25#include <unordered_map>
27VTK_ABI_NAMESPACE_BEGIN
131 template <
typename StateType>
134 auto it = this->
State.find(cellType);
135 if (it != this->
State.end())
137 return static_cast<StateType*
>(it->second.get());
142 it = this->
State.insert(std::make_pair(cellType, std::unique_ptr<BaseState>(
new StateType)))
144 return static_cast<StateType*
>(it->second.get());
160 std::unordered_map<vtkStringToken, std::unique_ptr<BaseState>>
State;
represents an object (geometry & properties) in a rendered scene
map a vtkCellGrid to graphics primitives.
vtkCellGridQuery()=default
virtual ~BaseState()=default
virtual void SetMapper(vtkCellGridMapper *mapper)
Set/get the mapper which owns this request (so responders can inspect its configuration).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
RenderableGeometry
An enumeration of which shapes to render.
~vtkCellGridRenderRequest() override
static vtkCellGridRenderRequest * New()
vtkCellGridMapper * Mapper
virtual void SetActor(vtkActor *actor)
Set/get the actor which responders should use to draw cells.
StateType * GetState(vtkStringToken cellType, bool create=true)
Return a state object of the given type.
virtual void SetWindow(vtkWindow *window)
Set/get a window (used when IsReleasingResources is true).
vtkCellGridRenderRequest()=default
bool Initialize() override
This is invoked before processing any cell types during a render.
std::unordered_map< vtkStringToken, std::unique_ptr< BaseState > > State
bool Finalize() override
This is invoked after processing all cell types during a render.
bool IsReleasingResources
virtual void SetRenderer(vtkRenderer *renderer)
Set/get the renderer responders should use to draw cells.
a simple class to control print indentation
abstract specification for renderers
Represent a string by its integer hash.
window superclass for vtkRenderWindow