eradiate._factory
#
List of Factory
instances#
- eradiate.scenes.atmosphere.atmosphere_factory
- eradiate.scenes.atmosphere.particle_distribution_factory
- eradiate.scenes.biosphere.biosphere_factory
- eradiate.scenes.bsdfs.bsdf_factory
- eradiate.scenes.illumination.illumination_factory
- eradiate.scenes.integrators.integrator_factory
- eradiate.scenes.measure.measure_factory
- eradiate.scenes.phase.phase_function_factory
- eradiate.scenes.shapes.shape_factory
- eradiate.scenes.spectra.spectrum_factory
- eradiate.scenes.surface.surface_factory
Classes#
- class eradiate._factory.Factory(registry=NOTHING)[source]#
Object factory.
This factory subclass extends the original
dessinemoi.Factory
type by adding the following functionality to itsconvert()
method:unit interpretation using
pinttr.interpret_units()
;class method constructor selection using the
"construct"
key (overrides the default dict constructor if any; reserves the"construct"
parameter).
The interface is unchanged.
- register_lazy_batch(specs, cls_prefix='')[source]#
Register multiple lazy types at once.
- Parameters:
specs (
list
oftuple[str
,str
,dict]
) – A list of(cls, type_id, kwargs)
tuples wherecls
is the name of the target type (relative to cls_prefix),type_id
is the ID for the registered type andkwargs
is a dictionary containing keyword arguments for theFactory.register()
method.cls_prefix (
str
) – A prefix relative to which lazy type names are expressed.