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:
{
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:2735
GenericDataTemplate< false > GenericData
Definition: genericdata.h:223
#define iferr_scope
Definition: resultbase.h:1389
#define iferr_return
Definition: resultbase.h:1524
Definition: materialmapping.h:119
Id _source
Definition: materialmapping.h:120
Id _target
Definition: materialmapping.h:121
Class< MaterialMappingRef > _class
Definition: materialmapping.h:122