public final class Geom extends Object
Modifier and Type | Method and Description |
---|---|
static Coord |
createCoord()
Create a coord.
|
static Coord |
createCoord(Coord coord)
Create a coord.
|
static Coord |
createCoord(double x,
double y)
Create a coord.
|
static Line |
createLine()
Create a line.
|
static Line |
createLine(double x1,
double y1,
double x2,
double y2)
Create a line.
|
static Line |
createLine(Line line)
Create a line.
|
static Point |
createPoint()
Create a point.
|
static Point |
createPoint(int x,
int y)
Create a point.
|
static Point |
createPoint(Point point)
Create a point.
|
static Polygon |
createPolygon()
Create a polygon.
|
static Rectangle |
createRectangle()
Create a rectangle.
|
static Rectangle |
createRectangle(double x,
double y,
double w,
double h)
Create a rectangle.
|
static Rectangle |
createRectangle(Rectangle rectangle)
Create a rectangle.
|
static Coord |
intersection(Line l1,
Line l2)
Get the intersection point of two lines.
|
public static Point createPoint()
public static Point createPoint(Point point)
point
- The original point.LionEngineException
- If point is invalid.public static Point createPoint(int x, int y)
x
- The x coordinate of the point.y
- The y coordinate of the point.public static Coord createCoord()
public static Coord createCoord(Coord coord)
coord
- The original coord.LionEngineException
- If coord is invalid.public static Coord createCoord(double x, double y)
x
- The x coordinate.y
- The y coordinate.public static Coord intersection(Line l1, Line l2)
l1
- The first line.l2
- The second line.public static Line createLine()
public static Line createLine(Line line)
line
- The original line.LionEngineException
- If line is invalid.public static Line createLine(double x1, double y1, double x2, double y2)
x1
- The x coordinate of the start point.y1
- The y coordinate of the start point.x2
- The x coordinate of the end point.y2
- The y coordinate of the end point.public static Rectangle createRectangle()
public static Rectangle createRectangle(Rectangle rectangle)
rectangle
- The original rectangle.LionEngineException
- If rectangle is invalid.public static Rectangle createRectangle(double x, double y, double w, double h)
x
- The horizontal location.y
- The vertical location.w
- The rectangle width.h
- The rectangle height.public static Polygon createPolygon()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.