Documentation ¶
Index ¶
- Constants
- func Hex128(uuid [24]byte) string
- func NextUUId() string
- func ValidHex128(id string) bool
- type CHSegment
- type Compiler
- type ConvexHull
- type Element
- type Generator
- type GrahamScan
- type Input
- type InputLight
- type InputPlayer
- type InputSector
- type InputSegment
- func (is *InputSegment) AddNeighbor(p0 XY, p1 XY, neighbor string)
- func (is *InputSegment) AddProperty(p0 XY, p1 XY, wall bool, upper string, middle string, lower string)
- func (is *InputSegment) AnyCoords(tst *InputSegment) bool
- func (is *InputSegment) Build() []*InputSegment
- func (is *InputSegment) Clone() *InputSegment
- func (is *InputSegment) EqualCoords(tst *InputSegment) bool
- func (is *InputSegment) Prepare()
- func (is *InputSegment) SameCoords(tst *InputSegment) bool
- type Sector
- type Segment
- type Stack
- type XY
- type XYId
- type XYZ
Constants ¶
View Source
const ( DefinitionValid = 3 DefinitionVoid = 1 DefinitionWall = 2 DefinitionUnknown = 0 )
View Source
const ( SegmentDataWall = 0 SegmentDataTexture = iota SegmentDataNeighbor = iota )
Variables ¶
This section is empty.
Functions ¶
func ValidHex128 ¶
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler() *Compiler
func (*Compiler) GetMaxHeight ¶
func (*Compiler) GetSectors ¶
type ConvexHull ¶
type ConvexHull struct { }
func NewConvexHull ¶
func NewConvexHull() *ConvexHull
func (*ConvexHull) Create ¶
func (ch *ConvexHull) Create(id string, inputSegments []*CHSegment) []*CHSegment
func (*ConvexHull) FromSector ¶
func (ch *ConvexHull) FromSector(sector *Sector) []*Segment
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func MustNewGenerator ¶
func MustNewGenerator() *Generator
func NewGenerator ¶
type GrahamScan ¶
type GrahamScan struct {
// contains filtered or unexported fields
}
type Input ¶
type Input struct { Sectors []*InputSector `json:"sectors"` Lights []*InputLight `json:"lights"` Player *InputPlayer `json:"player"` ScaleFactor float64 `json:"scaleFactor"` DisableLoop bool `json:"disableLoop"` }
type InputLight ¶
type InputPlayer ¶
type InputSector ¶
type InputSector struct { Id string `json:"id"` Ceil float64 `json:"ceil"` Floor float64 `json:"floor"` Textures bool `json:"textures"` FloorTexture string `json:"floorTexture"` CeilTexture string `json:"ceilTexture"` UpperTexture string `json:"upperTexture"` LowerTexture string `json:"lowerTexture"` WallTexture string `json:"wallTexture"` Segments []*InputSegment `json:"segments"` Tag string `json:"tag"` }
func NewInputSector ¶
func NewInputSector(id string) *InputSector
func (*InputSector) Clone ¶
func (is *InputSector) Clone(cloneSegments bool) *InputSector
type InputSegment ¶
type InputSegment struct { Parent string `json:"id"` Id string `json:"id"` Start XY `json:"start"` End XY `json:"end"` Kind int `json:"kind"` Neighbor string `json:"neighbor"` Tag string `json:"tag"` Upper string `json:"upper"` Middle string `json:"middle"` Lower string `json:"lower"` // contains filtered or unexported fields }
func NewInputSegment ¶
func NewInputSegment(parent string, kind int, s XY, e XY) *InputSegment
func (*InputSegment) AddNeighbor ¶
func (is *InputSegment) AddNeighbor(p0 XY, p1 XY, neighbor string)
func (*InputSegment) AddProperty ¶
func (*InputSegment) AnyCoords ¶
func (is *InputSegment) AnyCoords(tst *InputSegment) bool
func (*InputSegment) Build ¶
func (is *InputSegment) Build() []*InputSegment
func (*InputSegment) Clone ¶
func (is *InputSegment) Clone() *InputSegment
func (*InputSegment) EqualCoords ¶
func (is *InputSegment) EqualCoords(tst *InputSegment) bool
func (*InputSegment) Prepare ¶
func (is *InputSegment) Prepare()
func (*InputSegment) SameCoords ¶
func (is *InputSegment) SameCoords(tst *InputSegment) bool
type Sector ¶
type Sector struct { Id string Floor float64 Ceil float64 Segments []*Segment Textures bool Tag string FloorTexture *textures.Texture CeilTexture *textures.Texture UpperTexture *textures.Texture LowerTexture *textures.Texture WallTexture *textures.Texture // contains filtered or unexported fields }
func (*Sector) GetCompileId ¶
type Segment ¶
func NewSegment ¶
Click to show internal directories.
Click to hide internal directories.