16 #ifndef vtkOSPRayMaterialLibrary_h
17 #define vtkOSPRayMaterialLibrary_h
20 #include "vtkRenderingRayTracingModule.h"
22 #include <initializer_list>
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkOSPRayMaterialLibraryInternals;
50 bool ReadFile(
const char* FileName);
58 const char* WriteBuffer(
bool writeImageInline =
true);
66 void WriteFile(
const std::string& filename,
bool writeImageInline =
false);
73 bool ReadBuffer(
const char* Buffer);
78 std::set<std::string> GetMaterialNames();
88 std::vector<std::string> GetDoubleShaderVariableList(
const std::string& nickname);
93 std::vector<double> GetDoubleShaderVariable(
99 std::vector<std::string> GetTextureList(
const std::string& nickname);
160 void RemoveAllTextures(
const std::string& nickname);
167 void AddShaderVariable(
170 const std::initializer_list<double>&
data)
172 this->AddShaderVariable(nickname, variablename, static_cast<int>(data.size()), data.begin());
186 void RemoveAllShaderVariables(
const std::string& nickname);
209 static const std::map<std::string, ParametersMap>& GetParametersDictionary();
215 bool InternalParse(
const char*
name,
bool IsFile);
216 bool InternalParseJSON(
const char*
name,
bool IsFile, std::istream* doc);
217 bool InternalParseMTL(
const char*
name,
bool IsFile, std::istream* doc);
218 bool ReadTextureFileOrData(
const std::string& texFilenameOrData,
bool fromfile,
226 vtkOSPRayMaterialLibraryInternals* Internal;
229 VTK_ABI_NAMESPACE_END
ParameterType
Lists all different parameter types.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::map< std::string, ParameterType > ParametersMap
a collection of materials for vtk apps to draw from
a simple class to control print indentation
handles properties associated with a texture map
void AddShaderVariable(const std::string &nickname, const std::string &variablename, const std::initializer_list< double > &data)
Add control variable Adds a new control variable.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...