commonMain.it.unibo.alchemist.boundary.webui.common.renderer.Renderer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alchemist-web-renderer-jvm Show documentation
Show all versions of alchemist-web-renderer-jvm Show documentation
Alchemist module that starts a web server and allows to visualize an environment on a web browser.
/*
* Copyright (C) 2010-2023, Danilo Pianini and contributors
* listed, for each module, in the respective subproject's build.gradle.kts file.
*
* This file is part of Alchemist, and is distributed under the terms of the
* GNU General Public License, with a linking exception,
* as described in the file LICENSE in the Alchemist distribution's top directory.
*/
package it.unibo.alchemist.boundary.webui.common.renderer
import it.unibo.alchemist.boundary.webui.common.model.surrogate.EnvironmentSurrogate
import it.unibo.alchemist.boundary.webui.common.model.surrogate.PositionSurrogate
/**
* Renderer of an [EnvironmentSurrogate].
* @param the type of the concentration surrogate.
* @param the type of the position surrogate.
* @param the type of the result, presumably a graphic representation, like a raster image or an SVG string.
*/
interface Renderer {
/**
* Renders the [EnvironmentSurrogate].
* @param environmentSurrogate the [EnvironmentSurrogate] to render.
* @return the result of the rendering.
*/
fun render(environmentSurrogate: EnvironmentSurrogate): R
}