This class holds all information about the scene that is simulated. A ShadingScene is typically equipped with the following attributes:

  • A pair of coordinates to locate the scene
  • Simulation geometries, where the PV potential is calculated
  • Shading geometries, where no PV potential is calculated but which are responsible for shading

Constructors

  • Parameters

    • latitude: number

      Latitude of the midpoint of the scene.

    • longitude: number

      Longitude of the midpoint of the scene.

    Returns ShadingScene

Properties

elevationRaster: CartesianPoint[]
latitude: number
longitude: number
shadingGeometries: BufferGeometry<NormalBufferAttributes>[]
simulationGeometries: BufferGeometry<NormalBufferAttributes>[]

Methods

  • Change the Color Map that is used for the colors of the simulated Three.js mesh. This is optional, the default colorMap is viridis (blue to green to yellow)

    Parameters

    Returns void

  • Add a elevation model to the simulation scene.

    Parameters

    • raster: CartesianPoint[]

      List of Points with x,y,z coordinates, representing a digital elevation model (DEM). It is important that all values of x,y and z are given with same units. If x and y are given in lat / lon and z is given in meters, this will result in wrong simulation Results.

    • midpoint: CartesianPoint

      The point of the observer, ie the center of the building

    • azimuthDivisions: number

      Number of divisions of the azimuth Angle, i.e. the list of the azimuth angle will be [0, ..., 2Pi] where the list has a lenght of azimuthDivisions

    Returns void

  • Adds a geometry as an outer geometry for the shading simulation. These geometries are responsible for shading.

    Parameters

    • geometry: BufferGeometry<NormalBufferAttributes>

      Arbitrary Three.js geometry

    Returns void

    Memberof

    Scene

  • Adds a geometry as a target for the shading simulation. For these geometries, the PV potential will be simulated. This geometry will also be used as a shading geometry, hence it is not needed to additionally add it by using addShadingGeometry.

    Parameters

    • geometry: BufferGeometry<NormalBufferAttributes>

      Arbitrary Three.js geometry

    Returns void

    Memberof

    Scene

  • This function is called as a last step, after the scene is fully build. It runs the shading simulation and returns a THREE.js colored mesh. The colors are chosen from the viridis colormap.

    Parameters

    Returns Promise<Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>>

    A three.js colored mesh of the simulationGeometry.

Generated using TypeDoc