yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00992
Re: removing PhysicalAction genericity?
> (2) or it will be two (and more) separate vectors:
>
> vector< Vector3r > _force;
>
> vector< Vector3r > _momentum;
>
> vector< SomeComplexAction > _complexAction;
>
I like this one better, too. According to
http://herbsutter.wordpress.com/2008/04/07/cringe-not-vectors-are-guaranteed-to-be-contiguous/,
vector<> are guaranteed to be contiguous (except for bools), nice for
resetting things.
Should I still provide a mechanism to request which physicalActions will
be used (like NEEDS_BEX now)? In another words: is there a case that
someone doesn't need Momentum or Force and needs to save a few kbs of
memory?
V.
Follow ups
References