25 #ifndef vtkOSPRayMaterialLibrary_h
26 #define vtkOSPRayMaterialLibrary_h
29 #include "vtkRenderingRayTracingModule.h"
31 #include <initializer_list>
36 class vtkOSPRayMaterialLibraryInternals;
140 const std::initializer_list<double>&
data)
142 this->AddShaderVariable(nickname, variablename,
static_cast<int>(
data.size()),
data.begin());
193 vtkOSPRayMaterialLibraryInternals* Internal;
a simple class to control print indentation
a collection of materials for vtk apps to draw from
void RemoveMaterial(const std::string &nickname)
Remove Material Removes a material nickname from the set of known materials.
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 const std::map< std::string, ParametersMap > & GetParametersDictionary()
Get the dictionary of all possible materials based on OSPRay documentation.
bool ReadBuffer(const char *Buffer)
DeSerialize contents from an in memory buffer as ReadFile does from a file or set of files.
bool InternalParseJSON(const char *name, bool IsFile, std::istream *doc)
vtkOSPRayMaterialLibrary()
std::string LookupImplName(const std::string &nickname)
Return an implementation name for the given material nickname.
std::set< std::string > GetMaterialNames()
Returns the set of material nicknames.
bool InternalParseMTL(const char *name, bool IsFile, std::istream *doc)
void RemoveAllTextures(const std::string &nickname)
Remove all textures of a specific material.
void RemoveShaderVariable(const std::string &nickname, const std::string &variablename)
Remove control variable Removes a new control variable.
static vtkOSPRayMaterialLibrary * New()
std::vector< std::string > GetDoubleShaderVariableList(const std::string &nickname)
Returns list of variable names set for a specific material.
std::vector< std::string > GetTextureList(const std::string &nickname)
Returns list of texture names set for a specific material.
bool InternalParse(const char *name, bool IsFile)
void AddMaterial(const std::string &nickname, const std::string &implname)
Add Material Adds a new material nickname to the set of known materials.
std::map< std::string, ParameterType > ParametersMap
void RemoveTexture(const std::string &nickname, const std::string &texturename)
Remove Texture Removes a texture.
void AddShaderVariable(const std::string &nickname, const std::string &variablename, int numVars, const double *x)
Add control variable Adds a new control variable.
vtkTexture * GetTexture(const std::string &nickname, const std::string &varname)
Returns a texture.
void AddTexture(const std::string &nickname, const std::string &texturename, vtkTexture *tex)
Add Texture Adds a new texture.
std::vector< double > GetDoubleShaderVariable(const std::string &nickname, const std::string &varname)
Returns a uniform variable.
virtual ~vtkOSPRayMaterialLibrary()
void RemoveAllShaderVariables(const std::string &nickname)
Remove all control variables of a specific material.
ParameterType
Lists all different parameter types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool ReadFile(const char *FileName)
Reads the given file of materials and creates the in memory data structures needed to display objects...
void Fire()
Called to kick off events in all followers.
const char * WriteBuffer()
Serialize contents to an in memory buffer.
abstract base class for most VTK objects
handles properties associated with a texture map