|
Easy3D 3.0.0
|
CPU-side snapshot of diffuse materials imported from an OBJ/MTL file. More...
#include <obj_materials.h>
Classes | |
| struct | Part |
| Tessellated geometry and material properties for one OBJ material group. More... | |
Public Member Functions | |
| void | create_drawables () const |
| Create one renderer drawable per imported material part. | |
Public Attributes | |
| std::shared_ptr< SurfaceMesh > | mesh |
| Mesh used to resolve material groups. | |
| std::vector< Part > | parts |
| Imported material-group snapshots. | |
CPU-side snapshot of diffuse materials imported from an OBJ/MTL file.
Loading requires no graphics context. Parts contain tessellated, seam-preserving attributes and describe the mesh at load time. Reload or rebuild the snapshot after changing mesh topology or attributes.
| void create_drawables | ( | ) | const |
Create one renderer drawable per imported material part.
Attach the mesh to a host with create_drawables=false first. Texture representation follows the host renderer backend. Existing drawables with matching names cause std::logic_error; they are not replaced.
| std::logic_error | if the mesh has no attached renderer or a part drawable name is already in use. |