-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathepa_simplex2polytope.h
56 lines (45 loc) · 2.13 KB
/
epa_simplex2polytope.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// Created by wei on 22-6-5.
//
#pragma once
#include "epa_polytope.h"
#include "gjk.h"
namespace fcl {
namespace cvx_collide {
enum class Simplex2PolytopeStatus { OK, Touching, Failed };
template <typename T>
Simplex2PolytopeStatus simplexToPolytope(const GJKSimplex<T>& gjk_simplex,
const MinkowskiDiff<T>& shape,
Polytope<T>& polytope,
Vector3<T>* p0_if_touching,
Vector3<T>* p1_if_touching,
T touching_threshold = T(1e-10));
template <typename T>
Simplex2PolytopeStatus simplexToPolytope4(
const MinkowskiDiffVertex<T>& a, const MinkowskiDiffVertex<T>& b,
const MinkowskiDiffVertex<T>& c, const MinkowskiDiffVertex<T>& d,
const MinkowskiDiff<T>& shape, Polytope<T>& polytope,
Vector3<T>* p0_if_touching, Vector3<T>* p1_if_touching,
T touching_threshold = T(1e-10));
template <typename T>
Simplex2PolytopeStatus simplexToPolytope3(
const MinkowskiDiffVertex<T>& a, const MinkowskiDiffVertex<T>& b,
const MinkowskiDiffVertex<T>& c, const MinkowskiDiff<T>& shape,
Polytope<T>& polytope, Vector3<T>* p0_if_touching,
Vector3<T>* p1_if_touching, T touching_threshold = T(1e-10));
template <typename T>
Simplex2PolytopeStatus simplexToPolytope2(const MinkowskiDiffVertex<T>& a,
const MinkowskiDiffVertex<T>& b,
const MinkowskiDiff<T>& shape,
Polytope<T>& polytope,
Vector3<T>* p0_if_touching,
Vector3<T>* p1_if_touching,
T touching_threshold = T(1e-10));
template <typename T>
Simplex2PolytopeStatus formNewTetrahedronPolytope(
const MinkowskiDiffVertex<T>& a, const MinkowskiDiffVertex<T>& b,
const MinkowskiDiffVertex<T>& c, const MinkowskiDiffVertex<T>& d,
Polytope<T>& polytope);
} // namespace cvx_collide
} // namespace fcl
#include "epa_simplex2polytope.hpp"