eradiate.scenes.biosphere.MeshTree
eradiate.scenes.biosphere.MeshTree#
- class eradiate.scenes.biosphere.MeshTree(id='mesh_tree', mesh_tree_elements=_Nothing.NOTHING)[source]#
Bases:
eradiate.scenes.biosphere._tree.Tree
A container class for mesh based tree-like objects in canopies.
It holds one or more triangulated meshes and corresponding BSDFs, representing the tree.
The mesh will be interpreted in local coordinates and should be used in an
InstancedCanopyElement
to place at arbitrary positions in a scene.- Parameters
id (
str
, optional, default:"mesh_tree"
) – User-defined object identifier.mesh_tree_elements (
list
of(.InstancedCanopyElement | dict)
, default:[]
) – List ofCanopyElement
defining the canopy. Can be initialised with aInstancedCanopyElement
, which will be automatically wrapped into a list. Dictionary-based specifications are allowed as well.
- Fields
mesh_tree_elements (
list
ofInstancedCanopyElement
) – List ofCanopyElement
defining the canopy.
- 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 aKernelDict
containing all the BSDFs attached to the shapes in the canopy.
- kernel_dict(ctx)#
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.
- 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 aKernelDict
containing all the shapes in the canopy.