Skip to content

Length of MessageSpatial*'s message list #1101

Answered by Robadob
wcastello asked this question in Q&A
Discussion options

You must be logged in to vote

Not currently.

Spatial messaging discretises the environment into a 1D array, however when accessing messages it returns messages from multiple bins (9 in 2D, 27 in 3D).

It is worth noting that spatial messaging iterators do not perform a distance check, so the messages returned by the iterator will be a subset including all within the radius, but other messages outside that radius may be included too. (This is to avoid us double loading variables internally).

So even if we did merely return the total size of the 9 (or 27) bins, the value could be higher than desired,

Hence, from the limited information provided I expect your current approach is likely the best option. Make sure you are p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wcastello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants