yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #00433
Re: Extremums of coordinates from the containers
Lionel Favier said: (by the date of Mon, 27 Nov 2006 16:00:04 +0100)
> Hi Janek,
>
> About discrete element part of YADE, could you give me which code I have to write to obtain the extremum of the positions (for example, it could be also the velocities...) for the whole pack of elements.
>
> I thought about something like the following :
>
> MetaBody * ncb = dynamic_cast<MetaBody*>(body);
> min_element(ncb->bodies->begin(),ncb->bodies->end())
uh-oh. I'm afraid that you need to make a loop, then perform a static
cast on each element, then check the member variable (be it velocity
or position).
MetaInteractingGeometry2AABB.cpp checks for min/max bounding volume,
so you can look there. It is a bounding volume of whole scene.
yade-package-common/src/Engine/EngineUnit/MetaInteractingGeometry2AABB
Your loop will look similar.
--
# Janek Kozicki
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
References