mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Fix Circleci build failure: Add != operator for Marching Cubes Vertex struct
Summary: Fix Circleci error: https://app.circleci.com/pipelines/github/facebookresearch/pytorch3d/1066/workflows/94df137b-4882-4959-8fe4-738af447db23/jobs/56560. Reviewed By: kjchalup Differential Revision: D40185409 fbshipit-source-id: 7121b0cae66bd60f718df2a5d9ef5d2ac3bc658c
This commit is contained in:
parent
73ba66e4ab
commit
9df875bb5e
@ -86,8 +86,8 @@ std::tuple<at::Tensor, at::Tensor> MarchingCubesCpu(
|
||||
}
|
||||
tri.clear();
|
||||
ps.clear();
|
||||
}
|
||||
} // endif
|
||||
} // endif
|
||||
} // endfor edge enumeration
|
||||
} // endfor x
|
||||
} // endfor y
|
||||
} // endfor z
|
||||
|
@ -310,13 +310,16 @@ struct Vertex {
|
||||
Vertex operator+(const Vertex& xyz) const {
|
||||
return Vertex(x + xyz.x, y + xyz.y, z + xyz.z);
|
||||
}
|
||||
// The == operator overrides is used for checking degenerate triangles
|
||||
// The =/!= operator overrides is used for checking degenerate triangles
|
||||
bool operator==(const Vertex& xyz) const {
|
||||
if (std::abs(x - xyz.x) < EPS && std::abs(y - xyz.y) < EPS &&
|
||||
std::abs(z - xyz.z) < EPS) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return (
|
||||
std::abs(x - xyz.x) < EPS && std::abs(y - xyz.y) < EPS &&
|
||||
std::abs(z - xyz.z) < EPS);
|
||||
}
|
||||
bool operator!=(const Vertex& xyz) const {
|
||||
return (
|
||||
std::abs(x - xyz.x) >= EPS || std::abs(y - xyz.y) >= EPS ||
|
||||
std::abs(z - xyz.z) >= EPS);
|
||||
}
|
||||
// vertex position
|
||||
float x, y, z;
|
||||
|
Loading…
x
Reference in New Issue
Block a user