MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
mesh_tools.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef MVE_MESH_TOOLS_HEADER
11#define MVE_MESH_TOOLS_HEADER
12
13#include "math/vector.h"
14#include "math/matrix.h"
15#include "mve/defines.h"
16#include "mve/mesh.h"
17
20
25void
26mesh_transform (TriangleMesh::Ptr mesh, math::Matrix3f const& rot);
27
33void
34mesh_transform (TriangleMesh::Ptr mesh, math::Matrix4f const& trans);
35
43void
44mesh_merge (TriangleMesh::ConstPtr mesh1, TriangleMesh::Ptr mesh2);
45
51void
52mesh_components (TriangleMesh::Ptr mesh, std::size_t vertex_threshold);
53
58void
59mesh_scale_and_center (TriangleMesh::Ptr mesh,
60 bool scale = true, bool center = true);
61
65void
66mesh_invert_faces (TriangleMesh::Ptr mesh);
67
72void
73mesh_find_aabb (TriangleMesh::ConstPtr mesh,
74 math::Vec3f& aabb_min, math::Vec3f& aabb_max);
75
80std::size_t
81mesh_delete_unreferenced (TriangleMesh::Ptr mesh);
82
85
86#endif /* MVE_MESH_TOOLS_HEADER */
Matrix class for arbitrary dimensions and types.
Definition matrix.h:54
Vector class for arbitrary dimensions and types.
Definition vector.h:87
#define MVE_NAMESPACE_BEGIN
Definition defines.h:13
#define MVE_NAMESPACE_END
Definition defines.h:14
#define MVE_GEOM_NAMESPACE_END
Definition defines.h:20
#define MVE_GEOM_NAMESPACE_BEGIN
Definition defines.h:19
void mesh_transform(mve::TriangleMesh::Ptr mesh, math::Matrix3f const &rot)
Transforms the vertices and normals of the mesh using the specified rotation matrix.
Definition mesh_tools.cc:46
void mesh_invert_faces(TriangleMesh::Ptr mesh)
Inverts the orientation of all faces in the mesh.
std::size_t mesh_delete_unreferenced(TriangleMesh::Ptr mesh)
Cleans unreferenced vertices from the mesh.
void mesh_components(TriangleMesh::Ptr mesh, std::size_t vertex_threshold)
Discards isolated components with a vertex count below a threshold.
void mesh_find_aabb(TriangleMesh::ConstPtr mesh, math::Vec3f &aabb_min, math::Vec3f &aabb_max)
Calculates the mesh axis-aligned bounding box (AABB).
void mesh_scale_and_center(TriangleMesh::Ptr mesh, bool scale, bool center)
Scales the mesh such that it fits into a cube with length 1 and centers the mesh in the coordinate or...
void mesh_merge(TriangleMesh::ConstPtr mesh1, TriangleMesh::Ptr mesh2)
Merges the first given mesh with the second one, modifying the second one.
Definition mesh_tools.cc:84