Documentation ¶
Index ¶
- Variables
- func Det(a, b, c, d float64) float64
- func GetTanAngle(l1 *Line, l2 *Line) float64
- func Inside(v, min, max float64) bool
- type Line
- func FindCutLine(square float64, res *Polygons) (*Line, bool)
- func GetBisector(l1 *Line, l2 *Line) *Line
- func GetCut(l1 *Line, l2 *Line, s float64, poly1 *Polygon, poly2 *Polygon) (*Line, bool)
- func NewDirectedLine(p *Vector, d *Vector) *Line
- func NewEmptyLine() *Line
- func NewLineByValues(a, b, c float64) *Line
- func NewLineByVector(start, end *Vector) *Line
- func (l *Line) CrossLineLine(line *Line) (*Vector, bool)
- func (l *Line) CrossLineSegment(line *Line) (*Vector, bool)
- func (l *Line) CrossSegmentSegment(line *Line) (*Vector, bool)
- func (l *Line) GetDistance(point *Vector) float64
- func (l *Line) GetLineNearestPoint(point *Vector) *Vector
- func (l *Line) GetPointAlong(t float64) *Vector
- func (l *Line) GetSegmentNearestPoint(point *Vector) *Vector
- func (l *Line) Length() float64
- func (l *Line) PointSide(point *Vector) int
- func (l *Line) Reverse() *Line
- func (l *Line) SquareLength() float64
- type Polygon
- func (p *Polygon) Add(vector *Vector)
- func (p *Polygon) Clear()
- func (p *Polygon) CountCenter() *Vector
- func (p *Polygon) CountSquare() float64
- func (p *Polygon) CreateSubPoly(line1 int, line2 int) (*Polygon, *Polygon)
- func (p *Polygon) Empty() bool
- func (p *Polygon) FindDistance(point *Vector) float64
- func (p *Polygon) FindNearestPoint(point *Vector) *Vector
- func (p *Polygon) IsClockwise() bool
- func (p *Polygon) IsPointInside(point *Vector) bool
- func (p *Polygon) IsSegmentInsidePoly(l *Line, excludeLine1 int, excludeLine2 int) bool
- func (p *Polygon) Length() int
- func (p *Polygon) Split(square float64) (*Polygon, *Polygon, *Line, bool)
- func (p *Polygon) SplitNearestEdge(point *Vector)
- func (p *Polygon) ToLatLng(divider float64) []s2.LatLng
- func (p *Polygon) ToPoints() []s2.Point
- func (p *Polygon) Vector(i int) *Vector
- type Polygons
- type Vector
- func (v *Vector) Add(vector *Vector) *Vector
- func (v *Vector) Div(vector *Vector) *Vector
- func (v *Vector) DivConstant(value float64) *Vector
- func (v *Vector) Dot(vector *Vector) float64
- func (v *Vector) Equal(vector *Vector) bool
- func (v *Vector) Length() float64
- func (v *Vector) Mul(vector *Vector) *Vector
- func (v *Vector) MulConstant(value float64) *Vector
- func (v *Vector) Norm() *Vector
- func (v *Vector) SquareLength() float64
- func (v *Vector) Sub(vector *Vector) *Vector
- type Vectors
Constants ¶
This section is empty.
Variables ¶
View Source
var Eps = 1e-6
Functions ¶
func GetTanAngle ¶
Types ¶
type Line ¶
func GetBisector ¶
func NewDirectedLine ¶
func NewEmptyLine ¶
func NewEmptyLine() *Line
func NewLineByValues ¶
func NewLineByVector ¶
func (*Line) GetDistance ¶
func (*Line) GetLineNearestPoint ¶
func (*Line) GetPointAlong ¶
func (*Line) GetSegmentNearestPoint ¶
func (*Line) SquareLength ¶
type Polygon ¶
type Polygon struct {
Poly Vectors
}
func NewEmptyPolygon ¶
func NewEmptyPolygon() *Polygon
func NewPolygon ¶
func (*Polygon) CountCenter ¶
func (*Polygon) CountSquare ¶
func (*Polygon) CreateSubPoly ¶
func (*Polygon) FindDistance ¶
func (*Polygon) FindNearestPoint ¶
func (*Polygon) IsClockwise ¶
func (*Polygon) IsPointInside ¶
func (*Polygon) IsSegmentInsidePoly ¶
func (*Polygon) SplitNearestEdge ¶
type Polygons ¶
type Polygons struct { Bisector *Line LeftTriangle *Polygon Trapezoid *Polygon RightTriangle *Polygon P1Exist bool P2Exist bool P3Exist bool P4Exist bool LeftTriangleSquare float64 TrapezoidSquare float64 RightTriangleSquare float64 TotalSquare float64 }
func NewEmptyPolygons ¶
func NewEmptyPolygons() *Polygons
func NewPolygonsFromLine ¶
type Vector ¶
func NewVectorByGeo ¶
NewVectorByGeo - creates a new vector by providing the underlying object
func (*Vector) DivConstant ¶
func (*Vector) MulConstant ¶
func (*Vector) SquareLength ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.