Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tg-samples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philip Trettner
tg-samples
Commits
8d29e1b6
Commit
8d29e1b6
authored
4 years ago
by
Aaron Grabowy
Browse files
Options
Downloads
Patches
Plain Diff
Added ray intersection tests for capsule, cylinder, and hemisphere
parent
406819b7
No related branches found
No related tags found
1 merge request
!40
Tests for ray/line - object intersections
Pipeline
#15773
failed
4 years ago
Stage: Build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
extern/typed-geometry
+1
-1
1 addition, 1 deletion
extern/typed-geometry
tests/feature/intersections/ray-intersect.cc
+8
-3
8 additions, 3 deletions
tests/feature/intersections/ray-intersect.cc
with
9 additions
and
4 deletions
typed-geometry
@
554dc026
Subproject commit
3a9f8048463c4ce8197fae53a12d2c4e0f151454
Subproject commit
554dc0264512b88aaa64c3215bc3bcd9d8f90492
This diff is collapsed.
Click to expand it.
tests/feature/intersections/ray-intersect.cc
+
8
−
3
View file @
8d29e1b6
...
...
@@ -81,7 +81,6 @@ TG_FUZZ_TEST(Ray, Intersect)
CHECK
(
contains
(
obj
,
ray
[
iBounds
.
value
()],
tolerance
));
}
};
(
void
)
test_obj_and_boundary_no_caps
;
// TODO: Remove
const
auto
r
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
const
auto
h
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
...
...
@@ -148,14 +147,20 @@ TG_FUZZ_TEST(Ray, Intersect)
test_obj_and_boundary
(
ray1
,
tg
::
box1
(
pos10
,
m1
));
test_obj_and_boundary
(
ray2
,
tg
::
box2
(
pos20
,
m2
));
test_obj_and_boundary
(
ray3
,
tg
::
box3
(
pos30
,
m3
));
// capsule
test_obj_and_boundary
(
ray3
,
tg
::
capsule3
(
axis0
,
r
));
// cylinder
// test_obj(ray3, tg::cylinder_boundary<3, float>(axis0, r));
test_obj
(
ray3
,
tg
::
cylinder_boundary_no_caps
<
3
,
float
>
(
axis0
,
r
));
test_obj_and_boundary_no_caps
(
ray3
,
tg
::
cylinder
<
3
,
float
>
(
axis0
,
r
));
// halfspace
test_solid_obj
(
ray1
,
tg
::
halfspace1
(
n1
,
h
));
test_solid_obj
(
ray2
,
tg
::
halfspace2
(
n2
,
h
));
test_solid_obj
(
ray3
,
tg
::
halfspace3
(
n3
,
h
));
test_solid_obj
(
ray4
,
tg
::
halfspace4
(
n4
,
h
));
// hemisphere
test_obj_and_boundary_no_caps
(
ray1
,
tg
::
hemisphere1
(
pos10
,
r
,
n1
));
test_obj_and_boundary_no_caps
(
ray2
,
tg
::
hemisphere2
(
pos20
,
r
,
n2
));
test_obj_and_boundary_no_caps
(
ray3
,
tg
::
hemisphere3
(
pos30
,
r
,
n3
));
// test_obj_and_boundary_no_caps(ray4, tg::hemisphere4(pos40, r, n4));
// line
test_obj
(
ray2
,
tg
::
line2
(
pos20
,
n2
));
// plane
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment