14#include "arcane/core/materials/IMeshMaterialMng.h"
16#include "arcane/utils/Ref.h"
17#include "arcane/utils/FatalErrorException.h"
19#include "arcane/core/IMesh.h"
20#include "arcane/core/MeshHandle.h"
42 global_mesh_material_mng_factory = f;
53 auto* f = global_mesh_material_mng_factory;
56 ARCANE_FATAL(
"No factory for 'IMeshMaterialMng': You need to link with 'arcane_materials' library");
59 return f->getTrueReference(mesh_handle, is_create);
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Interface for the material and environment manager of a mesh.
static Ref< IMeshMaterialMng > getTrueReference(const MeshHandle &mesh_handle, bool create=true)
Retrieves or creates the reference associated with mesh.
static void _internalSetFactory(IFactory *f)
static IMeshMaterialMng * getReference(const MeshHandleOrMesh &mesh_handle, bool create=true)
Retrieves or creates the reference associated with mesh.
Compatibility class to hold a MeshHandle or an IMesh*.
const MeshHandle & handle() const
Associated handle.
bool isNull() const
Indicates if the handle is null (it does not reference any existing mesh or not).
Reference to an instance.
Always enables tracing in Arcane parts concerning materials.