mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
small numerical fix to point_mesh
Summary: Small fix by adjusting the area `eps` to account for really small faces when computing point to face distances Reviewed By: bottler Differential Revision: D34331336 fbshipit-source-id: 51c4888ea46fefa4e31d5b0bb494a9f9d77813cd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3de41223dd
commit
ee71c7c447
@@ -550,7 +550,7 @@ __device__ inline bool IsInsideTriangle(
|
||||
const float3& v1,
|
||||
const float3& v2) {
|
||||
bool inside;
|
||||
if (AreaOfTriangle(v0, v1, v2) < 1e-5) {
|
||||
if (AreaOfTriangle(v0, v1, v2) < 5e-3) {
|
||||
inside = 0;
|
||||
} else {
|
||||
float3 bary = BarycentricCoords3Forward(p, v0, v1, v2);
|
||||
|
||||
@@ -651,7 +651,7 @@ static bool IsInsideTriangle(
|
||||
const vec3<T>& v1,
|
||||
const vec3<T>& v2) {
|
||||
bool inside;
|
||||
if (AreaOfTriangle(v0, v1, v2) < 1e-5) {
|
||||
if (AreaOfTriangle(v0, v1, v2) < 5e-3) {
|
||||
inside = 0;
|
||||
} else {
|
||||
vec3<T> bary = BarycentricCoords3Forward(p, v0, v1, v2);
|
||||
|
||||
Reference in New Issue
Block a user