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
abba6aab
Commit
abba6aab
authored
4 years ago
by
Aaron Grabowy
Browse files
Options
Downloads
Patches
Plain Diff
Added tests for inf_cone and inf_cylinder
parent
2b6a6a24
No related branches found
No related tags found
1 merge request
!40
Tests for ray/line - object intersections
Pipeline
#15908
failed
4 years ago
Stage: Build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
extern/typed-geometry
+1
-1
1 addition, 1 deletion
extern/typed-geometry
tests/feature/intersections/ray-intersect.cc
+8
-1
8 additions, 1 deletion
tests/feature/intersections/ray-intersect.cc
tests/feature/objects/any_point.cc
+2
-0
2 additions, 0 deletions
tests/feature/objects/any_point.cc
with
11 additions
and
2 deletions
typed-geometry
@
05a25760
Subproject commit
b2642eb7a1630106a71bf50e46ba6599830e226b
Subproject commit
05a25760acd58e2a87d3627a2f6d3d9f40ecc95e
This diff is collapsed.
Click to expand it.
tests/feature/intersections/ray-intersect.cc
+
8
−
1
View file @
abba6aab
...
@@ -100,6 +100,7 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
...
@@ -100,6 +100,7 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
const
auto
r
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
const
auto
r
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
const
auto
h
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
const
auto
h
=
uniform
(
rng
,
0.0
f
,
10.0
f
);
const
auto
a
=
uniform
(
rng
,
5
_deg
,
180
_deg
);
// sensible range for a convex inf_cone
const
auto
n1
=
tg
::
uniform
<
tg
::
dir1
>
(
rng
);
const
auto
n1
=
tg
::
uniform
<
tg
::
dir1
>
(
rng
);
const
auto
n2
=
tg
::
uniform
<
tg
::
dir2
>
(
rng
);
const
auto
n2
=
tg
::
uniform
<
tg
::
dir2
>
(
rng
);
const
auto
n3
=
tg
::
uniform
<
tg
::
dir3
>
(
rng
);
const
auto
n3
=
tg
::
uniform
<
tg
::
dir3
>
(
rng
);
...
@@ -168,6 +169,8 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
...
@@ -168,6 +169,8 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
test_obj_and_boundary
(
ray3
,
tg
::
capsule3
(
axis0
,
r
));
test_obj_and_boundary
(
ray3
,
tg
::
capsule3
(
axis0
,
r
));
// cylinder
// cylinder
test_obj_and_boundary_no_caps
(
ray3
,
tg
::
cylinder
<
3
,
float
>
(
axis0
,
r
));
test_obj_and_boundary_no_caps
(
ray3
,
tg
::
cylinder
<
3
,
float
>
(
axis0
,
r
));
// ellipse
test_obj
(
ray3
,
tg
::
ellipse2in3
(
pos30
,
m23
));
// halfspace
// halfspace
test_solid_obj
(
ray1
,
tg
::
halfspace1
(
n1
,
h
));
test_solid_obj
(
ray1
,
tg
::
halfspace1
(
n1
,
h
));
test_solid_obj
(
ray2
,
tg
::
halfspace2
(
n2
,
h
));
test_solid_obj
(
ray2
,
tg
::
halfspace2
(
n2
,
h
));
...
@@ -178,8 +181,12 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
...
@@ -178,8 +181,12 @@ TG_FUZZ_TEST(TypedGeometry, Intersections)
test_obj_and_boundary_no_caps
(
ray2
,
tg
::
hemisphere2
(
pos20
,
r
,
n2
));
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
(
ray3
,
tg
::
hemisphere3
(
pos30
,
r
,
n3
));
// test_obj_and_boundary_no_caps(ray4, tg::hemisphere4(pos40, r, n4));
// test_obj_and_boundary_no_caps(ray4, tg::hemisphere4(pos40, r, n4));
// inf_cone
test_obj_and_boundary
(
ray2
,
tg
::
inf_cone2
(
pos20
,
n2
,
a
));
test_obj_and_boundary
(
ray3
,
tg
::
inf_cone3
(
pos30
,
n3
,
a
));
// inf_cylinder
// inf_cylinder
test_obj_and_boundary
(
ray2
,
tg
::
inf_cylinder
<
2
,
float
>
(
tg
::
line2
(
pos20
,
n2
),
r
));
test_obj_and_boundary
(
ray2
,
tg
::
inf_cylinder2
(
tg
::
line2
(
pos20
,
n2
),
r
));
test_obj_and_boundary
(
ray3
,
tg
::
inf_cylinder3
(
tg
::
line3
(
pos30
,
n3
),
r
));
// line
// line
test_obj
(
ray2
,
tg
::
line2
(
pos20
,
n2
));
test_obj
(
ray2
,
tg
::
line2
(
pos20
,
n2
));
// plane
// plane
...
...
This diff is collapsed.
Click to expand it.
tests/feature/objects/any_point.cc
+
2
−
0
View file @
abba6aab
...
@@ -103,8 +103,10 @@ TG_FUZZ_TEST(TypedGeometry, AnyPoint)
...
@@ -103,8 +103,10 @@ TG_FUZZ_TEST(TypedGeometry, AnyPoint)
test_obj_and_boundary_no_caps
(
tg
::
hemisphere3
(
pos30
,
r
,
n3
));
test_obj_and_boundary_no_caps
(
tg
::
hemisphere3
(
pos30
,
r
,
n3
));
// test_obj_and_boundary_no_caps(tg::hemisphere4(pos40, r, n4));
// test_obj_and_boundary_no_caps(tg::hemisphere4(pos40, r, n4));
// inf_cone
// inf_cone
test_obj_and_boundary
(
tg
::
inf_cone2
(
pos20
,
n2
,
a
));
test_obj_and_boundary
(
tg
::
inf_cone3
(
pos30
,
n3
,
a
));
test_obj_and_boundary
(
tg
::
inf_cone3
(
pos30
,
n3
,
a
));
// inf_cylinder
// inf_cylinder
test_obj_and_boundary
(
tg
::
inf_cylinder2
(
tg
::
line2
(
pos20
,
n2
),
r
));
test_obj_and_boundary
(
tg
::
inf_cylinder3
(
tg
::
line3
(
pos30
,
n3
),
r
));
test_obj_and_boundary
(
tg
::
inf_cylinder3
(
tg
::
line3
(
pos30
,
n3
),
r
));
// line
// line
test_obj
(
tg
::
line1
(
pos10
,
n1
));
test_obj
(
tg
::
line1
(
pos10
,
n1
));
...
...
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