CameraInjectVisibleNodeClosestToDistance

class CameraInjectVisibleNodeClosestToDistance(node: Node<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule) : AbstractAction<Any>

Given a list of VisibleNode associated to visionMolecule, it finds the closest to a point located at distance from node in the direction of node's heading, and injects its position in targetMolecule.

If there are no VisibleNodes, targetMolecule will be removed from node.

Constructors

Link copied to clipboard
constructor(node: Node<Any>, environment: Physics2DEnvironment<Any>, distance: Double, visionMolecule: Molecule, targetMolecule: Molecule)

Functions

Link copied to clipboard

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