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
e6691ed6
Commit
e6691ed6
authored
Mar 13, 2020
by
Julian Schakib
Browse files
box test
parent
6f48ec28
Pipeline
#13779
failed with stage
in 6 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/feature/intersections/plane-intersect.cc
View file @
e6691ed6
...
...
@@ -351,13 +351,17 @@ TG_FUZZ_TEST(Plane, Intersect)
}
// random box rotation
auto
nx
=
tg
::
uniform
<
tg
::
dir3
>
(
rng
);
auto
ny
=
any_normal
(
nx
);
auto
nz
=
normalize
(
cross
(
nx
,
ny
));
auto
const
nx
=
tg
::
uniform
<
tg
::
dir3
>
(
rng
);
auto
const
ny
=
any_normal
(
nx
);
auto
const
nz
=
normalize
(
cross
(
nx
,
ny
));
// random box length
half_extents
[
0
]
=
nx
*
uniform
(
rng
,
1.0
f
,
10.0
f
);
half_extents
[
1
]
=
ny
*
uniform
(
rng
,
1.0
f
,
10.0
f
);
half_extents
[
2
]
=
nz
*
uniform
(
rng
,
1.0
f
,
10.0
f
);
auto
const
box
auto
const
plane
=
tg
::
plane3
(
tg
::
uniform
<
tg
::
dir3
>
(
rng
),
tg
::
pos3
::
zero
)
}
}
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