[GPU] Considering abstraction of PreCollisionInteractor and init() method
follow-up for #179 (closed), which is closed by !384 (merged):
- what was true for
free()
is also true forinit()
. Wouldn't it be cooler if the object was already fully valid when it was created? Because what happens if someone creates the object and forgets to callinit()
manually? The program will crash when the object is deleted. - I was wondering why simulation or parameter knows at all about probes and actuators. It's just the name of the variable, but it's actually all from type
PreCollisionInteractor
. So why can't we just have one list ofPreCollisionInteractor
? And then inUpdateGrid27::updateGrid()
there is ainteractWithProbes()
andinteractWithActuators()
. Again we are breaking the abstraction. We are dealing withpreCollisionsInteractors
and should not know about probes and actuators. The problem here seems to be thatinteract
is called once before the first collision and once after. If this has to be the case, is it perhaps not correct that probes and actuators have the same abstraction?