Skip to content

Commit 6eb44a2

Browse files
committed
[IPointCloudNode] FilterConvexHulls3d: polygon is CCW
1 parent fec893a commit 6eb44a2

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 5.1.34
2+
- [IPointCloudNode] FilterConvexHulls3d: polygon is CCW
3+
14
### 5.1.33
25
- [IPointCloudNode] FilterConvexHulls3d: bugfixes, argument checks
36

src/Aardvark.Geometry.PointSet/Views/Filters/FilterHulls3d.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public FilterInsideConvexHulls3d(Polygon2d footprint, Range1d zRange, Trafo3d tr
3535
poly.GetEdgeLineArray().Map(l => {
3636
var dir = (l.P1 - l.P0).Normalized;
3737
var n = new V3d(dir.Y, -dir.X, 0);
38-
return new Plane3d(-n, new V3d(l.P0, 0)).Transformed(trafo);
38+
return new Plane3d(n, new V3d(l.P0, 0)).Transformed(trafo);
3939
}).Append(new[] {
4040
new Plane3d(V3d.OON,zRange.Min).Transformed(trafo),
4141
new Plane3d(V3d.OOI,zRange.Max).Transformed(trafo)
@@ -118,14 +118,9 @@ public static FilterInsideConvexHulls3d Deserialize(JsonNode json)
118118
return new FilterInsideConvexHulls3d(hulls);
119119
}
120120

121-
public Box3d Clip(Box3d box)
122-
{
123-
return new Box3d(Hulls.Map(h => h.IntersectionBounds(box)));
124-
}
125-
public bool Contains(V3d point)
126-
{
127-
return Hulls.Any(h => h.Contains(point));
128-
}
121+
public Box3d Clip(Box3d box) => new Box3d(Hulls.Map(h => h.IntersectionBounds(box)));
122+
123+
public bool Contains(V3d point) => Hulls.Any(h =>h.Contains(point));
129124

130125
public bool Equals(IFilter other)
131126
=> other is FilterInsideConvexHulls3d x &&

0 commit comments

Comments
 (0)