You say you have problems on a book due to math, then you try to learn all math you can find at once.
That seems too much - learning without a specific problem does not work well for me, i immideatly forget about it.
Instead i narrow down one problem and try to understand the given solution. This way understanding the math happens automatically and i can apply it to anything where it's applicable.
An example is matrix and vector math we use a lot in games. Math background for this is a system of linear equations, but this did not help me to understand why and how this works.
What did work is to look at the geometric nature of those things, and the key is the dot product, example conclusions:
* Using the dot product i can get the 1D coordinate of a 3D point along a 3D direction.
* If i define a space by 3 orthonormal directions (e.g. the typical x,y,z axis), i can get 3 of those 1D coordinates to find the position of my point in this space. With this knowledge i can rotate and translate the point from one space to another like this:
struct Space
{
vec3 directionX; vec3 directionY; vec3 directionZ;
vec3 position;
};
vec3 localPoint;
localPoint.x = spaceA.directionX.Dot(worldPoint.x - spaceA.position.x);
localPoint.y = spaceA.directionY.Dot(worldPoint.x - spaceA.position.x);
localPoint.z = spaceA.directionZ.Dot(worldPoint.x - spaceA.position.x);
vec3 newWorldPoint;
newWorldPoint = spaceB.position;
newWorldPoint += spaceB.directionX * localPoint.x;
newWorldPoint += spaceB.directionY * localPoint.y;
newWorldPoint += spaceB.directionZ * localPoint.z;
This example would make sense for a problem like:
I know the world space positions of a vertex from object A.
I know the transform of Object A.
I want to know what position this vertex would have if it would be attached to another object B (or the same object at different time when its transform has changed.)
Do you understand this? If so, you already understand most of how we use 4x4 matrices, or 3x3 matrices for rotation only, or 4x3 matrices. Look at the Space struct and replace the member variable names with an array of 4 times vec3 - you get a 4x3 matrix. The matrix * vector routines in your math lib do the same thing that i wrote above - check yourself.
* You can extend this to understend things like transform hierarchies like we use for character skeletons or scene graphs. From the above we know how to do matrix * vector multiplication, and because a matrix is only a number of vectors, we already understand matrix * matrix multiplication too, so nothing new too learn, you just need to imagine and realize. (Visalization is key to grasp this stuff!!! Visualize vectors, points, draw xyz axis with RGB color, etc. It shows you what your code is doing. Debugging by looking at numbers does not work well for geometrics.)
Hope this helps - i remember you've had issues with matrices in another thread. (Also notice the above explains how 3D rotations can be applied and how 3D orientation is defined - it's always just a rotated space of xyz axis)
OUT OF TOPIC: How to format a piece of code? I've used (code) and (/code) with square braces - bit since some time this always deletes anything i've written after the code - better not try again.