VTK
vtkOptiXPtxLoader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOptiXPtxLoader.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 =========================================================================*/
23 #ifndef vtkOptiXPtxLoader_h
24 #define vtkOptiXPtxLoader_h
25 
26 #include "vtkRenderingOptiXModule.h" // For export macro
27 
28 #include "vtkObject.h"
29 
30 namespace optix
31 {
32  class ProgramObj;
33  class ContextObj;
34 }
35 
36 struct vtkOptiXPtxLoaderInternals;
37 
38 class VTKRENDERINGOPTIX_EXPORT vtkOptiXPtxLoader : public vtkObject
39 {
40 public:
41 
42  static vtkOptiXPtxLoader* New();
43  vtkTypeMacro(vtkOptiXPtxLoader, vtkObject);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
49  static std::string GetFullPathToFile(const char* filename);
50 
54  void LoadPrograms(optix::ContextObj* ctx);
55 
57 
60  optix::ProgramObj* SphereIsectProgram;
61  optix::ProgramObj* SphereBoundsProgram;
62  optix::ProgramObj* CylinderIsectProgram;
63  optix::ProgramObj* CylinderBoundsProgram;
64  optix::ProgramObj* TriangleIsectProgram;
65  optix::ProgramObj* TriangleBoundsProgram;
66  optix::ProgramObj* ClosestHitProgram;
67  optix::ProgramObj* AnyHitProgram;
68  optix::ProgramObj* MissProgram;
69  optix::ProgramObj* RayGenProgram;
71 
72 protected:
73 
76 
77  vtkOptiXPtxLoaderInternals* Internals;
78 
79  optix::ProgramObj* LoadProgram(const char* filename, const char* entrypoint,
80  optix::ContextObj* ctx);
81 
82 private:
83 
84  vtkOptiXPtxLoader(const vtkOptiXPtxLoader&) = delete;
85  void operator=(const vtkOptiXPtxLoader&) = delete;
86 };
87 #endif
vtkOptiXPtxLoader::RayGenProgram
optix::ProgramObj * RayGenProgram
Definition: vtkOptiXPtxLoader.h:69
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkOptiXPtxLoader::SphereBoundsProgram
optix::ProgramObj * SphereBoundsProgram
Definition: vtkOptiXPtxLoader.h:61
vtkOptiXPtxLoader::ClosestHitProgram
optix::ProgramObj * ClosestHitProgram
Definition: vtkOptiXPtxLoader.h:66
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkOptiXPtxLoader::CylinderBoundsProgram
optix::ProgramObj * CylinderBoundsProgram
Definition: vtkOptiXPtxLoader.h:63
vtkOptiXPtxLoader
for loading of OptiX .ptx files
Definition: vtkOptiXPtxLoader.h:38
vtkOptiXPtxLoader::MissProgram
optix::ProgramObj * MissProgram
Definition: vtkOptiXPtxLoader.h:68
optix
Definition: vtkOptiXPtxLoader.h:30
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkOptiXPtxLoader::AnyHitProgram
optix::ProgramObj * AnyHitProgram
Definition: vtkOptiXPtxLoader.h:67
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOptiXPtxLoader::CylinderIsectProgram
optix::ProgramObj * CylinderIsectProgram
Definition: vtkOptiXPtxLoader.h:62
vtkObject.h
vtkX3D::string
Definition: vtkX3D.h:490
vtkOptiXPtxLoader::SphereIsectProgram
optix::ProgramObj * SphereIsectProgram
Convenience program handles.
Definition: vtkOptiXPtxLoader.h:60
vtkOptiXPtxLoader::Internals
vtkOptiXPtxLoaderInternals * Internals
Definition: vtkOptiXPtxLoader.h:77
vtkOptiXPtxLoader::TriangleBoundsProgram
optix::ProgramObj * TriangleBoundsProgram
Definition: vtkOptiXPtxLoader.h:65
vtkOptiXPtxLoader::TriangleIsectProgram
optix::ProgramObj * TriangleIsectProgram
Definition: vtkOptiXPtxLoader.h:64