Package com.solibri.geometry.primitive3d
Interface Polygon3d
- 
- All Known Subinterfaces:
- MPolygon3d,- MRectangle3d,- MTriangle3d,- Rectangle3d,- Triangle3d
 
 public interface Polygon3d extends Iterable<Vector3d> Read-only interface for handling simple polygons without holes in 3-dimensional space.- Since:
- 9.10.2
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancontains(Vector3d point)Returns true if the given point is inside this polygon.booleancontains(Polygon3d polygon)Returns true if the given polygon is contained inside this polygon.static Polygon3dcreate(Polygon3d polygon)Creates a polygon with the contents deep copied from the given polygon.static Polygon3dcreate(List<? extends Vector3d> vertices)Creates a polygon with the given vertices.booleanedgesIntersect(Polygon3d polygon)Returns true if the edges of the given polygon intersect the edges of this polygon.doublegetArea()Returns the area of this polygon.AABB3dgetBoundingBox()Returns the bounding box.MVector3dgetCentroid()Returns the centroid of this polygon.default Iterator<Segment3d>getEdgeIterator()Returns an iterator that iterates through the segments in this polygon.MVector3dgetMean()Returns the average vector of the vertices of this polygon.MVector3dgetNormal()Returns the normal of this polygon as a vector of unit length.default intgetVertexCount()Returns the number of vertices in this polygon.List<Vector3d>getVertices()Returns the vertices in this polygon.Optional<MVector3d>intersect(Segment3d segment)Returns the intersection point of this polygon and the given segment.default booleanintersects(Segment3d segment)Returns true if the given segment intersects this polygon.booleanisConvex()Returns true if this polygon is convex.- 
Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
containsboolean contains(Polygon3d polygon) Returns true if the given polygon is contained inside this polygon. The polygon needs to be completely inside this polygon, i.e., if the vertices or edges of the polygons intersect, then returns false.- Parameters:
- polygon- the polygon that is checked for containment inside this polygon
- Returns:
- true if the given polygon is contained inside this polygon
- Since:
- 9.10.2
 
 - 
containsboolean contains(Vector3d point) Returns true if the given point is inside this polygon. If the point is on an edge of the polygon, then it is considered to be inside the polygon.- Parameters:
- point- the point that is checked for containment inside this polygon
- Returns:
- true if the given point is inside this polygon
- Since:
- 9.10.2
 
 - 
edgesIntersectboolean edgesIntersect(Polygon3d polygon) Returns true if the edges of the given polygon intersect the edges of this polygon.- Parameters:
- polygon- true if the edges of the given polygon intersect the edges of this polygon
- Returns:
- true if the edges of the given polygon intersect the edges of this polygon
- Since:
- 9.10.2
 
 - 
getAreadouble getArea() Returns the area of this polygon.- Returns:
- the area of this polygon
- Since:
- 9.10.2
 
 - 
getCentroidMVector3d getCentroid() Returns the centroid of this polygon. The centroid of a polygon is the average vector of the vertices.- Returns:
- the centroid of this polygon
- Since:
- 9.10.2
 
 - 
getBoundingBoxAABB3d getBoundingBox() Returns the bounding box. The returned bounding box may be degenerate if the polygon is degenerate.- Returns:
- bounding box whose lower and upper points are the lower and upper points from the bounding box
- Since:
- 9.10.2
 
 - 
getEdgeIteratordefault Iterator<Segment3d> getEdgeIterator() Returns an iterator that iterates through the segments in this polygon.- Returns:
- an iterator that iterates through the segments in this polygon
- Since:
- 9.10.2
 
 - 
intersectOptional<MVector3d> intersect(Segment3d segment) Returns the intersection point of this polygon and the given segment. If the segment intersects the polygon at multiple points, then which point is returned is not specified. If the segment and polygon do not intersect, then returns empty.- Parameters:
- segment- the segment with which the intersection point is computed
- Returns:
- the intersection point of this polygon and the given segment
- Since:
- 9.10.2
 
 - 
getMeanMVector3d getMean() Returns the average vector of the vertices of this polygon.- Returns:
- the average vector of the vertices of this polygon
- Since:
- 9.10.2
 
 - 
getNormalMVector3d getNormal() Returns the normal of this polygon as a vector of unit length. Returns null if the normal cannot be computed, e.g., if the polygon is not planar.- Returns:
- the normal of this polygon as a vector of unit length
- Since:
- 9.10.2
 
 - 
getVertexCountdefault int getVertexCount() Returns the number of vertices in this polygon.- Returns:
- the number of vertices in this polygon
- Since:
- 9.10.2
 
 - 
getVerticesList<Vector3d> getVertices() Returns the vertices in this polygon. Modifying the polygon through the list returned by this method is not supported.- Returns:
- the vertices in this polygon
- Since:
- 9.10.2
 
 - 
intersectsdefault boolean intersects(Segment3d segment) Returns true if the given segment intersects this polygon.- Parameters:
- segment- the segment that is checked for intersection with this polygon
- Returns:
- true if the given segment intersects this polygon
- Since:
- 9.10.2
 
 - 
isConvexboolean isConvex() Returns true if this polygon is convex.- Returns:
- true if this polygon is convex
- Since:
- 9.10.2
 
 - 
createstatic Polygon3d create(Polygon3d polygon) Creates a polygon with the contents deep copied from the given polygon. The returned polygon does not take ownership of the given polygon.- Parameters:
- polygon- the polygon whose contents are deep copied into the returned polygon
- Returns:
- a polygon with the contents deep copied from the given polygon
- Since:
- 9.10.2
 
 - 
createstatic Polygon3d create(List<? extends Vector3d> vertices) Creates a polygon with the given vertices. The returned polygon does not take ownership of the given vertices.- Parameters:
- vertices- the vertices used for creating the returned polygon
- Returns:
- a polygon with the given vertices
- Since:
- 9.10.2
 
 
- 
 
-