Package com.solibri.geometry.primitive2d
Interface Triangle2d
- All Known Subinterfaces:
MTriangle2d
Read-only interface for 2-dimensional triangles.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic Triangle2d
Creates a new instance.static Triangle2d
create
(Triangle2d other) Creates a new instance.static Triangle2d
Creates a new instance.Returns the first point of the triangle.Returns the second point of the triangle.Returns the third point of the triangle.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface com.solibri.geometry.primitive2d.Polygon2d
contains, contains, distance, distance, distance, distanceSquared, distanceSquared, distanceSquared, getArea, getBoundingRectangle, getCentroid, getEdgeIterator, getOrientedBoundingRectangle, getPerimeter, getVertexCount, getVertices, intersectEdges, intersects, isConvex, isCounterClockwise, shortestSegmentTo, toArea
-
Method Details
-
getFirstPoint
Vector2d getFirstPoint()Returns the first point of the triangle.- Returns:
- the first point of the triangle
- Since:
- 9.10.2
-
getSecondPoint
Vector2d getSecondPoint()Returns the second point of the triangle.- Returns:
- the second point of the triangle
- Since:
- 9.10.2
-
getThirdPoint
Vector2d getThirdPoint()Returns the third point of the triangle.- Returns:
- the third point of the triangle
- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
points
- list of points- Returns:
- the newly created instance
- Throws:
IllegalArgumentException
- if the list does not contain exactly three points- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
firstPoint
- the first pointsecondPoint
- the second pointthirdPoint
- the thirdPoint- Returns:
- the newly created instance
- Throws:
IllegalArgumentException
- if the list does not contain exactly three points- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
other
- the other triangle- Returns:
- the newly created instance
- Since:
- 9.10.2
-