Volume Cartographer 2.27.0
BarycentricCoordinates.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <opencv2/core.hpp>
6
7namespace volcart
8{
9
20 const cv::Vec3d& pt,
21 const cv::Vec3d& triA,
22 const cv::Vec3d& triB,
23 const cv::Vec3d& triC);
24
35 const cv::Vec3d& pt,
36 const cv::Vec3d& triA,
37 const cv::Vec3d& triB,
38 const cv::Vec3d& triC);
39
44bool BarycentricPointIsInTriangle(const cv::Vec3d& pt);
45
50 const cv::Vec3d& uvw,
51 const cv::Vec3d& nA,
52 const cv::Vec3d& nB,
53 const cv::Vec3d& nC);
54
59 const cv::Vec3d& pt,
60 const cv::Vec3d& triA,
61 const cv::Vec3d& triB,
62 const cv::Vec3d& triC);
63
64} // namespace volcart
Volume Cartographer library
cv::Vec3d BarycentricToCartesian(const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC)
Convert a barycentric coordinate relative to the given triangle to a Cartesian coordinate.
bool BarycentricPointIsInTriangle(const cv::Vec3d &pt)
Check whether a barycentric coordinate is bounded by the given triangle.
bool CartesianPointIsInTriangle(const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC)
Check whether a Cartesian coordinate is bounded by the given triangle.
cv::Vec3d CartesianToBarycentric(const cv::Vec3d &pt, const cv::Vec3d &triA, const cv::Vec3d &triB, const cv::Vec3d &triC)
Convert a Cartesian coordinate to barycentric coordinate relative to the given triangle.
cv::Vec3d BarycentricNormalInterpolation(const cv::Vec3d &uvw, const cv::Vec3d &nA, const cv::Vec3d &nB, const cv::Vec3d &nC)
Use Barycentric coordinates to smoothly interpolate a normal.