Archived

This topic is now archived and is closed to further replies.

Stranger

API's and Math.

Recommended Posts

If you use C or C++ in conjuction with DirectX or OpenGL can you build 3D engines and 3d in general without advanced knowledge of math just the basics?The api''s provide the math ready?You only have to now the language and the api?

Share this post


Link to post
Share on other sites
Sorry, you''ll need quite a lot of math knowledge to make a good 3D-engine. I''d recommend learning linear algebra.

-----------------------------
Reporter: Are they slow-moving, chief?
Sheriff: Yeah, they''re dead. They''re all messed up.
-Night of the living dead

Share this post


Link to post
Share on other sites
C and C++ do not provide the math. They provide math functions but not the math.

What you''ll need (math-wise) is: Algebra, Basic Level Physics (velocity, acceleration, dot and cross product...), Trigonometry, and Linear Algebra (because of matrices).

Hope that helped.

Share this post


Link to post
Share on other sites
If I am not mistaken the two famous api''s,DX and OGL,gives you the opppurtunity to build the engine since they have the math already implemented for you.Isnt that right?
By the way I do know linear algebra,physics and the rest but I just want to know whether the above is correct.

Share this post


Link to post
Share on other sites
quote:
Original post by Stranger
If I am not mistaken the two famous api''s,DX and OGL,gives you the opppurtunity to build the engine since they have the math already implemented for you.Isnt that right?



what do you mean by "implemented"? they have functions have manipulate or mirror (mathematical) data and/or functions. but thats about it.

Share this post


Link to post
Share on other sites
quote:
Original post by Stranger
If I am not mistaken the two famous api''s,DX and OGL,gives you the opppurtunity to build the engine since they have the math already implemented for you.Isnt that right?
By the way I do know linear algebra,physics and the rest but I just want to know whether the above is correct.


Well, of course some math is implemented, like perspective-calculations, just to take an example. And directX has some matrix functions and stuff like that, but you''ll need more than that. I mean, let''s say you want to use a BSP-tree. Then you''ll have to think at least a bit for yourself...


-----------------------------
Reporter: Are they slow-moving, chief?
Sheriff: Yeah, they''re dead. They''re all messed up.
-Night of the living dead

Share this post


Link to post
Share on other sites
If i''m understanding you right, then yes, it can be done.
You could build a 3D engine in which you transform all your vertices via glRotatef, glTranslatef etc. functions.

However, to build something fast and versatile you really need to have at least your own vector and matrix classes.

Also for a game you need collision detection and other stuff, and this just doesn''t work without math knowledge.

hope that helps



Runicsoft -- home of my open source Function Parser and more

Share this post


Link to post
Share on other sites
OpenGL and DirectX use math themselves for the task of drawing, however that is different from the engine which must tell the Graphics API what to draw based on massive amounts of data. The game engine also controls everything that happens in the game like doing stuff with the input, controlling computer characters and other tasks that don''t have to do with drawing. The engine for a 3d game will nees lots of 3d math running all that stuff which the graphics API dosn''t do for you.

Share this post


Link to post
Share on other sites