MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
triangulation.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 FSSR_TRIANGULATION_HEADER
11#define FSSR_TRIANGULATION_HEADER
12
13#include <vector>
14
15#include "math/vector.h"
16#include "fssr/defines.h"
17
19
28{
29public:
30 void triangulate (std::vector<math::Vec3f> const& verts,
31 std::vector<unsigned int>* indices);
32
33private:
34 float compute_table (std::vector<math::Vec3f> const& verts,
35 int start_id, int end_id);
36 void compute_triangulation (std::vector<unsigned int>* indices,
37 int start_id, int end_id, int num_verts);
38
39private:
40 std::vector<float> min_area_table;
41 std::vector<int> mid_point_table;
42};
43
44/*
45 * TODO: Triangulation that creates a center vertex.
46 */
47
49
50#endif /* FSSR_TRIANGULATION_HEADER */
Computes the minimum area triangulation of a polygon.
#define FSSR_NAMESPACE_END
Definition defines.h:14
#define FSSR_NAMESPACE_BEGIN
Definition defines.h:13