MaterialMappingDescription Struct Reference

#include <materialmapping.h>

Detailed Description

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;
maxon::Result<void> MyMapping::Register()
{
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 maxon::OK;
}
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

Public Attributes

Id _source
 
Id _target
 
Class< MaterialMappingRef > _class
 

Member Data Documentation

◆ _source

Id _source

◆ _target

Id _target

◆ _class

Class<MaterialMappingRef> _class