Package com.solibri.geometry.primitive2d
Interface Triangle2d
-
- All Known Subinterfaces:
MTriangle2d
public interface Triangle2d extends Polygon2d
Read-only interface for 2-dimensional triangles.- Since:
- 9.10.2
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Triangle2dcreate(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)Creates a new instance.static Triangle2dcreate(Triangle2d other)Creates a new instance.static Triangle2dcreate(List<? extends Vector2d> points)Creates a new instance.Vector2dgetFirstPoint()Returns the first point of the triangle.Vector2dgetSecondPoint()Returns the second point of the triangle.Vector2dgetThirdPoint()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 Detail
-
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
static Triangle2d create(List<? extends Vector2d> points)
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
static Triangle2d create(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)
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
static Triangle2d create(Triangle2d other)
Creates a new instance.- Parameters:
other- the other triangle- Returns:
- the newly created instance
- Since:
- 9.10.2
-
-