-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MessageSpatial2D::In::wrap() #794
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0c5a64a
to
b922424
Compare
Have just updated this to work with current master (post shared mem curve), also updated the gist example as it was using old dependency graph API. |
77ecbe5
to
6cfba23
Compare
Now working on this again, to summarise current status. The wrapped iterator's
This is different from the regular iterator, that the wrapped iterator only returns messages which are within the radius. This was setup that way when I initially developed the example (presumably in an attempt to minimise users doing stuff wrong), and could easily be tweaked to match the regular iterator's behaviour. I now need to come up with some thorough tests for this and document, then repeat for 3D. |
Needs better testing, will post model I was playing with in PR comments.
It might be a little naive, but should catch if things break badly.
+some additional minor cleanup (mostly removing redundant references.
385caea
to
f1a512a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Improve tests for non-zero environment min and out of bounds.
We should think about how we can control wrapping in some but not all dimensions if required (i.e. wrapping in 3 dimensions creates a shape which can't be represented in 3D space, with FLAME GPU 1 only warpping in X and Y but never Z to form a torus) Will try and get this reviewed in the net few days otherwise |
As discussed in meeting, I've now removed the wrapped distance function entirely. It works more like regular spatial. With additional These methods internally call P.S. Haven't addressed Pete's partial axis wrapping, don't believe Paul wanted it from the discussion (I might be wrong). |
61df670
to
0614827
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with the changes. Think the interface for this is really nice.
Delay merging to have a discussion about iterator for spatial messaging. There is a fairly good argument that this should do distance checking. |
* MessageSpatial2D::In::wrap() Needs better testing, will post model I was playing with in PR comments. * Add getVirtualX() getVirtualY() to the wrapped iterator message. * Add a test that spatial2D wrapped messages work as intended. It might be a little naive, but should catch if things break badly. * 3D support and test added +some additional minor cleanup (mostly removing redundant references. * docs fix * Add SEATBELTS to catch out of bounds messages. Improve tests for non-zero environment min and out of bounds. * Updates following FGPU meeting.
Python Circles 2D wrapped example here.
Currently
operator++()
only returns messages within the search radius, this is different to regular spatial messages.I'm kind of torn on whether to keep this behaviour which adds a redundant extra load of each location variable and caches the distance, or to revert back to non-wrapped behaviour and provide a distance function which users must pass 2-4 floats to for the result.
Not to sure what else can be tested, just feels like it probably needs more.
Docs might need some minor redrafting, didn't feel too clean.
Haven't added an example to the main repo (there's already too much bloat with multiple versions of circles).
Docs PR: FLAMEGPU/FLAMEGPU2-docs#90
Closes #185