Class mesh

Class Documentation

class legion::core::mesh

Raw mesh representation.

Public Members

std::string filePath
std::vector<math::vec3> vertices
std::vector<math::color> colors
std::vector<math::vec3> normals
std::vector<math::vec2> uvs
std::vector<math::vec3> tangents
std::vector<uint> indices
std::vector<sub_mesh> submeshes

Public Static Functions

static void to_resource(filesystem::basic_resource *resource, const mesh &value)

Standard to resource conversion.

static void from_resource(mesh *value, const filesystem::basic_resource &resource)

Standard from resource conversion.

static void calculate_tangents(mesh *data)

Calculate the tangents from the triangles, vertices and normals of a certain mesh.