OpenGL Demos
OpenGL Misc
MSG Board
Megabyte Softworks
C++, OpenGL, Algorithms

Current series: Basic physics
(Return to list of tutorial series)

Covers some basic physics problems, like ball rebouncing. More on later.

Date: 02.10.2007

This program shows you how to detect and react on collision of two spheres and sphere collision with world. This is the first part, I plan to create also second part later, which will cover some errors (try to throw balls into that small box and you will see).

I used my library mgbsoft.lib, which includes some basic 3D math functions, OpenGL basecode, toggling fullscreen and changing resolutions (but I'm not sure if it works properly everywhere) and so on. So if you want to compile code, you must add mgbsoft.lib (and also freetype.lib) to your compiler library directory. They are included with source code.

Read here
Download (869 KB)
2157 downloads. 0 comments