Documentation ¶
Index ¶
- type BaseGeometryClass
- func (bg *BaseGeometryClass) Area() (area float64)
- func (bg *BaseGeometryClass) Centroid() (ct *Point)
- func (bg *BaseGeometryClass) GetBoundingBox() (bb *BoundingBox)
- func (bg *BaseGeometryClass) GetGeometry() (geom []Point)
- func (bg *BaseGeometryClass) InverseTransformLambertAzimuthal(radius float64, center *Point)
- func (bg *BaseGeometryClass) SetGeometry(geom []Point)
- func (bg *BaseGeometryClass) TransformLambertAzimuthal(radius float64, center *Point)
- type BoundingBox
- func (bb *BoundingBox) Centroid() (centroid *Point)
- func (bb *BoundingBox) Divide(denom *BoundingBox) (scaleX []float64)
- func (bb *BoundingBox) Grow(newBB *BoundingBox)
- func (bb *BoundingBox) MoveToOrigin() (bbOut *BoundingBox)
- func (bb *BoundingBox) Outline() (pLine *PolyLine)
- func (bb *BoundingBox) PointInside(point *Point) (within bool)
- func (bb *BoundingBox) Scale(scale float32) (bbOut *BoundingBox)
- func (bb *BoundingBox) ScaleX(scale float32) (bbOut *BoundingBox)
- func (bb *BoundingBox) ScaleY(scale float32) (bbOut *BoundingBox)
- func (bb *BoundingBox) Translate(panX [2]float32) (bbOut *BoundingBox)
- type GeometryInterface
- type Line
- type Point
- func (pt *Point) Area() (area float64)
- func (pt *Point) Centroid() (centroid *Point)
- func (pt *Point) Equal(rhs Point) bool
- func (pt *Point) GetBoundingBox() (box *BoundingBox)
- func (pt *Point) GetGeometry() (geom []Point)
- func (pt *Point) Minus(rhs *Point) (res *Point)
- func (pt *Point) Plus(rhs *Point) (res *Point)
- func (pt *Point) Scale(scale Point)
- func (pt *Point) SetGeometry(geom []Point)
- type PolyLine
- type Polygon
- type QuadMesh
- type TriMesh
- type Triangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseGeometryClass ¶
type BaseGeometryClass struct { Box *BoundingBox Geometry []Point }
func (*BaseGeometryClass) Area ¶
func (bg *BaseGeometryClass) Area() (area float64)
func (*BaseGeometryClass) Centroid ¶
func (bg *BaseGeometryClass) Centroid() (ct *Point)
func (*BaseGeometryClass) GetBoundingBox ¶
func (bg *BaseGeometryClass) GetBoundingBox() (bb *BoundingBox)
func (*BaseGeometryClass) GetGeometry ¶
func (bg *BaseGeometryClass) GetGeometry() (geom []Point)
func (*BaseGeometryClass) InverseTransformLambertAzimuthal ¶
func (bg *BaseGeometryClass) InverseTransformLambertAzimuthal(radius float64, center *Point)
func (*BaseGeometryClass) SetGeometry ¶
func (bg *BaseGeometryClass) SetGeometry(geom []Point)
func (*BaseGeometryClass) TransformLambertAzimuthal ¶
func (bg *BaseGeometryClass) TransformLambertAzimuthal(radius float64, center *Point)
type BoundingBox ¶
func BoundingBoxFromGoogleMapsZoom ¶
func BoundingBoxFromGoogleMapsZoom(vCenter Point, canvasWidth int, zoomLevel float64) (viewBox *BoundingBox)
func NewBoundingBox ¶
func NewBoundingBox(Geometry []Point) (Box *BoundingBox)
func (*BoundingBox) Centroid ¶
func (bb *BoundingBox) Centroid() (centroid *Point)
func (*BoundingBox) Divide ¶
func (bb *BoundingBox) Divide(denom *BoundingBox) (scaleX []float64)
func (*BoundingBox) Grow ¶
func (bb *BoundingBox) Grow(newBB *BoundingBox)
func (*BoundingBox) MoveToOrigin ¶
func (bb *BoundingBox) MoveToOrigin() (bbOut *BoundingBox)
func (*BoundingBox) Outline ¶
func (bb *BoundingBox) Outline() (pLine *PolyLine)
func (*BoundingBox) PointInside ¶
func (bb *BoundingBox) PointInside(point *Point) (within bool)
func (*BoundingBox) Scale ¶
func (bb *BoundingBox) Scale(scale float32) (bbOut *BoundingBox)
func (*BoundingBox) ScaleX ¶
func (bb *BoundingBox) ScaleX(scale float32) (bbOut *BoundingBox)
func (*BoundingBox) ScaleY ¶
func (bb *BoundingBox) ScaleY(scale float32) (bbOut *BoundingBox)
func (*BoundingBox) Translate ¶
func (bb *BoundingBox) Translate(panX [2]float32) (bbOut *BoundingBox)
type GeometryInterface ¶
type GeometryInterface interface { GetGeometry() []Point SetGeometry([]Point) // Allows for external transformations GetBoundingBox() *BoundingBox Area() float64 Centroid() *Point }
type Line ¶
type Line struct { Box *BoundingBox // contains filtered or unexported fields }
func (*Line) GetBoundingBox ¶
func (ln *Line) GetBoundingBox() (box *BoundingBox)
func (*Line) GetGeometry ¶
func (*Line) SetGeometry ¶
type Point ¶
type Point struct {
X [2]float32
}
func LineLineIntersection ¶
func (*Point) GetBoundingBox ¶
func (pt *Point) GetBoundingBox() (box *BoundingBox)
func (*Point) GetGeometry ¶
func (*Point) SetGeometry ¶
type Polygon ¶
type Polygon struct {
BaseGeometryClass
}
func NewPolygon ¶
func (*Polygon) PointInside ¶
type QuadMesh ¶
type QuadMesh struct { BaseGeometryClass Dimensions [2]int Attributes [][]float32 }
type TriMesh ¶
type TriMesh struct { BaseGeometryClass Triangles []Triangle Attributes [][]float32 }
func (*TriMesh) AddQuadMesh ¶
Click to show internal directories.
Click to hide internal directories.