Learn R Programming

fsbrain (version 1.0.0)

get.rglstyle.parameters: Produce the named list of style parameters from style definition.

Description

A style definition can be a character string like "shiny", already a parameter list, or a command like 'from_mesh' that tells us to get the style from the renderable. This function creates the final parameters from the definition and the renderable. Note that a mesh which carries its own style (in its 'style' field, see coloredmesh.from.color) is rendered with that style whenever the requested style is the 'default' style: this way, scenes that assign individual styles to their meshes look as intended even if the rendering or export function is called without an explicit style.

Usage

get.rglstyle.parameters(renderable, style)

Value

a style, resolved to a parameter list compatible with material3d.

Arguments

renderable

A renderable (or any list) which includes a 'style' key. If it does not include such a key, the 'default' style will be used.

style

A style definition. Can be a character string like 'shiny' or 'from_mesh', or already a named list of material properties (which will be returned as-is).