Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
schaapcommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ResearchAndDevelopment
schaapcommon
Commits
e00c7b85
Commit
e00c7b85
authored
1 year ago
by
Tammo Jan Dijkema
Browse files
Options
Downloads
Patches
Plain Diff
Rename forgotten Pixel to PixelPosition
parent
ca8f8612
No related branches found
Branches containing commit
No related tags found
1 merge request
!121
Rename forgotten Pixel to PixelPosition
Pipeline
#49383
passed
1 year ago
Stage: versioning
Stage: prepare
Stage: linting
Stage: build
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/facets/facet.cc
+3
-3
3 additions, 3 deletions
src/facets/facet.cc
with
3 additions
and
3 deletions
src/facets/facet.cc
+
3
−
3
View file @
e00c7b85
...
...
@@ -17,7 +17,7 @@
#include
<boost/geometry/geometries/linestring.hpp>
#include
<boost/geometry/algorithms/is_convex.hpp>
// Even though Pixels are int, let boost perform the intersection
// Even though Pixel
Position
s are int, let boost perform the intersection
// calculations based on floats to avoid rounding issues
BOOST_GEOMETRY_REGISTER_POINT_2D
(
schaapcommon
::
facets
::
PixelPosition
,
float
,
cs
::
cartesian
,
x
,
y
)
...
...
@@ -55,8 +55,8 @@ std::vector<std::pair<int, int>> Facet::HorizontalIntersections(
int
x2
=
0
;
size_t
i
;
for
(
i
=
0
;
i
!=
pixels_
.
size
();
++
i
)
{
const
Pixel
&
p1
=
pixels_
[
i
];
const
Pixel
&
p2
=
pixels_
[(
i
+
1
)
%
pixels_
.
size
()];
const
Pixel
Position
&
p1
=
pixels_
[
i
];
const
Pixel
Position
&
p2
=
pixels_
[(
i
+
1
)
%
pixels_
.
size
()];
if
((
p1
.
y
<=
y_intersect
&&
p2
.
y
>
y_intersect
)
||
(
p2
.
y
<=
y_intersect
&&
p1
.
y
>
y_intersect
))
{
int
x
;
...
...
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