Versions in this module Expand all Collapse all v0 v0.1.0 Jul 29, 2024 Changes in this version + const DefaultSRS + const ErrCancelled + const ErrCoincidentalEdges + const ErrDidNotFindToFrom + const ErrInvalidEndVertex + const ErrInvalidStartingVertex + const ErrTestDBNil + const RoundingFactor + const TableNameAssociatedLinestrings + const TableNameAssociatedPoints + const TableNameSubdivision + const TableNameSubdivisionEdge + const TestDBInsertEdgeSQL + const TestDBInsertLineStringSQL + const TestDBInsertPointSQL + const TestDBInsertSDSQL + func DumpSubdivision(sd *Subdivision) + func DumpSubdivisionW(w io.Writer, sd *Subdivision) + func ErrAssumptionFailed() error + func FindIntersectingEdges(order winding.Order, startingEdge, endingEdge *quadedge.Edge) (edges []*quadedge.Edge, err error) + func IsFrameEdge(frame [3]geom.Point, es ...*quadedge.Edge) bool + func IsFramePoint(frame [3]geom.Point, pts ...geom.Point) bool + func IsHardFrameEdge(frame [3]geom.Point, e *quadedge.Edge) bool + func ResolveStartingEndingEdges(order winding.Order, vertexIndex VertexIndex, start, end geom.Point) (startingEdge, endingEdge *quadedge.Edge, exists bool, err error) + func ToggleDebug() + func WalkAllEdges(se *quadedge.Edge, fn func(e *quadedge.Edge) error) error + func WalkAllTriangles(ctx context.Context, se *quadedge.Edge, ...) + type PseudoPolygonPointCollector struct + End geom.Point + Order winding.Order + Start geom.Point + func (pppc *PseudoPolygonPointCollector) AddEdge(e *quadedge.Edge) error + func (pppc *PseudoPolygonPointCollector) AddPoint(pt geom.Point) error + func (pppc *PseudoPolygonPointCollector) Edges(upper bool) ([]geom.Line, error) + func (pppc *PseudoPolygonPointCollector) SharedLine() geom.Line + type Subdivision struct + Order winding.Order + func New(order winding.Order, a, b, c geom.Point) *Subdivision + func NewForPoints(ctx context.Context, order winding.Order, points [][2]float64) (sd *Subdivision, err error) + func NewSubdivisionFromGeomLines(lines []geom.Line, order winding.Order) *Subdivision + func (sd *Subdivision) InsertConstraint(ctx context.Context, vertexIndex VertexIndex, start, end geom.Point) (err error) + func (sd *Subdivision) InsertSite(x geom.Point) bool + func (sd *Subdivision) IsValid(ctx context.Context) bool + func (sd *Subdivision) StartingEdge() *quadedge.Edge + func (sd *Subdivision) Triangles(includeFrame bool) (triangles [][3]geom.Point, err error) + func (sd *Subdivision) Validate(ctx context.Context) error + func (sd *Subdivision) VertexIndex() VertexIndex + func (sd *Subdivision) WalkAllEdges(fn func(e *quadedge.Edge) error) error + type SubdivisionInsertionDump struct + Point [2]float64 + SD *Subdivision + func (sdid *SubdivisionInsertionDump) DumpAllEdges() string + type TestDB struct + func OpenTestDB(filename string) (*TestDB, error) + func (db *TestDB) Get(id int64) (*Subdivision, error) + func (db *TestDB) Order(_ int64) (winding.Order, error) + func (db *TestDB) PrepareStatements() error + func (db *TestDB) SubdivisionFrom(id int64, name, description string, pts ...geom.Point) (int64, error) + func (db *TestDB) Write(name, description string, sd *Subdivision) (int64, error) + func (db *TestDB) WriteContained(name, description string, sd *Subdivision, start, end geom.Point) (int64, error) + func (db *TestDB) WriteEdge(id int64, function, description string, edge *quadedge.Edge) error + func (db *TestDB) WriteLineString(id int64, function, description string, line geom.LineString) error + func (db *TestDB) WritePoint(id int64, function, description string, point geom.Point) error + type Triangle struct + func NewTriangle(e *quadedge.Edge) Triangle + func (t Triangle) AsGeom() (tri geom.Triangle) + func (t Triangle) IntersectsPoint(pt geom.Point) bool + func (t Triangle) OppositeTriangle(p geom.Point) (*Triangle, error) + func (t Triangle) OppositeVertex(other Triangle) *geom.Point + func (t Triangle) SharedEdge(other Triangle) *quadedge.Edge + func (t Triangle) StartingEdge() *quadedge.Edge + type VertexIndex map[geom.Point]*quadedge.Edge + func NewVertexIndex(startingEdge *quadedge.Edge) VertexIndex + func (vx VertexIndex) Add(e *quadedge.Edge) + func (vx VertexIndex) Get(pt geom.Point) (*quadedge.Edge, bool) + func (vx VertexIndex) Remove(e *quadedge.Edge)