Package eu.mihosoft.vrl.v3d
Class Polygon
java.lang.Object
eu.mihosoft.vrl.v3d.Polygon
Represents a convex polygon.
 Each convex polygon has a 
shared property, which is shared between
 all polygons that are clones of each other or where split from the same
 polygon. This can be used to define per-polygon properties (such as surface
 color).- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()booleanbooleanflip()Flips this polygon.flipped()Returns a flipped copy of this polygon.fromConcavePoints(Vector3d... points) Decomposes the specified concave polygon into convex polygons.fromConcavePoints(List<Vector3d> points) Decomposes the specified concave polygon into convex polygons.static PolygonfromPoints(Vector3d... points) Creates a polygon from the specified points.static PolygonfromPoints(List<Vector3d> points) Creates a polygon from the specified point list.static PolygonfromPoints(List<Vector3d> points, PropertyStorage shared) Creates a polygon from the specified point list.Returns the bounds of this polygon.getIntersection(Vector3d planePoint, Vector3d planeNormal) getIntersection(Straight line) Returns this polygon in STL string format.Returns this polygon in STL string format.Applies the specified transformation to this polygon.transformed(Transform transform) Returns a transformed copy of this polygon.Translates this polygon.Returns a translated copy of this polygon.
- 
Field Details- 
verticesPolygon vertices
- 
planePlane defined by this polygon. Note: uses first three vertices to define the plane.
 
- 
- 
Constructor Details- 
PolygonConstructor. Creates a new polygon that consists of the specified vertices. Note: the vertices used to initialize a polygon must be coplanar and form a convex loop.- Parameters:
- vertices- polygon vertices
- shared- shared property
 
- 
PolygonConstructor. Creates a new polygon that consists of the specified vertices. Note: the vertices used to initialize a polygon must be coplanar and form a convex loop.- Parameters:
- vertices- polygon vertices
 
- 
PolygonConstructor. Creates a new polygon that consists of the specified vertices. Note: the vertices used to initialize a polygon must be coplanar and form a convex loop.- Parameters:
- vertices- polygon vertices
 
 
- 
- 
Method Details- 
fromConcavePointsDecomposes the specified concave polygon into convex polygons.- Parameters:
- points- the points that define the polygon
- Returns:
- the decomposed concave polygon (list of convex polygons)
 
- 
fromConcavePointsDecomposes the specified concave polygon into convex polygons.- Parameters:
- points- the points that define the polygon
- Returns:
- the decomposed concave polygon (list of convex polygons)
 
- 
clone
- 
flipFlips this polygon.- Returns:
- this polygon
 
- 
flippedReturns a flipped copy of this polygon. Note: this polygon is not modified.- Returns:
- a flipped copy of this polygon
 
- 
toStlStringReturns this polygon in STL string format.- Returns:
- this polygon in STL string format
 
- 
toStlStringReturns this polygon in STL string format.- Parameters:
- sb- string builder
- Returns:
- the specified string builder
 
- 
translateTranslates this polygon.- Parameters:
- v- the vector that defines the translation
- Returns:
- this polygon
 
- 
translatedReturns a translated copy of this polygon. Note: this polygon is not modified- Parameters:
- v- the vector that defines the translation
- Returns:
- a translated copy of this polygon
 
- 
transformApplies the specified transformation to this polygon. Note: if the applied transformation performs a mirror operation the vertex order of this polygon is reversed.- Parameters:
- transform- the transformation to apply
- Returns:
- this polygon
 
- 
transformedReturns a transformed copy of this polygon. Note: if the applied transformation performs a mirror operation the vertex order of this polygon is reversed. Note: this polygon is not modified- Parameters:
- transform- the transformation to apply
- Returns:
- a transformed copy of this polygon
 
- 
fromPointsCreates a polygon from the specified point list.- Parameters:
- points- the points that define the polygon
- shared- shared property storage
- Returns:
- a polygon defined by the specified point list
 
- 
fromPointsCreates a polygon from the specified point list.- Parameters:
- points- the points that define the polygon
- Returns:
- a polygon defined by the specified point list
 
- 
fromPointsCreates a polygon from the specified points.- Parameters:
- points- the points that define the polygon
- Returns:
- a polygon defined by the specified point list
 
- 
getBoundsReturns the bounds of this polygon.- Returns:
- bouds of this polygon
 
- 
contains
- 
getIntersection
- 
getIntersection
- 
contains
- 
getStorage- Returns:
- the shared
 
 
-