Getting one
scene:tileAt(…):getWallObject():getConvexHull()
scene:tileAt(…):getWallObject():getConvexHull2()
scene:tileAt(…):getDecorativeObject():getConvexHull()
Methods
| Method | Returns | Description |
|---|
contains(number, number) | boolean | (Shape, number, number) -> boolean: Whether the point is inside, by the shape's winding rule (a Rectangle with whole coordinates tests… |
|---|
contains(Point) | boolean |
|---|
contains(Rectangle) | boolean |
|---|
intersects(number, number, number, number) | boolean | (Shape, number, number, number, number) -> boolean: Whether the shape's interior meets the rectangle's. |
|---|
intersects(Rectangle2D) | boolean |
|---|
getBounds() | Rectangle | The integer bounding rectangle: the exact bounds with their edges rounded outward to whole pixels. |
|---|
getBounds2D() | Rectangle2D | The exact bounding rectangle. |
|---|
Returned by
| Method | Returns | Description |
|---|
Actor.getConvexHull | Shape? | The outline of the actor's model on the canvas this frame: the convex hull of the model the client builds for it, at its local location and… |
|---|
DecorativeObject.getConvexHull | Shape? | The outline of its first model on the canvas, at its offsets; nil when it does not project, has no readable model or is gone. |
|---|
DecorativeObject.getConvexHull2 | Shape? | The outline of its second model, at the second offsets. |
|---|
GameObject.getConvexHull | Shape? | The outline of its model on the canvas (the convex hull of its projected vertices, at its local position, model orientation and height; an… |
|---|
Graphics.getClip | Shape? | The clip in user space, or nil with none. |
|---|
GroundObject.getConvexHull | Shape? | The outline of its model on the canvas, nil when it does not project, has no readable model or is gone. |
|---|
TileObject.getClickbox | Shape? | The shape a click on it lands in, on the canvas: its model's clickbox (Perspective.getClickbox over the loc's model; a wall's two models… |
|---|
WallObject.getConvexHull | Shape? | The outline of its first model on the canvas, nil when it does not project, has no readable model or is gone. |
|---|
WallObject.getConvexHull2 | Shape? | The outline of its second model (a corner wall's other side), as getConvexHull(). |
|---|
Method details
contains: ((Shape, number, number) -> boolean) & ((Shape, Point) -> boolean) & ((Shape, Rectangle) -> boolean)
(Shape, number, number) -> boolean: Whether the point is inside, by the shape's winding rule (a Rectangle with whole coordinates tests as its contains(int, int)).
(Shape, Point) -> boolean: Whether p is inside.
(Shape, Rectangle) -> boolean: Whether r is entirely inside.
intersects: ((Shape, number, number, number, number) -> boolean) & ((Shape, Rectangle2D) -> boolean)
(Shape, number, number, number, number) -> boolean: Whether the shape's interior meets the rectangle's.
(Shape, Rectangle) -> boolean: Whether the shape meets r.
(Shape, Rectangle2D) -> boolean: Whether the shape meets r.
getBounds: (Shape) -> Rectangle
The integer bounding rectangle: the exact bounds with their edges rounded outward to whole pixels.
getBounds2D: (Shape) -> Rectangle2D
The exact bounding rectangle.