|
16 | 16 |
|
17 | 17 | package io.pdal.pipeline |
18 | 18 |
|
19 | | -import io.pdal.PointCloud |
| 19 | +import io.pdal._ |
20 | 20 | import org.locationtech.jts.geom.Coordinate |
21 | 21 |
|
| 22 | +import java.util |
| 23 | +import java.nio.ByteBuffer |
| 24 | + |
22 | 25 | object Implicits extends Implicits with Serializable |
23 | 26 |
|
24 | 27 | trait Implicits { |
25 | | - implicit class withPointCloudMethods(pointCloud: PointCloud) { |
26 | | - def getCoordinate(i: Int) = new Coordinate(pointCloud.getX(i), pointCloud.getY(i), pointCloud.getZ(i)) |
| 28 | + implicit class withPointCloudMethods(self: PointCloud) { |
| 29 | + def getCoordinate(i: Int) = new Coordinate(self.getX(i), self.getY(i), self.getZ(i)) |
| 30 | + |
| 31 | + def get(idx: Int, dims: SizedDimType*)(implicit d0: DummyImplicit): ByteBuffer = |
| 32 | + self.get(idx, dims.toArray) |
| 33 | + def get(idx: Int, dims: DimType*)(implicit d0: DummyImplicit, d1: DummyImplicit): ByteBuffer = |
| 34 | + self.get(idx, dims.toArray) |
| 35 | + def get(idx: Int, dims: String*)(implicit d0: DummyImplicit, d1: DummyImplicit, d2: DummyImplicit): ByteBuffer = |
| 36 | + self.get(idx, dims.toArray) |
| 37 | + } |
| 38 | + |
| 39 | + implicit class withPointViewMethods(self: PointView) { |
| 40 | + def getPointCloud(dims: DimType*): PointCloud = self.getPointCloud(dims.toArray) |
| 41 | + def get(idx: Int, packedPoints: Array[Byte], dims: DimType*): Array[Byte] = self.get(idx, packedPoints, dims.toArray) |
| 42 | + def getPackedPoint(idx: Long, dims: DimType*): Array[Byte] = self.getPackedPoint(idx, dims.toArray) |
| 43 | + def getPackedPoints(dims: DimType*): Array[Byte] = self.getPackedPoints(dims.toArray) |
| 44 | + } |
| 45 | + |
| 46 | + implicit class withPointLayoutMethods(self: PointLayout) { |
| 47 | + def toSizedDimTypes(dimTypes: DimType*): util.Map[String, SizedDimType] = |
| 48 | + self.toSizedDimTypes(dimTypes.toArray) |
27 | 49 | } |
28 | 50 | } |
0 commit comments