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

particles sorting, "Shaken, not stirred" #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kutu
Copy link
Contributor

@kutu kutu commented Oct 27, 2012

if i want to do trail effect, but some new initialized particles rendered under oldest

white rectangle is a head

before

after

@PrimaryFeather
Copy link
Contributor

Hm ... I see what you mean, but this will have performance implications. First, depending on how the vector class works internally, "splice" will have to move all indices above the current index "down". Furthermore, the method creates a temporary object each time it is called (the return vector).

So I'm not super happy about the implications this has -- especially on those particle systems that don't care about the sorting.

But we could make this an optional feature; a property that controls that behavior ... we'd need a good name for that, though. Any ideas?

@kutu
Copy link
Contributor Author

kutu commented Oct 29, 2012

name it how you like it
maybe add new boolean parameter to the end of constructor with default value to false

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

Successfully merging this pull request may close these issues.

2 participants