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 or dict, optional) – BSDF attached to the shape. If a dictionary is passed, it is interpreted by bsdf_factory.convert(). If unset, no BSDF will be specified during the kernel dictionary generation: the kernel’s default will be used.

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

  • bsdf (BSDF or None) – BSDF attached to the shape.

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.