Class BasePoint<T extends Number>
java.lang.Object
com.j3d.engine.math.BasePoint<T>
- Type Parameters:
T- The type of the given point, which can either be anIntegerorDoubleor any other thing that extendsNumber
- Direct Known Subclasses:
CartesianPoint, ScreenPoint
public abstract sealed class BasePoint<T extends Number>
extends Object
permits CartesianPoint, ScreenPoint
Base Point is a generic 2D point base class
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareCollinear(CartesianPoint p1, CartesianPoint p2, CartesianPoint p3) A static class that checks if 3CartesianPoints lie on the same line (Are collinear)getId()void
-
Field Details
-
x
-
y
-
id
-
-
Constructor Details
-
BasePoint
-
-
Method Details
-
getId
-
setId
-
areCollinear
@Contract(pure=true) public static boolean areCollinear(@NotNull CartesianPoint p1, @NotNull CartesianPoint p2, @NotNull CartesianPoint p3) A static class that checks if 3CartesianPoints lie on the same line (Are collinear)- Parameters:
p1- Point 1p2- Point 2p3- Poit 3- Returns:
- A boolean value indicating whether the points are collinear or not.
-