You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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> and string (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:
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: