VTK  9.0.1
vtkOSPRayPolyDataMapperNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOSPRayPolyDataMapperNode.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkOSPRayPolyDataMapperNode_h
23 #define vtkOSPRayPolyDataMapperNode_h
24 
25 #include "vtkOSPRayCache.h" // For common cache infrastructure
26 #include "vtkPolyDataMapperNode.h"
27 #include "vtkRenderingRayTracingModule.h" // For export macro
28 
29 class vtkOSPRayActorNode;
30 class vtkPolyData;
31 
32 class VTKRENDERINGRAYTRACING_EXPORT vtkOSPRayPolyDataMapperNode : public vtkPolyDataMapperNode
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  virtual void Render(bool prepass) override;
43 
47  virtual void Invalidate(bool prepass) override;
48 
49 protected:
51  ~vtkOSPRayPolyDataMapperNode() override;
52 
53  void ORenderPoly(void* renderer, vtkOSPRayActorNode* aNode, vtkPolyData* poly,
54  double* ambientColor, double* diffuseColor, double opacity, std::string material);
55 
57  {
58  public:
59  vtkOSPRayCacheItemGeometries() = default;
60  vtkOSPRayCacheItemGeometries(const std::vector<OSPGeometry>& geometries_)
61  : GeometriesAtTime(geometries_)
62  {
63  }
64 
65  ~vtkOSPRayCacheItemGeometries() = default;
66 
67  std::vector<OSPGeometry> GeometriesAtTime;
68  };
69 
70  std::vector<OSPGeometry> Geometries;
71  void ClearGeometries();
72 
74  vtkOSPRayCache<vtkOSPRayCacheItemObject>* InstanceCache{ nullptr };
75 
79  void PopulateCache();
80 
85  void RenderGeometries();
86 
89 
90 private:
92  void operator=(const vtkOSPRayPolyDataMapperNode&) = delete;
93 };
94 
95 #endif
vtkOSPRayPolyDataMapperNode::UseGeometryCache
bool UseGeometryCache
Definition: vtkOSPRayPolyDataMapperNode.h:88
vtkPolyDataMapperNode
vtkViewNode specialized for vtkPolyDataMappers
Definition: vtkPolyDataMapperNode.h:36
vtkOSPRayPolyDataMapperNode::UseInstanceCache
bool UseInstanceCache
Definition: vtkOSPRayPolyDataMapperNode.h:87
vtkOSPRayPolyDataMapperNode
links vtkActor and vtkMapper to OSPRay
Definition: vtkOSPRayPolyDataMapperNode.h:32
vtkPolyDataMapperNode::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataMapperNode::New
static vtkPolyDataMapperNode * New()
vtkOSPRayPolyDataMapperNode::vtkOSPRayCacheItemGeometries
Definition: vtkOSPRayPolyDataMapperNode.h:56
vtkOSPRayActorNode
links vtkActor and vtkMapper to OSPRay
Definition: vtkOSPRayActorNode.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkViewNode::Render
virtual void Render(bool)
Makes calls to make self visible.
Definition: vtkViewNode.h:63
vtkOSPRayPolyDataMapperNode::vtkOSPRayCacheItemGeometries::vtkOSPRayCacheItemGeometries
vtkOSPRayCacheItemGeometries(const std::vector< OSPGeometry > &geometries_)
Definition: vtkOSPRayPolyDataMapperNode.h:60
vtkOSPRayPolyDataMapperNode::Geometries
std::vector< OSPGeometry > Geometries
Definition: vtkOSPRayPolyDataMapperNode.h:70
vtkOSPRayPolyDataMapperNode::vtkOSPRayCacheItemGeometries::GeometriesAtTime
std::vector< OSPGeometry > GeometriesAtTime
Definition: vtkOSPRayPolyDataMapperNode.h:67
vtkX3D::diffuseColor
@ diffuseColor
Definition: vtkX3D.h:246
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkOSPRayCache
temporal cache ospray structures to speed flipbooks
Definition: vtkOSPRayCache.h:39
vtkOSPRayCache.h
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkPolyDataMapperNode.h
vtkViewNode::Invalidate
virtual void Invalidate(bool)
Clear any cached data.
Definition: vtkViewNode.h:68