Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
tg-samples
Commits
e29c3a1c
Commit
e29c3a1c
authored
Feb 28, 2020
by
Julian Schakib
Browse files
intersection test for cone and plane (fails)
parent
42f32c84
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/feature/intersections/plane-intersect.cc
View file @
e29c3a1c
...
...
@@ -157,6 +157,12 @@ TG_FUZZ_TEST(Plane, Intersect)
CHECK
(
!
intersects
(
c
,
p
));
p
.
normal
=
any_normal
(
d
);
CHECK
(
intersects
(
c
,
p
));
auto
rotation_mat
=
tg
::
rotation_around
(
any_normal
(
d
),
c
.
opening_angle
);
auto
new_normal
=
normalize
(
rotation_mat
*
d
);
p
=
tg
::
plane3
(
new_normal
,
center
-
new_normal
*
100
);
// TODO should not intersect! is moved away from center and normal is oriented so that the plane runs parallel to the cone (?)
CHECK
(
!
intersects
(
c
,
p
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment