jsl/geometry/box¶
Package name: jsl/geometry/box
Summary¶
Data Types¶
NegativeBoxError¶
Constructors¶
Function | Description |
---|---|
NegativeBoxError | Constructor for defstruct NegativeBoxError |
Box¶
Axis-Aligned Box
Definitions¶
NegativeBoxError¶
public defstruct NegativeBoxError <: Exception :
hi: Point
lo: Point
-
hi: Point
-
lo: Point
Constructors¶
NegativeBoxError¶
Constructor for defstruct NegativeBoxError
public defn NegativeBoxError (lo:Point, hi:Point)
Box¶
Axis-Aligned Box
public defstruct Box <: Equalable :
hi: Point
lo: Point
-
hi: Point
-
lo: Point
Functions¶
contains?¶
public defn contains? (b:Box, p:Point) -> True|False
- Returns
True|False
contains?¶
public defn contains? (b1:Box, b2:Box) -> True|False
- Returns
True|False
down¶
public defn down (b:Box)
fatten¶
public defn fatten (dims:Point, b:Box) -> Box
- Returns
Box
fatten¶
public defn fatten (dims:Double, b:Box) -> Box
- Returns
Box
left¶
public defn left (b:Box)
shrink¶
public defn shrink (dims:Point, b:Box) -> Box
- Returns
Box
shrink¶
public defn shrink (dims:Double, b:Box) -> Box
- Returns
Box
intersects?¶
public defn intersects? (b0:Box, b1:Box) -> True|False
- Returns
True|False
min-width¶
public defn min-width (b:Box) -> Double
- Returns
Double
Box¶
Constructor for Box Type
public defn Box (lo:Point, hi:Point)
lo: Point
- Point for the down/left positionhi: Point
- Point for the up/right position- Throws
NegativeBoxError
- If thehi
point is not greater than or equal to thelo
point.
The lo
point must be less than or equal to the hi
point for both X and Y axises.
Box¶
public defn Box (v:Point) -> Box
- Returns
Box
dims¶
public defn dims (b:Box) -> Point
- Returns
Point
transform¶
public defn transform (pose:Pose, b:Box) -> Box
- Returns
Box
area¶
public defn area (b:Box) -> Double
- Returns
Double
union¶
public defn union (b:Box, v:Point) -> Box
- Returns
Box
union¶
public defn union (b0:Box, b1:Box) -> Box
- Returns
Box
bounds¶
public defn bounds (e:Shape) -> Box
- Returns
Box
center¶
public defn center (b:Box) -> Point
- Returns
Point
up¶
public defn up (b:Box)
dims-to-box¶
public defn dims-to-box (dims:Point) -> Box
- Returns
Box
right¶
public defn right (b:Box)
to-Rectangle¶
public defn to-Rectangle (b:Box) -> Rectangle
- Returns
Rectangle
to-Dims¶
public defn to-Dims (b:Box) -> Dims
- Returns
Dims
corners¶
public defn corners (b:Box) -> [Point, Point, Point, Point]
- Returns
[Point, Point, Point, Point]
inf-box¶
public defn inf-box () -> Box
- Returns
Box