Skip to content
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

Queuing gfunction calls based on eyepoint distance #6

Open
schneiderfelipe opened this issue Jan 8, 2021 · 0 comments
Open

Queuing gfunction calls based on eyepoint distance #6

schneiderfelipe opened this issue Jan 8, 2021 · 0 comments

Comments

@schneiderfelipe
Copy link

schneiderfelipe commented Jan 8, 2021

pin calls gfunction right away, which leads to unordered faces by default (if I understood this correctly). sortfaces! resolves that, but I think this can be automated by (priority) queuing. Instead of calling gfunction, its call could be queued and that queue stored in a struct. A final pin call on that object then draws everything. Something like:

# queues based on distance from eyepoint
pq = SomeQueue(eyepoint)

# queues gfunction calls - both functions and parameters - instead of actually calling
pin.(pq, [Point3D(randn() * 50, randn() * 50, randn() * 50)
      for x in 1:75, y in 1:75, z in 1:75])

# call all gfunctions in order of priority
pin.(pq)

A drawback would be that the eyepoint has to stay fixed for the queue's whole lifetime, but that's not too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants