Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get particles in a group?
#4
(14-03-2023, 04:23 PM)tegleg Wrote: thank you
how do i get them with the group name?

They're stored in a plain list, so you just loop trough the groups until you find the one with the name you're interested in.

There's usually not enough groups that O(N) lookup time by name would pose any problem. If it does (for example because you have thousands of groups and you need to look them up by name very often) you can insert them in a dictionary to look them up in constant time.
Reply


Messages In This Thread
How to get particles in a group? - by tegleg - 14-03-2023, 01:07 PM
RE: How to get particles in a group? - by tegleg - 14-03-2023, 04:23 PM
RE: How to get particles in a group? - by josemendez - 14-03-2023, 04:38 PM
RE: How to get particles in a group? - by tegleg - 14-03-2023, 06:01 PM
RE: How to get particles in a group? - by tegleg - 14-03-2023, 09:54 PM
RE: How to get particles in a group? - by tegleg - 15-03-2023, 01:01 PM