public interface MTriangle2d extends Triangle2d, MPolygon2d
Modifier and Type | Method and Description |
---|---|
static MTriangle2d |
create()
Creates a new instance with all points in the origin.
|
static MTriangle2d |
create(List<? extends Vector2d> points)
Creates a new instance.
|
static MTriangle2d |
create(Triangle2d other)
Creates a new instance.
|
static MTriangle2d |
create(Vector2d firstPoint,
Vector2d secondPoint,
Vector2d thirdPoint)
Creates a new instance.
|
void |
setFirstPoint(Vector2d firstPoint)
Sets the first point of this triangle to the value of the given point.
|
void |
setPoints(Vector2d firstPoint,
Vector2d secondPoint,
Vector2d thirdPoint)
Sets the given points to the triangle.
|
void |
setSecondPoint(Vector2d secondPoint)
Sets the second point of this triangle to the value of the given point.
|
void |
setThirdPoint(Vector2d thirdPoint)
Sets the third point of this triangle to the value of the given point.
|
getFirstPoint, getSecondPoint, getThirdPoint
create, resize, simplify, translate
contains, contains, distance, distance, distance, distanceSquared, distanceSquared, distanceSquared, getArea, getBoundingRectangle, getCentroid, getEdgeIterator, getOrientedBoundingRectangle, getPerimeter, getVertexCount, getVertices, intersectEdges, intersects, isConvex, isCounterClockwise, shortestSegmentTo, toArea
forEach, iterator, spliterator
void setFirstPoint(Vector2d firstPoint)
firstPoint
- the value that is set to be the first point of this
trianglevoid setSecondPoint(Vector2d secondPoint)
secondPoint
- the value that is set to be the second point of this
trianglevoid setThirdPoint(Vector2d thirdPoint)
thirdPoint
- the value that is set to be third point of this trianglevoid setPoints(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)
firstPoint
- the first pointsecondPoint
- the second pointthirdPoint
- the third pointstatic MTriangle2d create(List<? extends Vector2d> points)
create
in interface MPolygon2d
create
in interface Polygon2d
create
in interface Triangle2d
points
- list of pointsIllegalArgumentException
- if the list does not contain exactly three
pointsstatic MTriangle2d create(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)
create
in interface Triangle2d
firstPoint
- the first pointsecondPoint
- the second pointthirdPoint
- the thirdPointIllegalArgumentException
- if the list does not contain exactly three
pointsstatic MTriangle2d create(Triangle2d other)
create
in interface Triangle2d
other
- the other trianglestatic MTriangle2d create()
Copyright © 2019 Solibri, Inc.. All rights reserved.