galaxy

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Galaxy

type Galaxy struct {
	// contains filtered or unexported fields
}

func OpenGalaxy

func OpenGalaxy(file string) (g *Galaxy, err error)

func (*Galaxy) Close

func (g *Galaxy) Close() error

func (*Galaxy) GetSystem

func (g *Galaxy) GetSystem(edid uint64) (sys *System, err error)

func (*Galaxy) PutSystem

func (g *Galaxy) PutSystem(system *System) (err error)

type GravObject

type GravObject interface {
	GravChilds() []SystemObject
}

type SysBody

type SysBody struct {
	Type SysBodyType
	// contains filtered or unexported fields
}

func (*SysBody) GravChilds

func (so *SysBody) GravChilds() []SystemObject

func (*SysBody) Visit

func (so *SysBody) Visit(p1st bool, fn func(so SystemObject) (done bool)) bool

type SysBodyType

type SysBodyType int
const (
	UnknownBody SysBodyType = iota
	Star
	Planet
)

type SysCoos

type SysCoos [3]float32

type SysDesc

type SysDesc struct {
	Addr uint64
	Name string
	Coos SysCoos
}

type SysPair

type SysPair struct {
	A, B SystemObject
	// contains filtered or unexported fields
}

func (*SysPair) GravChilds

func (so *SysPair) GravChilds() []SystemObject

func (*SysPair) Visit

func (so *SysPair) Visit(p1st bool, fn func(so SystemObject) (done bool)) bool

type SysRing

type SysRing struct {
	Type SysRingType
	// contains filtered or unexported fields
}

func (*SysRing) GravParent

func (so *SysRing) GravParent() SystemObject

func (*SysRing) Name

func (so *SysRing) Name() string

func (*SysRing) SetName

func (so *SysRing) SetName(n string)

func (*SysRing) Visit

func (so *SysRing) Visit(_ bool, fn func(so SystemObject) (done bool)) bool

type SysRingType

type SysRingType int
const (
	UnknownRing SysRingType = iota
	Belt
	PlanetaryRing
)

type SysSattType

type SysSattType int
const (
	UnknownSatt SysSattType = iota
	Station
	Outpost
	Installation
)

type SysSattelite

type SysSattelite struct {
	Type SysSattType
	// contains filtered or unexported fields
}

func (*SysSattelite) GravParent

func (so *SysSattelite) GravParent() SystemObject

func (*SysSattelite) Name

func (so *SysSattelite) Name() string

func (*SysSattelite) SetName

func (so *SysSattelite) SetName(n string)

func (*SysSattelite) Visit

func (so *SysSattelite) Visit(_ bool, fn func(so SystemObject) (done bool)) bool

type System

type System struct {
	SysDesc
	Center SystemObject
}

type SystemObject

type SystemObject interface {
	GravParent() SystemObject
	Name() string
	SetName(n string)
	Visit(parent1st bool, fn func(so SystemObject) (done bool)) bool
}

Jump to

Keyboard shortcuts

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