Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- fromConcavePoints(Vector3d...)
- fromConcavePoints(List)
- clone()
- flip()
- flipped()
- toStlString()
- toStlString(StringBuilder)
- translate(Vector3d)
- translated(Vector3d)
- transform(Transform)
- transformed(Transform)
- fromPoints(List, PropertyStorage)
- fromPoints(List)
- fromPoints(Vector3d...)
- getBounds()
- contains(Vector3d)
- getIntersection(Straight)
- getIntersection(Vector3d, Vector3d)
- contains(Polygon)
- getStorage()
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
boolean
flip()
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 Polygon
fromPoints
(Vector3d... points) Creates a polygon from the specified points.static Polygon
fromPoints
(List<Vector3d> points) Creates a polygon from the specified point list.static Polygon
fromPoints
(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
-
Constructor Details
-
Polygon
Constructor. 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 verticesshared
- shared property
-
Polygon
-
Polygon
Constructor. 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
-
fromConcavePoints
-
fromConcavePoints
-
clone
-
flip
-
flipped
Returns a flipped copy of this polygon. Note: this polygon is not modified.- Returns:
- a flipped copy of this polygon
-
toStlString
Returns this polygon in STL string format.- Returns:
- this polygon in STL string format
-
toStlString
Returns this polygon in STL string format.- Parameters:
sb
- string builder- Returns:
- the specified string builder
-
translate
-
translated
-
transform
-
transformed
Returns 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
-
fromPoints
Creates a polygon from the specified point list.- Parameters:
points
- the points that define the polygonshared
- shared property storage- Returns:
- a polygon defined by the specified point list
-
fromPoints
-
fromPoints
-
getBounds
-
contains
-
getIntersection
-
getIntersection
-
contains
-
getStorage
- Returns:
- the shared
-