eradiate.scenes.surface.BasicSurface#

class eradiate.scenes.surface.BasicSurface(id='surface', shape=None, bsdf=_Nothing.NOTHING)[source]#

Bases: eradiate.scenes.surface._core.Surface

Basic surface [basic].

A basic surface description consisting of a single shape and BSDF.

Parameters
  • id (str, optional, default: "surface") – User-defined object identifier.

  • shape (RectangleShape or SphereShape or dict, optional, default: None) – Shape describing the surface. This parameter may be left unset for situations in which setting its value is delegated to another component (e.g. an Experiment instance owning the surface object); however, if it is still unset upon kernel dictionary generation, the call to kernel_dict() will raise.

  • bsdf (BSDF or dict, optional, default: LambertianBSDF()) – The reflection model attached to the surface.

Fields
kernel_bsdfs(ctx)[source]#

Return BSDF plugin specifications.

Parameters

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

Returns

KernelDict – A kernel dictionary containing all the BSDFs attached to the surface.

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.

Parameters

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

Returns

KernelDict – A kernel dictionary containing all the shapes attached to the surface.