🔒 Locked
Templated Vector
Advertisement
Original Post
I'm sure you'll get varying opinions on this, but I'm firmly of the mind that you should just hard-code it to use floats if that's what you expect to be using in your engine. Flexibility is great...when you need it. However, adding extra complexity to support something you'll most likely not need just makes things more cumbersome for your usual case.
-John
-John
Quote:
Original post by GroZZleR
CVector3f FloatVector;
Hehe... you can pick the MSVC programmers a mile away! ;)
Personally, I agree with Washu on this one. First assess the likelihood of reuse of your code. If you're never going to see it again and it's never going to need to be maintained (which is highly unlikely) then go with what requires the least work.
If you are at all likely to reuse your code (and you should almost always be thinking about how to minimise writing common code from scratch), then you should seriously consider generalising the code and fascilitating easy specialisation of the code for specific projects. Thus, templating your vector and permitting typedefs would be one option and a good way to go IMO.
Cheers,
Timkin
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement