Skip to content

Commit 46661d7

Browse files
Merge pull request #1008 from Geode-solutions/fix/ray-tracing-directions
fix(RayTracing): modify vectors to cover more directions
2 parents 2b739d1 + f8911b7 commit 46661d7

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

bindings/python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile bindings/python/requirements.in
5+
# pip-compile --pre bindings/python/requirements.in
66
#

src/geode/model/helpers/ray_tracing.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,19 @@ namespace geode
103103
bool is_point_inside_block(
104104
const BRep& brep, const Block3D& block, const Point3D& point )
105105
{
106-
std::array< Vector3D, 12 > directions = { { Vector3D{ { 0., 0., 1. } },
107-
Vector3D{ { 0.1, 0., 1. } }, Vector3D{ { 0.3, 0., 1. } },
108-
Vector3D{ { 0.5, 0., 1. } }, Vector3D{ { 0., 1., 0. } },
109-
Vector3D{ { 0.1, 1., 0. } }, Vector3D{ { 0.3, 1., 0. } },
110-
Vector3D{ { 0.5, 1., 0. } }, Vector3D{ { 1., 0., 0. } },
111-
Vector3D{ { 1., 0., 0.1 } }, Vector3D{ { 1., 0., 0.3 } },
112-
Vector3D{ { 1., 0., 0.5 } } } };
106+
std::array< Vector3D, 12 > directions = { { geode::Vector3D{
107+
{ 1., 0., 0. } },
108+
geode::Vector3D{ { 1., 0., 0.1 } },
109+
geode::Vector3D{ { 1., 0., 0.3 } },
110+
geode::Vector3D{ { 1., 0., 0.5 } },
111+
geode::Vector3D{ { 0., 1., 0. } },
112+
geode::Vector3D{ { 0.1, 1., 0. } },
113+
geode::Vector3D{ { 0.3, 1., 0. } },
114+
geode::Vector3D{ { 0.5, 1., 0. } },
115+
geode::Vector3D{ { 0., 0., 1. } },
116+
geode::Vector3D{ { 0., 0.1, 1. } },
117+
geode::Vector3D{ { 0., 0.3, 1. } },
118+
geode::Vector3D{ { 0., 0.5, 1. } } } };
113119

114120
for( const auto& direction : directions )
115121
{

0 commit comments

Comments
 (0)