28#ifndef EASY3D_RENDERER_OBJ_MATERIALS_H
29#define EASY3D_RENDERER_OBJ_MATERIALS_H
31#include <easy3d/core/surface_mesh.h>
62 std::shared_ptr<SurfaceMesh>
mesh;
Definition collider.cpp:182
Vec< 3, float > vec3
A 3D point/vector of float type.
Definition types.h:44
ObjMaterialMesh load_obj_materials(const std::string &file)
Load OBJ geometry and its supported MTL diffuse material data.
Definition obj_materials.cpp:57
Tessellated geometry and material properties for one OBJ material group.
Definition obj_materials.h:45
std::vector< vec3 > positions
Tessellated vertex positions.
Definition obj_materials.h:52
std::string texture_file
Diffuse texture path; empty if no usable map or face UVs are available.
Definition obj_materials.h:51
std::vector< int > source_faces
Source mesh face ID for each tessellated triangle.
Definition obj_materials.h:59
std::string name
Material/group name used when creating the drawable.
Definition obj_materials.h:47
std::vector< unsigned int > indices
Triangle indices into the vertex arrays.
Definition obj_materials.h:57
std::vector< vec2 > texcoords
Tessellated vertex texture coordinates.
Definition obj_materials.h:55
std::vector< vec3 > normals
Definition obj_materials.h:53
vec3 diffuse
Diffuse color, defaulting to white.
Definition obj_materials.h:49
CPU-side snapshot of diffuse materials imported from an OBJ/MTL file.
Definition obj_materials.h:43
void create_drawables() const
Create one renderer drawable per imported material part.
Definition obj_materials.cpp:202
std::shared_ptr< SurfaceMesh > mesh
Mesh used to resolve material groups.
Definition obj_materials.h:62
std::vector< Part > parts
Imported material-group snapshots.
Definition obj_materials.h:64