Skip to main content
gamedev.net
🔒 Locked

math/physics class

Started by MeeZ May 30, 2004 at 7:41 PM 1 replies 500+ views
Original Post
MeeZ
MeeZ
G''day there all, I was hoping that someone could help me out regarding the design of a physics/maths class for my games. I am hoping to be able to make a class where I can just call on different equations, rules etc to be applied to my game objects; whatever they may be. Also, if i were to do this, what special attributes would i need for my game objects in order to be able to use this math/physics library effectively in my games? Hopefully someone here can help me out. I am sure some of you here would have already made similar classes, and may be able to offer some ind\sight to their design, and how to apply them to your games. Thanks for your time. I appreciate any help you can offer. MeeZ
MeeZ
Charles B
Charles B
I suppose your question is far too general and thus none dared to answer. There are plenty of math libraries available on the web, most often included inside bigger projects such as 3D engines. Just google you''ll find the C++ classes you need, vectors, matrices, quaternions, planes, AABoxes, etc....

Alas most of them rely on floating point only, not SIMD. I am currently developping a ultra performant Open Source math library, portable, compatible with many compilers, OSs, CPUs (3DNow, SSE, Altivec, ...). Just check the news here. I might open my dedicated web site soon and very probably I''ll promote it here in the news.

Now a precise answer. For each 3D object instantiation, it''s most often required to have a quaternion, a 3D position, and a bounding volume, sphere or box.
"Coding math tricks in asm is more fun than Java"
temp_ie_cant_thinkof_name
temp_ie_cant_thinkof_name
Google: ''Chris Hecker''s Physics'', read and understand the articles, and download the source code that shows math/physics classes example.
"I study differential and integral calculus in my spare time." -- Karl Marx

Topic Locked

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

Sign in to reply to this topic.