forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkOSPRayMaterialHelpers.h
73 lines (59 loc) · 2.36 KB
/
vtkOSPRayMaterialHelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOSPRayMaterial.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkOSPRayMaterialHelpers
* @brief convert vtk appearance controls to ospray materials
*
* Routines that convert vtk's appearance controlling state into ospray
* specific calls to create materials. The key piece of information is the
* vtkProperty::MaterialName, the rest is looked up from the
* vtkOSPRayMaterialLibrary singleton.
* The routines here are used by vtkOSPRayPolyDataMapperNode at render time.
*
* The contents here are private implementation details, and not meant to
* be part of VTK's public API.
*
* @sa vtkOSPRayMaterialLibrary
*/
#ifndef vtkOSPRayMaterialHelpers_h
#define vtkOSPRayMaterialHelpers_h
#include <map>
#include "ospray/ospray.h" // for ospray handle types
class vtkImageData;
class vtkOSPRayRendererNode;
namespace vtkOSPRayMaterialHelpers {
/**
* Manufacture an ospray texture from a 2d vtkImageData
*/
OSPTexture2D VTKToOSPTexture(vtkImageData *vColorTextureMap);
/**
* Construct a set of ospray materials for all of the material names.
*/
void MakeMaterials(vtkOSPRayRendererNode *orn,
OSPRenderer oRenderer,
std::map<std::string, OSPMaterial> &mats);
/**
* Construct one ospray material within the given renderer that
* corresponds to the visual characteristics set out in the named
* material in the material library.
*/
OSPMaterial MakeMaterial(vtkOSPRayRendererNode *orn,
OSPRenderer oRenderer,
std::string nickname);
/**
* Wraps ospNewMaterial or ospNewMaterial2, depending on OSPRay version.
*/
OSPMaterial NewMaterial(vtkOSPRayRendererNode *orn,
OSPRenderer oRenderer,
std::string ospMatName);
}
#endif
// VTK-HeaderTest-Exclude: vtkOSPRayMaterialHelpers.h