-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
NamedHierachy for find entities #1830
Conversation
/// this function takes an vec of entities defined by their parent index | ||
/// (on the same vec) and name. | ||
/// | ||
/// Any root entity should be indexed using `I::MAX_VALUE` or `I::MAX`. |
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.
could you add a const on NamedHierarchy
to help this?
const ROOT_ENTITY: I = I::MAX_VALUE;
and then document to use NamedHierarchy::ROOT_ENTITY
instead of I::MAX_VALUE
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 liked this suggestion, but I used the NO_PARENT
, the wording of this docs wasn't right. It's not the index of the root entity but the index of the root parent entity
This has unfortunately drifted a bit too far from our current animation implementation, and I have concerns about it's global nature. There may be use in the future for such a cached hierarchy for name queries. |
Required by #1429, used to find witch entities to animate given a set of named entities;