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.Factorytype by adding the following functionality to itsconvert()method:unit interpretation using
pinttrs.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 (
listoftuple[str,str,dict]) – A list of(cls, type_id, kwargs)tuples whereclsis the name of the target type (relative to cls_prefix),type_idis the ID for the registered type andkwargsis a dictionary containing keyword arguments for theFactory.register()method.cls_prefix (
str) – A prefix relative to which lazy type names are expressed.