Welcome to mirror list, hosted at ThFree Co, Russian Federation.

admmpd_math.h « src « softbody « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ff216929f86a3ce27eab1d18983e94a302da5c36 (plain)
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
// Copyright Matt Overby 2020.
// Distributed under the MIT License.

#ifndef ADMMPD_MATH_H_
#define ADMMPD_MATH_H_

#include <Eigen/Geometry>
#include <Eigen/Sparse>

namespace admmpd {
namespace barycoords {

Eigen::Vector4d point_tet(
    const Eigen::Vector3d &p,
    const Eigen::Vector3d &a,
    const Eigen::Vector3d &b,
    const Eigen::Vector3d &c,
    const Eigen::Vector3d &d);

Eigen::Vector3d point_triangle(
    const Eigen::Vector3d &p,
    const Eigen::Vector3d &a,
    const Eigen::Vector3d &b,
    const Eigen::Vector3d &c);

} // namespace barycoords

bool point_in_tet(
    const Eigen::Vector3d &p,
    const Eigen::Vector3d &a,
    const Eigen::Vector3d &b,
    const Eigen::Vector3d &c,
    const Eigen::Vector3d &d);

} // namespace admmpd

#endif // ADMMPD_MATH_H_