| Package | Description |
|---|---|
| net.lecousin.framework.geometry |
Geometry utility classes.
|
| Modifier and Type | Field and Description |
|---|---|
Point2DInt |
Line2DInt.p1 |
Point2DInt |
Line2DInt.p2 |
Point2DInt |
Rectangle2DInt.position |
Point2DInt |
Rectangle2DInt.size |
| Modifier and Type | Method and Description |
|---|---|
Point2DInt |
Line2DInt.getAbsoluteIntersection(Line2DInt line)
return the intersection point of the lines considering the lines as infinite, or null if they are on the same alignement.
|
Point2DInt[] |
Rectangle2DInt.getIntersection(Line2DInt line)
return the intersection points between this rectangle and the given line: it may returns 0, 1 or 2 points.
|
Point2DInt |
Line2DInt.getIntersection(Line2DInt line)
return the intersection point between this line and the given one, or null if there is no intersection or they are the same.
|
Point2DInt[] |
Line2DInt.getIntersection(Rectangle2DInt r)
return the intersection points between this line and the given rectangle: it may returns 0 to 2 points,
or null if the line is on a rectangle border.
|
Point2DInt[] |
Rectangle2DInt.getIntersectionPoints(Rectangle2DInt r)
return the intersection points between this rectangle and the given one or null if both are equals:
it may return 0 to 2 points (1 point being the case where only one of their corner is common).
|
Point2DInt |
Point2DInt.translate(Point2DInt translation)
Return a new point being this point with the given translation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Rectangle2DInt.contains(Point2DInt point)
return true if the given point is contained within this rectangle.
|
boolean |
Rectangle2DInt.contains(Point2DInt point,
int tolerance)
return true if the given point is contained within this rectangle.
|
boolean |
Line2DInt.contains(Point2DInt point,
int tolerance)
return true if the point is on the line.
|
boolean |
Line2DInt.containsAbsolute(Point2DInt point,
int tolerance)
return true if the point is on the line considering the line as infinite.
|
double |
Point2DInt.getDistance(Point2DInt c)
Return the distance between this point and the given one.
|
Point2DInt |
Point2DInt.translate(Point2DInt translation)
Return a new point being this point with the given translation.
|
| Constructor and Description |
|---|
Line2DInt(Point2DInt point1,
Point2DInt point2)
Constructor.
|
Point2DInt(Point2DInt copy)
Constructor.
|
Rectangle2DInt(Point2DInt position,
Point2DInt size)
Constructor.
|
Copyright © 2017. All rights reserved.