MaterialMappingDescription defines the identifier / signature of a mapper within the registry. It defines the expected source and target material type and a factory for instantiation.
For example, a registration may look the following:
static GenericData g_myMappingRegistration;
{
description.
_source = maxon::NODESPACE::EXCHANGE::BUNDLE::VIEWPORTMATERIAL::GetId();
description.
_target = maxon::MATERIAL::PORTBUNDLE::STANDARDSURFACE::GetId();
description.
_class = GetClass();
g_myMappingRegistration = maxon::material::MaterialMappers::Register(GetDescriptor().GetId(), std::move(description))
iferr_return;
}
return OK
Definition: apibase.h:2690
#define iferr_scope
Definition: resultbase.h:1384
#define iferr_return
Definition: resultbase.h:1519
Definition: materialmapping.h:119
Id _source
Definition: materialmapping.h:120
Id _target
Definition: materialmapping.h:121
Class< MaterialMappingRef > _class
Definition: materialmapping.h:122