Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edge case for intersect function for convex polyhedron #248

Merged
merged 4 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ fresnel_ releases follow `semantic versioning`_.
0.x
----

*Changed*

* Fixed a bug in the intersect function for an edge case.

0.13.6 (2024-05-31)
^^^^^^^^^^^^^^^^^^^

Expand Down
3 changes: 3 additions & 0 deletions doc/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The following people contributed to **fresnel**.
* Mike Henry, Boise State University
* Jenny Fothergill, Boise State University
* Corwin Kerr, University of Michigan
* Domagoj Fijan, University of Michigan
* Charlotte Zhao, University of Michigan
* Philipp Schönhöfer, University of Michigan

Libraries
---------
Expand Down
2 changes: 1 addition & 1 deletion fresnel/cpu/GeometryConvexPolyhedron.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void GeometryConvexPolyhedron::intersect(const struct RTCIntersectFunctionNArgum
vec3<float> t0_n_local(0, 0, 0), t0_p_local(0, 0, 0);
vec3<float> t1_n_local(0, 0, 0), t1_p_local(0, 0, 0);
int t0_plane_hit = 0, t1_plane_hit = 0;
for (int i = 0; i < n_planes && t0 < t1; ++i)
for (int i = 0; i < n_planes && t0 <= t1; ++i)
{
vec3<float> n = geom->m_plane_normal[i];
vec3<float> p = geom->m_plane_origin[i];
Expand Down
2 changes: 1 addition & 1 deletion fresnel/gpu/GeometryConvexPolyhedron.cu
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ RT_PROGRAM void intersect(int item)
vec3<float> t0_n_local(0, 0, 0), t0_p_local(0, 0, 0);
vec3<float> t1_n_local(0, 0, 0), t1_p_local(0, 0, 0);
int t0_plane_hit = 0, t1_plane_hit = 0;
for (int i = 0; i < n_planes && t0 < t1; ++i)
for (int i = 0; i < n_planes && t0 <= t1; ++i)
{
vec3<float> n = vec3<float>(convex_polyhedron_plane_normal[i]);
vec3<float> p = vec3<float>(convex_polyhedron_plane_origin[i]);
Expand Down