The basic mesh for transfering mesh geometry and colours. More...
#include <simple-mesh.hh>
Public Member Functions | |
| simple_mesh_t () | |
| constructor (for vectors) | |
| simple_mesh_t (const std::string &name_in) | |
| constructor with name | |
| simple_mesh_t (const std::vector< api::vnc_vertex > &vertices_in, const std::vector< g_triangle > &triangles_in) | |
| simple_mesh_t (const cylinder &cyl) | |
| void | translate (const glm::vec3 &t) |
| void | add_submesh (const simple_mesh_t &submesh) |
| utilty function | |
| void | fill_colour_map () |
| void | export_to_gltf (const std::string &file_name, float roughness_factor, float smoothness_factor, bool use_binary_format) const |
| export to glTF | |
| void | set_name (const std::string &n) |
| void | scale (float scale_factor) |
| void | change_colour (const glm::vec4 &c) |
| void | clear () |
| std::string | vandt () const |
Static Public Member Functions | |
| static simple_mesh_t | make_sphere () |
Public Attributes | |
| int | status |
check this status before using a simple_mesh_t. 1 is good, 0 is bad (0 is set when when we get a bad_alloc) | |
| std::vector< api::vnc_vertex > | vertices |
| vertices | |
| std::vector< g_triangle > | triangles |
| vertex index triples | |
| std::string | name |
| mesh name | |
| std::map< int, glm::vec4 > | colour_index_to_colour_map |
The basic mesh for transfering mesh geometry and colours.
| void coot::simple_mesh_t::fill_colour_map | ( | ) |
if the colour map is empty then go through the vector of vertices findling colours and putting them into a colour table. This is for Blender - where the colour are assigned to a Material, and a Material is assigned to a face