Antkeeper  0.0.1
Namespaces | Functions
mesh-functions.cpp File Reference
#include <engine/geom/mesh-functions.hpp>
#include <engine/utility/fundamental-types.hpp>
#include <unordered_map>
#include <vector>

Go to the source code of this file.

Namespaces

 geom
 Geometric algorithms.
 

Functions

void geom::create_triangle_mesh (mesh &mesh, const std::vector< float3 > &vertices, const std::vector< std::array< std::uint_fast32_t, 3 >> &triangles)
 Creates a triangle mesh from a list of vertices and indices. More...
 
void geom::calculate_face_normals (float3 *normals, const mesh &mesh)
 Calculates normals for each face. More...
 
float3 geom::calculate_face_normal (const mesh::face &face)
 
void geom::calculate_vertex_tangents (float4 *tangents, const float2 *texcoords, const float3 *normals, const mesh &mesh)
 Calculates smooth tangents per-vertex. More...
 
box< float > geom::calculate_bounds (const mesh &mesh)
 Calculates the AABB bounds of a mesh. More...
 
mesh::vertex * geom::poke_face (mesh &mesh, std::size_t index)
 Triangulates a face by adding a new vertex in the center, then creating triangles between the edges of the original face and the new vertex. More...