CameraSee

class CameraSee(node: Node<Any>, environment: Physics2DEnvironment<Any>, val distance: Double, val angle: Double, outputMolecule: Molecule = SimpleMolecule("vision"), filterByMolecule: Molecule? = null) : AbstractAction<Any>

Checks nodes in the environment and writes in outputMolecule the list of it.unibo.alchemist.model.VisibleNode, containing filterByMolecule. distance and angle define the field of view.

Constructors

Link copied to clipboard
constructor(node: Node<Any>, environment: Physics2DEnvironment<Any>, distance: Double, angle: Double, outputMolecule: Molecule = SimpleMolecule("vision"), filterByMolecule: Molecule? = null)

Properties

Link copied to clipboard

Angle in degrees of the field of view.

Link copied to clipboard

Distance of the field of view.

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<Any>, reaction: Reaction<Any>): CameraSee

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open override fun execute()

Effectively executes this action.

Link copied to clipboard
open override fun getContext(): Context
Link copied to clipboard
override fun getOutboundDependencies(): ListSet
Link copied to clipboard
open override fun toString(): String