Go to the documentation of this file.
28 #ifndef vtkOSPRayMaterialLibrary_h
29 #define vtkOSPRayMaterialLibrary_h
31 #include "vtkRenderingOSPRayModule.h"
34 #include <initializer_list>
38 class vtkOSPRayMaterialLibraryInternals;
112 int numVars,
const double *x);
115 const std::initializer_list<double>&
data)
117 this->AddShaderVariable(nickname, variablename,
118 static_cast<int>(
data.size()),
data.begin());
135 vtkOSPRayMaterialLibraryInternals *Internal;
virtual ~vtkOSPRayMaterialLibrary()
bool ReadBuffer(const char *Buffer)
DeSerialize contents from an in memory buffer as ReadFile does from a file or set of files.
vtkOSPRayMaterialLibrary()
const char * WriteBuffer()
Serialize contents to an in memory buffer.
abstract base class for most VTK objects
void AddShaderVariable(const std::string &nickname, const std::string &variablename, int numVars, const double *x)
Add control variable Adds a new control variable.
static vtkOSPRayMaterialLibrary * New()
std::vector< double > GetDoubleShaderVariable(const std::string &nickname, const std::string &varname)
Returns a unform variable, the name format is nickname:varname.
void Fire()
Called to kick off events in all followers.
handles properties associated with a texture map
bool ReadFile(const char *FileName)
Reads the given file of materials and creates the in memory data structures needed to display objects...
bool InternalParseJSON(const char *name, bool IsFile, std::istream *doc)
a simple class to control print indentation
a collection of materials for vtk apps to draw from
std::set< std::string > GetMaterialNames()
Returns the set of material nicknames.
std::string LookupImplName(const std::string &nickname)
Return an implementation name for the given material nickname.
void AddShaderVariable(const std::string &nickname, const std::string &variablename, const std::initializer_list< double > &data)
Add control variable Adds a new control variable.
void AddTexture(const std::string &nickname, const std::string &texturename, vtkTexture *tex)
Add Texture Adds a new texture.
bool InternalParseMTL(const char *name, bool IsFile, std::istream *doc)
void AddMaterial(const std::string &nickname, const std::string &implname)
Add Material Adds a new material nickname to the set of known materials.
bool InternalParse(const char *name, bool IsFile)
vtkTexture * GetTexture(const std::string &nickname, const std::string &varname)
Returns a texture, the name format is nickname:varname.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.