scene

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scene

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

Scene is the default scene type.

func New

func New() *Scene

New returns a new empty scene.

func (*Scene) AddGeom

func (s *Scene) AddGeom(geom core.Geom) error

AddGeom adds the Geom to the scene

func (*Scene) AddLight

func (s *Scene) AddLight(light core.Light) error

AddLight adds the light to the scene

func (*Scene) LightsPrepare

func (s *Scene) LightsPrepare(sg *core.ShaderContext)

LightsPrepare returns the list of lights.

func (*Scene) PreRender

func (s *Scene) PreRender() error

PreRender is called after all other nodes PreRender.

func (*Scene) Trace

func (s *Scene) Trace(ray *core.Ray, sg *core.ShaderContext) bool

Trace returns true if ray hits something. Usually this is the first hit along the ray unless ray.Type &= RayTypeShadow.

func (*Scene) TraceElems

func (s *Scene) TraceElems(ray *core.Ray, sc *core.ShaderContext, base, count int) bool

TraceElems implements qbvh.Geom.

func (*Scene) TraceMotionElems

func (s *Scene) TraceMotionElems(time float32, key, key2 int, ray *core.Ray, sc *core.ShaderContext, base, count int) bool

TraceElemsMotion implements qbvh.MotionGeom.

Jump to

Keyboard shortcuts

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