There is no real reason for shapes to be the only way to determine node contents. Indeed, whether or not some content should be injected is more generally the result of a predicate p
of kind (RandomGenerator, Environment, Node) -> Boolean
. Current Shape
s are just a particular case where this predicate is actually somewhat like: p = { (_, env, node) -> shape.contains(env.getPosition(node)) }
.
A more general concept of SubDeploy
or ContentFilter
should be used instead, with Shape
s re-implemented as subclasses.
Also a special ContentFilter
could reuse the JSR223 infrastructure and allow for full-fledged scripts to be executed.