scene

package
v0.0.0-...-b5e2f65 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CameraFromStringError = xrror.Xrror("%s is not a camera that can be specified from a single string").Out
)
View Source
var LightIndex indexLights
View Source
var NodeRelationError = xrror.Xrror("%s is not a direction for node relation %s").Out

Functions

func Ambient

func Ambient(tag string, intensity float32, color math.Color) *light

func Aspect

func Aspect(w *glfw.Window) float32

func Axis

func Axis(tag string, size float32) *lines

func Directional

func Directional(tag string) *light

func NewLines

func NewLines(tag string, g geometry.Geometry, m material.Material) *lines

func Point

func Point(tag string) *light

func RegisterWith

func RegisterWith() lua.RegisterWith

func Sphere

func Sphere(tag string) *sphere

func Spot

func Spot(tag string) *light

Types

type Actor

type Actor interface {
	Paused() bool
	SetPaused(bool)
	Act(*l.LState) error
}

type Cam

type Cam interface {
	Planes() []float32
	GetPlane(Plane) float32
	SetPlane(Plane, float32)
	ProjectionMatrix() math.Matrice
}

type CamT

type CamT int
const (
	NOT_A_CAMERA_TYPE CamT = iota
	PERSPECTIVE
	ORTHOGRAPHIC
	CUSTOM
)

func StringToCamT

func StringToCamT(s string) CamT

type Comparer

type Comparer interface {
	Equal(Node) bool
}

type Counter

type Counter interface {
	Count() int
}

type Grapher

type Grapher interface {
	In() []Node
	Out() []Node
	Append(RelationDir, ...Node) error
	Prepend(RelationDir, ...Node) error
	Remove()
	Replace(Node)
	Iter(RelationDir, NIter)
}

type LightKind

type LightKind int
const (
	NOT_A_LIGHT LightKind = iota
	AMBIENT
	DIRECTIONAL
	POINT
	SPOT
)

type Lighter

type Lighter interface {
	Light() LightKind
}

type NIter

type NIter func(Node)

type Node

func Bind

func Bind() Node

func Camera

func Camera(tag string, c *cam) Node

func Direction

func Direction(tag string, vec math.Vector) Node

func Dummy

func Dummy(tag string) Node

func Group

func Group(tag string, ns ...Node) Node

func Position

func Position(tag string) Node

func Program

func Program() Node

func Root

func Root(tag string) Node

func Rotate

func Rotate(tag string, q math.Quaternion) Node

func Scale

func Scale(tag string, vec math.Vector) Node

func Translate

func Translate(tag string, vec math.Vector) Node

type Plane

type Plane int
const (
	FOV Plane = iota
	ASPECT
	NEAR
	FAR
	ZOOM
	LEFT
	RIGHT
	TOP
	BOTTOM
	UNKNOWN_PLANE
)

func StringToPlane

func StringToPlane(s string) Plane

type Recurser

type Recurser interface {
	Hidden() bool
	SetHidden(bool)
	RecursionLimit() int8
	SetRecursionLimit(int8)
}

type RelationDir

type RelationDir int
const (
	NIN RelationDir = iota
	NOUT
	UNKNOWNDIR
)

func (RelationDir) String

func (r RelationDir) String() string

type RenderFunc

type RenderFunc func(render.Renderer)

type Renderable

type Renderable interface {
	Render(render.Renderer)
}

type Scene

type Scene struct {
	render.Renderer
	// contains filtered or unexported fields
}

func NewScene

func NewScene(r render.Renderer, nw *glfw.Window) *Scene

func (*Scene) Attach

func (s *Scene) Attach(ns ...Node)

func (*Scene) Clear

func (s *Scene) Clear()

func (*Scene) Count

func (s *Scene) Count() int

func (*Scene) Detach

func (s *Scene) Detach(ns ...Node)

func (*Scene) Render

func (s *Scene) Render()

func (*Scene) Updateable

func (s *Scene) Updateable() bool

type TagFunc

type TagFunc func(L *l.LState) string

type Tagger

type Tagger interface {
	ecs.Entity
	Tag() string
	Retag(string)
	LClass() string
}

type Terminater

type Terminater interface {
	Terminal() bool
	SetTerminal(bool)
}

type Transform

type Transform interface {
	Raw() []float32
	Set(int, float32)
	SetStr(string, float32)
	Update(...float32)
}

type TransformT

type TransformT int
const (
	UNKNOWN_TRANSFORM TransformT = iota
	TRANSLATE
	SCALE
	ROTATE
	DIRECTION
)

func (TransformT) String

func (t TransformT) String() string

Jump to

Keyboard shortcuts

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