Documentation
¶
Index ¶
- type Box
- func (b *Box) Area() float64
- func (b *Box) BoundingBox() (min, max d2.Pt)
- func (b *Box) Centroid() d2.Pt
- func (b *Box) Contains(p d2.Pt) bool
- func (b *Box) ConvexHull() []d2.Pt
- func (b *Box) LineIntersections(l line.Line, buf []float64) []float64
- func (b *Box) Perimeter() float64
- func (b *Box) Side(n int) line.Line
- func (b *Box) Sides() *[4]line.Line
- func (b *Box) SignedArea() float64
- func (b *Box) V() d2.V
- func (b *Box) Vertex(n int) d2.Pt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶
Box is a rectangle that lies orthoganal to the plane. The first point should be the min point and the second should be the max.
func (*Box) BoundingBox ¶
BoundingBox fulfils shape.BoundingBoxer and shape.Shape.
func (*Box) Contains ¶
Contains returns true of the box contains the point. Fulfills shape.Container and shape.Shape.
func (*Box) ConvexHull ¶
ConvexHull fulfills shape.ConvexHuller. Returns the 4 corners of the box.
func (*Box) LineIntersections ¶
LineIntersections returning the sides of the box that are intersected. Fulfills line.Intersector and shape.Shape.
func (*Box) SignedArea ¶
SignedArea of the box fulling shape.Area. If the box is well formed the area should always be positive.
Click to show internal directories.
Click to hide internal directories.