Package com.solibri.geometry.primitive2d
Interface MTriangle2d
- All Superinterfaces:
Iterable<Vector2d>,MPolygon2d,Polygon2d,Triangle2d
public interface MTriangle2d extends Triangle2d, MPolygon2d
Interface that represents a triangle in the XY-plane.
- Since:
- 9.10.2
-
Method Summary
Modifier and Type Method Description static MTriangle2dcreate()Creates a new instance with all points in the origin.static MTriangle2dcreate(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)Creates a new instance.static MTriangle2dcreate(Triangle2d other)Creates a new instance.static MTriangle2dcreate(List<? extends Vector2d> points)Creates a new instance.voidsetFirstPoint(Vector2d firstPoint)Sets the first point of this triangle to the value of the given point.voidsetPoints(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)Sets the given points to the triangle.voidsetSecondPoint(Vector2d secondPoint)Sets the second point of this triangle to the value of the given point.voidsetThirdPoint(Vector2d thirdPoint)Sets the third point of this triangle to the value of the given point.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface com.solibri.geometry.primitive2d.MPolygon2d
resize, simplify, translateMethods 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, toAreaMethods inherited from interface com.solibri.geometry.primitive2d.Triangle2d
getFirstPoint, getSecondPoint, getThirdPoint
-
Method Details
-
setFirstPoint
Sets the first point of this triangle to the value of the given point. This triangle does not take ownership of the given point.- Parameters:
firstPoint- the value that is set to be the first point of this triangle- Since:
- 9.10.2
-
setSecondPoint
Sets the second point of this triangle to the value of the given point. This triangle does not take ownership of the given point.- Parameters:
secondPoint- the value that is set to be the second point of this triangle- Since:
- 9.10.2
-
setThirdPoint
Sets the third point of this triangle to the value of the given point. This triangle does not take ownership of the given point.- Parameters:
thirdPoint- the value that is set to be third point of this triangle- Since:
- 9.10.2
-
setPoints
Sets the given points to the triangle.- Parameters:
firstPoint- the first pointsecondPoint- the second pointthirdPoint- the third point- 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
-
create
Creates a new instance with all points in the origin.- Returns:
- the newly created instance
- Since:
- 9.10.2
-