Skip to main content
gamedev.net
🔒 Locked

Vector Classes

Started by higherspeed May 8, 2003 at 4:50 PM 1 replies 600+ views
Original Post
higherspeed
higherspeed
I''ve created my own vector class and it has all the normal functions such as cross product etc. However it isn''t nearly as complete as the DirectX equivalent, which also works with all the matrices and everything. Do you think it''s a good idea to use the DirectX vector and matrix classes for general game vectors? By that I mean for the origin and velocity of my entities. I think it''s been a good experience creating my own, but all the functions are there for the using already, many of them will be quicker than mine. What do you use?
Punx
Punx
While definitely a good learning experience it might be a better idea to use the DirectX vector class as you know it works and is optimized well.
~punx
Sonicmage
Sonicmage
I would also recommend using the D3DX vector and matrix classes and especially quaternions. I HATED writing my own quaternion classes because it was such a pain to debug. Just keep in mind though that their library is incomplete (e.g. they have no function to rotate a vector by a quaternion).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.