detection

C++ memory leak without virtual destructor

In this post I will talk about detecting and debugging memory leaks in a C++11 program, Visual Studio’s built in heap profiler and Intel Parallel Studio 2019. And also the importance of virtual destructors when implementing derived subclasses.

Distance from point to plane implementation

Calculation of closest points between objects gives us the distance between these objects. These calculations are one of the most powerful in collision detection algorithms in a sense that they can minimize calculations a lot. If the combined maximum movement of the objects is less than the distance between them, a collision will not occur and we can save us a lot of time detecting the impact.

Collision theory

What is computer physics?

Computer physics is the art of simulating a world inside a computer. The world doesn’t have to be real or resemble anything like our own planet. In a simulation, you can “invent” anti-gravity and see what happens when everything repulses all other objects. There are also some technical limitations when determining what kind of simulation you want to simulate. If you want to simulate how galaxies interact with each other, there is no point in simulating every star and planet in every galaxy. And, simulating every atom in every star and planet is certainly not feasible. A simulation is in most cases a simplification of a real world problem.

Sphere vs AABB collision detection test

As the sphere is being the simplest primitive there is, the test for Sphere and AABB intersection is easy. This solution works also for Sphere Cube intersection tests.