eradiate.scenes.surface.DEMSurface#
- class eradiate.scenes.surface.DEMSurface(id='terrain', *, shape=None, shape_background=None)[source]#
Bases:
SurfaceDEM Surface [
dem]A mesh based representation of surface DEMs.
- Parameters:
id (
str, optional, default:"surface") – Identifier of the current scene element.shape (
BufferMeshShapeorFileMeshShapeordict, default:None) – Shape describing the surface.shape_background (
SphereShapeorRectangleShapeordict, optional, default:None) – Shape describing the background surface.
- Fields:
shape (
BufferMeshShapeorFileMeshShapeorNone) – Shape describing the surface.shape_background (
SphereShapeorRectangleShapeorNone) – Shape describing the background surface.
- classmethod from_mesh(mesh, lat, lon, id='surface', geometry=None, planet_radius=None, bsdf=None)[source]#
Construct a DEMSurface from a mesh object and coordinates which specify its location.
- Parameters:
mesh (
BufferMeshShapeorFileMeshShape) – DEM as a triangulated mesh.lat (
pint.Quantity) – Limits of the latitude range covered by the DEM.lon (
pint.Quantity) – Limits of the longitude range covered by the DEM.id (
str, optional, default:"surface") – Identifier of the scene element.geometry (
SceneGeometry, optional, default:PlaneParallelGeometry()) – Atmospheric geometry of the scene.planet_radius (
pint.Quantity, optional, default:EARTH_RADIUS) – Planet radius. Used only in case of a plane parallel geometry to convert between latitude/longitude and x/y coordinates.bsdf (
BSDF, optional, default:LambertianBSDF()) – Scattering model attached to the surface.
- Returns:
- traverse(callback)#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal) – Callback data structure storing the collected data.
- update()#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property objects#
Map of child objects associated with this scene element.
- Returns:
dict– A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- property params#
- Returns:
dict[str,UpdateParameter] orNone– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- property template#
Kernel dictionary template contents associated with this scene element.
- Returns:
dict– A flat dictionary mapping dot-separated strings describing the path of an item in the nested scene dictionary to values. Values may be objects which can be directly used by themitsuba.load_dict()function, orInitParameterinstances which must be rendered.
See also