phenix

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ToggleDebug func()

Functions

This section is empty.

Types

type Check

type Check struct {
	Debug bool
	// contains filtered or unexported fields
}

func NewCheck

func NewCheck(debug bool, edges ...EDefinition) Check

func (*Check) Test

func (c *Check) Test(t *testing.T) bool

type EDefinition

type EDefinition struct {
	Name   string
	Points []LabeledPoint

	BaseName string
	Ops      []quadedge.Operation
	// contains filtered or unexported fields
}

type LabeledPoint

type LabeledPoint struct {
	Point *geom.Point
	Label string
}

type Phenix

type Phenix struct {
	Name             string
	Line             int
	Filename         string
	Subdivision      *subdivision.Subdivision
	TriangleEdge     [3]*quadedge.Edge
	TrianglePoints   [3]geom.Point
	Points           []geom.Point
	Checks           []Check
	Order            winding.Order
	VerifyCheckCount bool
}

func NewPhenix

func NewPhenix(depth int, name string, trianglePoints [3]geom.Point, points []geom.Point, checks ...Check) *Phenix

func (*Phenix) LabelForEdge

func (p *Phenix) LabelForEdge(pt geom.Point) string

func (*Phenix) LabelForPoint

func (p *Phenix) LabelForPoint(pt geom.Point) string

func (*Phenix) Test

func (p *Phenix) Test(t *testing.T)

type PointBag

type PointBag struct {
	TrianglePoints [3]geom.Point
	Points         []geom.Point
}

func (*PointBag) LabeledPoint

func (pb *PointBag) LabeledPoint(lbl string) LabeledPoint

func (*PointBag) LabeledPoints

func (pb *PointBag) LabeledPoints(lbls ...string) []LabeledPoint

func (*PointBag) NewCheck

func (pb *PointBag) NewCheck(debug bool, defs ...string) Check

func (*PointBag) NewEDefinition

func (pb *PointBag) NewEDefinition(desc string) (edef EDefinition)

func (*PointBag) NewPhenix

func (pb *PointBag) NewPhenix(name string, checkFn func(*PointBag) []Check) *Phenix

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL