Skip to main content
Version: 🚧 Nightly

Structure f3d::mesh_t

Definition: types.h (line 318)

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

Members

Public attributes

Variable points

Definition: types.h (line 320)

std::vector<float> f3d::mesh_t::points

Type: std::vector< float >

Variable normals

Definition: types.h (line 321)

std::vector<float> f3d::mesh_t::normals

Type: std::vector< float >

Variable texture_coordinates

Definition: types.h (line 322)

std::vector<float> f3d::mesh_t::texture_coordinates

Type: std::vector< float >

Variable face_sides

Definition: types.h (line 323)

std::vector<unsigned int> f3d::mesh_t::face_sides

Type: std::vector< unsigned int >

Variable face_indices

Definition: types.h (line 324)

std::vector<unsigned int> f3d::mesh_t::face_indices

Type: std::vector< unsigned int >

Public functions

Function isValid

F3D_EXPORT std::pair< bool, std::string > f3d::mesh_t::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.

Return type: F3D_EXPORT std::pair< bool, std::string >