eradiate.scenes.biosphere.CanopyElement#

class eradiate.scenes.biosphere.CanopyElement(id=None)[source]#

Bases: eradiate.scenes.core.SceneElement, abc.ABC

An abstract class representing a component of a Canopy object. Concrete canopy classes can manage their components as they prefer.

Parameters

id (str, optional, default: None) – User-defined object identifier.

Fields

id (str or None) – User-defined object identifier.

abstract kernel_bsdfs(ctx)[source]#

Return BSDF plugin specifications only.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

dict – Return a dictionary suitable for merge with a KernelDict containing all the BSDFs attached to the shapes in the canopy.

kernel_dict(ctx)[source]#

Return a dictionary suitable for kernel scene configuration.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

KernelDict – Kernel dictionary which can be loaded as a Mitsuba object.

abstract kernel_shapes(ctx)[source]#

Return shape plugin specifications only.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

dict – A dictionary suitable for merge with a KernelDict containing all the shapes in the canopy.