eradiate.scenes.shapes.Shape
eradiate.scenes.shapes.Shape#
- class eradiate.scenes.shapes.Shape(id='shape', bsdf=None)[source]#
Bases:
eradiate.scenes.core.SceneElement
,abc.ABC
Abstract interface for all shape scene elements.
- Parameters
id (
str
, optional, default:"shape"
) – User-defined object identifier.bsdf (
BSDF
ordict
, optional) – BSDF attached to the shape. If a dictionary is passed, it is interpreted bybsdf_factory.convert()
. If unset, no BSDF will be specified during the kernel dictionary generation: the kernel’s default will be used.
- Fields
- abstract 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.