ew

package
v0.0.0-...-548dba9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const EmiDirCount = 360

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffShadowBody

type DiffShadowBody struct {
	vista.Circle
	Albedo float64
}

func (DiffShadowBody) DiffuserAlbedo

func (d DiffShadowBody) DiffuserAlbedo(t EmiType) float64

func (DiffShadowBody) ShadowBlock

func (d DiffShadowBody) ShadowBlock() bool

func (DiffShadowBody) ShadowDensity

func (d DiffShadowBody) ShadowDensity(t EmiType) (density float64)

func (DiffShadowBody) VistaCircle

func (d DiffShadowBody) VistaCircle() vista.Circle

func (DiffShadowBody) VistaTypes

func (d DiffShadowBody) VistaTypes() (isObstacle, isTarget, isBlocker bool)

type Diffuser

type Diffuser interface {
	vista.Object
	DiffuserAlbedo(t EmiType) float64
}

type EmiType

type EmiType int
const (
	EMI_HEAT EmiType = iota
	EMI_LIGHT
	EMI_HYPERLINK
)

type EmitData

type EmitData struct {
	Type      EmiType
	Power     float64
	Signature string
}

type Emitter

type Emitter interface {
	vista.Object
	Emits(dir float64) []EmitData
}

type LightEmitter

type LightEmitter struct {
	vista.Circle
	Signature string
	MaxPower  float64
	Dir       float64
	PowerK    [EmiDirCount]float64
}

func NewLightEmitter

func NewLightEmitter(maxPower float64, powerK [EmiDirCount]float64, signature string) *LightEmitter

func (*LightEmitter) Emits

func (l *LightEmitter) Emits(dir float64) []EmitData

func (*LightEmitter) HorizonCircle

func (l *LightEmitter) HorizonCircle() vista.Circle

type Shadower

type Shadower interface {
	vista.Object
	ShadowDensity(t EmiType) (density float64)
	ShadowBlock() bool
}

type World

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

func NewWorld

func NewWorld() *World

func (*World) AddObject

func (w *World) AddObject(object interface{})

func (*World) DelObject

func (w *World) DelObject(object interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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