Radium Engine
1.5.20
|
Typedefs | |
using | AssetMaterialPtr = const Ra::Core::Asset::MaterialData* |
using | RadiumMaterialPtr = Ra::Engine::Data::Material* |
using | ConverterFunction = std::function<RadiumMaterialPtr( AssetMaterialPtr )> |
Functions | |
bool | registerMaterialConverter (const std::string &name, ConverterFunction converter) |
bool | removeMaterialConverter (const std::string &name) |
std::pair< bool, ConverterFunction > | getMaterialConverter (const std::string &name) |
bool | cleanup () |
Variables | |
static std::map< std::string, std::function< RadiumMaterialPtr(AssetMaterialPtr)> > | MaterialConverterRegistry |
Map that stores each conversion function. | |
A material converter is a couple <std::string, std::function<Ra::Engine::Material*(Ra::Core::Asset::MaterialData*)> where the string gives the mname of the material and the function is whatever is compatible with std::function :
using Ra::Engine::Data::EngineMaterialConverters::AssetMaterialPtr = const Ra::Core::Asset::MaterialData* |
Type of a pointer to an IO/ASSET representation of the material
Definition at line 45 of file MaterialConverters.hpp.
using Ra::Engine::Data::EngineMaterialConverters::ConverterFunction = std::function<RadiumMaterialPtr( AssetMaterialPtr )> |
Type of the conversion functor from IO/ASSET representation to Engine representation
Definition at line 54 of file MaterialConverters.hpp.
Type of a pointer to an Engine representation of the material
Definition at line 49 of file MaterialConverters.hpp.
RA_ENGINE_API bool Ra::Engine::Data::EngineMaterialConverters::cleanup | ( | ) |
Definition at line 45 of file MaterialConverters.cpp.
RA_ENGINE_API std::pair< bool, ConverterFunction > Ra::Engine::Data::EngineMaterialConverters::getMaterialConverter | ( | const std::string & | name | ) |
name | name of the material to convert |
Definition at line 35 of file MaterialConverters.cpp.
RA_ENGINE_API bool Ra::Engine::Data::EngineMaterialConverters::registerMaterialConverter | ( | const std::string & | name, |
ConverterFunction | converter ) |
register a new material converter
Definition at line 25 of file MaterialConverters.cpp.
RA_ENGINE_API bool Ra::Engine::Data::EngineMaterialConverters::removeMaterialConverter | ( | const std::string & | name | ) |
remove a material converter
Definition at line 30 of file MaterialConverters.cpp.
|
static |
Map that stores each conversion function.
Definition at line 23 of file MaterialConverters.cpp.