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:
52 
53  void ORenderPoly(void* renderer, vtkOSPRayActorNode* aNode, vtkPolyData* poly,
54  double* ambientColor, double* diffuseColor, double opacity, std::string material);
55 
57  {
58  public:
60  vtkOSPRayCacheItemGeometries(const std::vector<OSPGeometry>& geometries_)
61  : GeometriesAtTime(geometries_)
62  {
63  }
64 
66 
67  std::vector<OSPGeometry> GeometriesAtTime;
68  };
69 
70  std::vector<OSPGeometry> Geometries;
72 
74  vtkOSPRayCache<vtkOSPRayCacheItemObject>* InstanceCache{ nullptr };
75 
79  void PopulateCache();
80 
86 
89 
90 private:
92  void operator=(const vtkOSPRayPolyDataMapperNode&) = delete;
93 };
94 
95 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
links vtkActor and vtkMapper to OSPRay
temporal cache ospray structures to speed flipbooks
vtkOSPRayCacheItemGeometries(const std::vector< OSPGeometry > &geometries_)
links vtkActor and vtkMapper to OSPRay
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ORenderPoly(void *renderer, vtkOSPRayActorNode *aNode, vtkPolyData *poly, double *ambientColor, double *diffuseColor, double opacity, std::string material)
void PopulateCache()
adds geometries to ospray cache
void RenderGeometries()
add computed ospray geometries to renderer model.
static vtkOSPRayPolyDataMapperNode * New()
~vtkOSPRayPolyDataMapperNode() override
std::vector< OSPGeometry > Geometries
virtual void Render(bool prepass) override
Make ospray calls to render me.
virtual void Invalidate(bool prepass) override
Invalidates cached rendering data.
vtkViewNode specialized for vtkPolyDataMappers
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
@ diffuseColor
Definition: vtkX3D.h:246
@ string
Definition: vtkX3D.h:496