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

NiBoneLODController #8

Open
neomonkeus opened this issue Nov 27, 2014 · 0 comments
Open

NiBoneLODController #8

neomonkeus opened this issue Nov 27, 2014 · 0 comments

Comments

@neomonkeus
Copy link
Member

Opens up access to the shape-collection.

https://www.dropbox.com/s/538k841388hopt9/NiBoneLODController.cpp.diff?dl=0
https://www.dropbox.com/s/f9uk6zpyzpjoi3j/NiBoneLODController.h.diff?dl=0

This is a good pattern - and probably can be used at various places. Would it make sense to factor this out into utility functions say:
template T bool GroupAddElement( vector<Ref > group, Ref elem)
template T bool GroupRemoveElement( vector<Ref > group, Ref elem)
template T bool GroupReplaceElement( vector<Ref > group, Ref old, Ref new)

Yes, I pushed a few diffs with these group-related interfaces. I probably have even some more just here in the code. I use it extensively to substitute nodes by new ones in NIFopt.
You still need to add it to each class though, as the group is private.

Of course. We also need to pass the count so it can be updated.

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

No branches or pull requests

1 participant