scene

package
v0.0.0-...-1c48c43 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 8 Imported by: 3

Documentation

Overview

Package scene provides an implementation of a scene

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scene

type Scene struct {
	Camera    *camera.AnyCamera        `json:"camera"`
	Materials []*materials.AnyMaterial `json:"materials"`
	Mesh      mesh.Mesh                `json:"mesh"`
	MaxDepth  int                      `json:"max_depth"`
}

Scene contains all the information for a scene

func Load

func Load(reader io.Reader) (scene *Scene, err error)

Load loads the scene from a reader which outputs gzipped json data

func LoadFromBytes

func LoadFromBytes(data []byte) (*Scene, error)

LoadFromBytes loads the scene from a gzipped json byte array

func LoadFromFile

func LoadFromFile(filename string) (scene *Scene, err error)

LoadFromFile loads the scene from a gzipped json file

func (*Scene) Init

func (s *Scene) Init()

Init performs all necessary preprocessing on the scene

Jump to

Keyboard shortcuts

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