Skip to content

Commit 5e4eb72

Browse files
authored
Fix rasterizer (#38)
1 parent 090e9ad commit 5e4eb72

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
## [2.1.5-RC2] - 2020-03-11
9+
## [2.1.5-RC3] - 2020-03-13
10+
### Fixed
11+
- Fix mesh rasterizer [#38](https://github.com/PDAL/java/pull/38)
1012

13+
## [2.1.5-RC2] - 2020-03-11
1114
### Changed
1215
- Allocate rasterized buffer on heap [#37](https://github.com/PDAL/java/pull/37)
1316

@@ -98,7 +101,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
98101
### Changed
99102
- Moved from the PDAL repo and established own lifecycle.
100103

101-
[Unreleased]: https://github.com/PDAL/java/compare/2.1.5-RC2...HEAD
104+
[Unreleased]: https://github.com/PDAL/java/compare/2.1.5-RC3...HEAD
105+
[2.1.5-RC3]: https://github.com/PDAL/java/compare/2.1.5-RC2...2.1.5-RC3
102106
[2.1.5-RC2]: https://github.com/PDAL/java/compare/2.1.5-RC1...2.1.5-RC2
103107
[2.1.5-RC1]: https://github.com/PDAL/java/compare/2.1.4...2.1.5-RC1
104108
[2.1.4]: https://github.com/PDAL/java/compare/2.1.3...2.1.4

examples/pdal-jni/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resolvers ++= Seq(
2121

2222
fork := true
2323

24-
val pdalVersion = "2.1.5-RC2"
24+
val pdalVersion = "2.1.5-RC3"
2525

2626
libraryDependencies ++= Seq(
2727
"io.pdal" %% "pdal" % pdalVersion,

native/src/io_pdal_PointView.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ JNIEXPORT jdoubleArray JNICALL Java_io_pdal_PointView_rasterizeTriangularMesh
308308
double scanrow0 = std::max(std::ceil((ymin - eymin) / h - 0.5), 0.0);
309309
double scany = eymin + scanrow0 * h + h / 2.0;
310310

311-
while (scany < eymax && scany < ymax)
311+
while (scany <= eymax && scany <= ymax)
312312
{
313313
// get x at y for edge
314314
double xmin = -DBL_MAX;
@@ -368,7 +368,7 @@ JNIEXPORT jdoubleArray JNICALL Java_io_pdal_PointView_rasterizeTriangularMesh
368368
double scancol0 = std::max(std::ceil((xmin - exmin) / w - 0.5), 0.0);
369369
double scanx = exmin + scancol0 * w + w / 2;
370370

371-
while (scanx < exmax && scanx < xmax)
371+
while (scanx <= exmax && scanx <= xmax)
372372
{
373373
int col = (int)((scanx - exmin) / w);
374374
int row = (int)((eymax - scany) / h);

0 commit comments

Comments
 (0)