c++ - Transforming an object between two coordinate spaces -


I am reading "3D Math Primer for Graphics and Game Development", which is coming from a non-math Background I finally started to understand Vector / Matrix Mathematics - which is the relief

But, yes, there is always one but, I have trouble understanding the object from one place to another. In the book, the author has changed 20 degrees (just 2D space for simplicity) into "world space". So we have three places: world space, gun object space and car object space - right? In this book it is said:

"In this figure, we have presented a rifle that is shooting in the car, as indicated by the coordinate location on the left side. We usually start by learning about the speed of the bullet in the gun and the world space. Now imagine moving the coordinates with the car's object space while keeping the speed of the car, gun and shot. We know the location of the gun The trajectory of the bullet in the car and object space of the car, and we can do intersection tests to see if and where the car will be on the car. "

And I I follow this explanation, and when I already know that it rotates 20 degrees in the world, it is not a problem - but how does it say a translation in a situation when I have an archer in a game shooting with a hill somebody else Down? I do not know the angle on which everything has been displaced?

And which object space revolves around here? The World or the Gun Space? Yes, as you can see that I am a little confused.

I think the ideal reaction will be using arbitrary variable for position, angle, etc., using cars and gun examples.

How and how you should read in vector , not on arrays, but Mathematics: P


Comments