MOS
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mos::gfx::Mesh Class Referencefinal

Geometric data description, vertices and indices. More...

#include <mesh.hpp>

Inheritance diagram for mos::gfx::Mesh:
mos::gfx::Shape

Public Types

using Positions = std::vector< glm::vec3 >
 
using Time_point = std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds >
 

Public Member Functions

template<class Tv , class Te >
 Mesh (const Tv vertices_begin, const Tv vertices_end, Te indices_begin, Te indices_end)
 
 Mesh (const std::initializer_list< Vertex > &vertices, const std::initializer_list< Triangle_indices > &triangles)
 
auto clear () -> void
 Erease all vertices and indices. More...
 
auto positions () const -> Positions
 Get only positions from vertices.
 
auto mix (const Mesh &mesh1, const Mesh &mesh2, float amount) -> void
 
auto apply_transform (const glm::mat4 &transform) -> void
 
auto calculate_normals () -> void
 
auto calculate_flat_normals () -> void
 
auto calculate_tangents () -> void
 
auto calculate_sphere () -> void
 
auto centroid () const -> glm::vec3
 
auto radius () const -> float
 
- Public Member Functions inherited from mos::gfx::Shape
auto id () const -> unsigned int
 Unique id. More...
 

Static Public Member Functions

static auto load (const std::string &path) -> Mesh
 Load from *.mesh file. More...
 

Public Attributes

Tracked_container< Vertexvertices
 
Tracked_container< Triangle_indices > indices
 

Detailed Description

Geometric data description, vertices and indices.

Member Function Documentation

◆ clear()

auto mos::gfx::Mesh::clear ( ) -> void

Erease all vertices and indices.

◆ load()

static auto mos::gfx::Mesh::load ( const std::string &  path) -> Mesh
static

Load from *.mesh file.

Parameters
pathFull path

The documentation for this class was generated from the following file: