Struct mesh_t#

Struct Documentation#

struct mesh_t#

Describe a 3D surfacic mesh. A valid mesh fulfills these requirements:

  • points must not be empty and its length must be a multiple of 3 (3 times the number of points)

  • normals can be empty or its length must be 3 times the number of points

  • texture_coordinates can be empty or its length must be 2 times the number of points

  • face_sides can be any size including empty resulting in a point cloud

  • face_indices length must be the sum of all values in face_sides

Public Functions

F3D_EXPORT std::pair< bool, std::string > isValid () const

Check validity of the mesh. Returns a pair with the first element to true if the mesh is valid. If invalid, an error message is returned in the second element.

Public Members

std::vector<float> points#
std::vector<float> normals#
std::vector<float> texture_coordinates#
std::vector<unsigned int> face_sides#
std::vector<unsigned int> face_indices#