-
Notifications
You must be signed in to change notification settings - Fork 594
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
Suggestion: single struct for function calls #141
Labels
Comments
Making a sturct for I am also considering to wrap optional flags( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just a suggestion, and it may have been suggested before.
Instead of having to pass
attrb_t
,vector<shape_t>
,vector<material_t>
andstring
(for the error), instead just have a single struct like so (possibly named obj_t):This will save having to define four different objects before calling the function. However, if the idea of having separate structs is to allow customization, my response would be saying that most people would probably already use all the structs anyway (maybe except for the materials). Also, if the idea is to keep backwards compatibility, you could just add a new function as an override or with a different name like
LoadObjModel
like so:As a side suggestion, maybe use references instead of using pointers? Again, possibly through new functions or function overrides.
The text was updated successfully, but these errors were encountered: