Jump to content
  • Advertisement
Sign in to follow this  
GavRobbs

What's Necessary?

This topic is 3839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, I've more or less fought my way through learning the basics of 3d graphics, and I have written a math library, but I don't think its complete. Therefore, I've posted to ask, what classes do you think a math library should have, and what classes do you think a physics library should have? I haven't started seriously learning physics, but I know enough math. My math library has the following classes, with full support for most common operations: 2D and 3D Vectors Quaternions 3x3 and 4x4 Matrix(inverses using determinant method) Lines Planes So, what else do you think I need. This probably isn't going to be used for a full-fledged game, but rather, to mess around with some techdemo stuff with openGL. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
It rather depends on what you are trying to accomplish. A math lib for games is pretty vague. The only thing your list looks like it is missing from a general list of things that might be useful to someone somewhere is triangles, general meshes, the various trees(bsp, quad, oct) and collision detection (hit detection routines and the data structures that often go with that like AABBs).

Share this post


Link to post
Share on other sites
Crap...forgot triangles. But wouldn't collision detection fall under the physics engine. And as for the trees, wouldn't those have to do with scenegraphs?

Share this post


Link to post
Share on other sites
Quote:
Original post by GavRobbs
But wouldn't collision detection fall under the physics engine.

I would provide intersection routines in the Math library. You will probably need them for more than Physics. Of the top of my head:
* Picking (if the user clicks on an item, how do you figure out which item that is?)
* View frustum culling.

Share this post


Link to post
Share on other sites
I see. Okay then, so that means that I have to add the following classes to the math library:

Boxes
Spheres
Triangles

and ray/intersection support for all three of those primitive types. Is that about right?

Share this post


Link to post
Share on other sites
I would recommend writing little projects, and adding to the library as you go.. rather than trying to predict future requirements. plus, you never really know exactly what you are going to need until you need it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!