Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoxModel ¶
type BoxModel interface { // Inside returns the number of boxes inside the shape. Inside() int // InsideCursor returns a cursor that will iterate over all the boxes // inside the shape. InsideCursor() (Iterator, box.Box, bool) // Perimeter returns the number of boxes that contain the perimeter. Perimeter() int // PerimeterCursor returns a cursor that will iterate over all the boxes // on the perimeter of the shape. PerimeterCursor() (Iterator, box.Box, bool) // Outside returns the number of boxes outside the shape. Outside() int // OutsideCursor returns a cursor that will iterate over all the boxes // inside the shape. OutsideCursor() (Iterator, box.Box, bool) // Area is an approximation of the area of the shape. It is the sum of all // the boxes inside the shape and half the area of the boxes on the // perimeter. Area() float64 // SignedArea is the same as Area. SignedArea() float64 ConvexHull() []d2.Pt // Centroid is the center of mass of the shape. Centroid() d2.Pt // contains filtered or unexported methods }
BoxModel represents a shape that has been encoded as a set of boxes.
Click to show internal directories.
Click to hide internal directories.