Blame view

src/ExternLib/Tetrahedron/common/tetrahedron.hh 826 Bytes
73157db7   Benjamin Renard   Add tetrahedron f...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * tetrahedron.hh
 *
 *  Created on: 12 jul. 2022
 *      Author: Alexandre Schulz - BRE
 */

#ifndef TETRAHEDRON_HH_
#define TETRAHEDRON_HH_

#include <vector>

using Vector = std::vector<double>;
using Matrix = std::vector<Vector>;

void compute_tetrahedron(Vector p1, Vector p2, Vector p3, Vector p4, double& elongation, double& planarity);

template<typename Type>
void compute_tetrahedron_(std::vector<Type> p1, std::vector<Type> p2, std::vector<Type> p3, std::vector<Type> p4, double& elongation, double& planarity) {
	std::vector<double> d_p1(p1.begin(), p1.end());
	std::vector<double> d_p2(p2.begin(), p2.end());
	std::vector<double> d_p3(p3.begin(), p3.end());
	std::vector<double> d_p4(p4.begin(), p4.end());
	compute_tetrahedron(d_p1, d_p2, d_p3, d_p4, elongation, planarity);
}

#endif /* TETRAHEDRON_HH_ */