raytraverse.formatter

Formatter

class raytraverse.formatter.Formatter[source]

Bases: object

scene formatter readies scene files for simulation, must be compatible with desired renderer.

comment = '#'

line comment character

scene_ext = ''

extension for renderer scene file

static make_scene(scene_files, out, frozen=True)[source]

compile scene

static add_source(scene, src)[source]

add source files to compiled scene

static get_skydef(color=None, ground=True, name='skyglow')[source]

assemble sky definition

static get_sundef(vec, color, size=0.5333, mat_name='solar', mat_id='sun', glow=False)[source]

assemble sun definition

static extract_sources(srcdef, accuracy)[source]

scan scene file for sun source definitions

RadianceFormatter

class raytraverse.formatter.RadianceFormatter[source]

Bases: raytraverse.formatter.formatter.Formatter

scene formatter readies scene files for simulation, must be compatible with desired renderer.

comment = '#'

line comment character

scene_ext = '.oct'

extension for renderer scene file

static make_scene(scene_files, out, frozen=True)[source]

compile scene

static add_source(scene, src, rewrite=False)[source]

add source files to compiled scene

static get_skydef(color=(0.96, 1.004, 1.118), ground=True, name='skyglow', mod='void', groundname=None, groundcolor=(1, 1, 1))[source]

assemble sky definition

static get_sundef(vec, color, size=0.5333, mat_name='solar', mat_id='sun')[source]

assemble sun definition

static extract_sources(srcdef, accuracy)[source]

scan scene file for sun source definitions