yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10977
Re: Body::groupMask could be unsigned int
Finally I used std::bitset for that purpose, added some operators and made
conversion to/from python long. I also created cmake option (off by
default) for it. I did it in general way, so if you needed to use it in
other place than Body::groupMask, it should be easy.
Thanks for feedback and suggestions
Cheers
Jan
2014-06-06 13:12 GMT+02:00 Jan Stránský <honzik.stransky@xxxxxxxxx>:
> Hi Anton,
> Do you mean to replace boost::python::long_ by groupMask_t?
> if BODY_GROUP_MASK_ARBITRARY_PRECISION is defined, both argument types (int
> and bp::long_) are needed..
> cheers
> Jan
>
>
> 2014-06-06 13:07 GMT+02:00 Anton Gladky <gladky.anton@xxxxxxxxx>:
>
> 2014-06-06 10:47 GMT+02:00 Jan Stránský <honzik.stransky@xxxxxxxxx>:
>> > I am soory, I am not sure what exactly is the point here :-) The
>> duplicate
>> > code in maskOk and maskCompatible? int argument is necessary as some
>> other
>> > classes uses ints (like NewtonIntegrator or
>> > collider::avoidSelfInteractionMask), bp::long_ is optionally for
>> body-body
>> > evaluation. Probably I could template it.
>>
>> From my point of view we should have just one possible typedef for
>> groupmask: int or boost,
>> depending on the BODY_GROUP_MASK_ARBITRARY_PRECISION flag.
>>
>> Regards
>>
>> Anton
>>
>
>
References