- All Implemented Interfaces:
Triangle
A default
Triangle
implementation.
Does store the references to the original points on creation. Getters of the
vertices return the same reference everytime.
- Since:
- 2.0.0
- See Also:
-
-
Constructor Summary
Constructors
Creates a new Polygon3
instance.
-
Method Summary
Gets the first vertex of this triangle.
Gets the second vertex of this triangle.
Gets the third vertex of this triangle.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Polygon3
Creates a new Polygon3
instance.
- Parameters:
v1
- the first vertex
v2
- the second vertex
v3
- the third vertex
- Throws:
NullPointerException
- if at least one parameter is null
- Since:
- 2.0.0
-
Method Details
-
v1
Description copied from interface: Triangle
Gets the first vertex of this triangle.
- Specified by:
v1
in interface Triangle
- Returns:
- the first vertex
-
v2
Description copied from interface: Triangle
Gets the second vertex of this triangle.
- Specified by:
v2
in interface Triangle
- Returns:
- the second vertex
-
v3
Description copied from interface: Triangle
Gets the third vertex of this triangle.
- Specified by:
v3
in interface Triangle
- Returns:
- the third vertex