← Back to team overview

yade-dev team mailing list archive

Re: [Yade-commits] r1394 - in trunk: examples pkg/common pkg/common/Engine/DeusExMachina

 

> +void ResetPositionEngine::registerAttributes(){
> +	DeusExMachina::registerAttributes(); // for subscribedBodies
> +	REGISTER_ATTRIBUTE(interval);
>   
Have a look at pkg/common/Engine/StandAloneEngine/PeriodicEngines.hpp.
If you inherit your ResetPositionEngine from PeriodicEngine, you can
control the interval by simulation time, world time or iteration number
(and you get all that for free). I did that because I was fed up with
always writing code checking and interval that elapsed - see
BrefcomDamageColorizer for an example. Regards, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev