New answers tagged glm
0
The image of a point A under a rotation around another point B (an affine rotation if B is not the origin of the space) is A', with
A' = B + R*(A-B)
where R is the matrix of the associated linear rotation.
For example, in dimension 2, say you want to rotate A = (1,0) around B = (1,1) by 90 degrees counter-clockwise. That will yield (2,1). Make a picture ...
1
You can access the memory of any glm type by using glm::value_ptr.
Matrix types store their values in column-major order, and as floats.
0
I managed to fix everything through a lot of experimenting.
It seems my problem came from my own misunderstanding of quaternions.
I was under the impression that they represented a change in angle, when actually they represent an orientation.
So my rotation matrix was always a bit strange because I was just pushing seemingly random values into it, ...
1
How can I calculate intersection with my scene geometries?
it varies depending on your performance needs and scene size, there are different approaches the easiest one is checking ray intersection with all bounding volumes containing geometry in the scene, however this may not be good enough if your scene is huge, or you have limited computational ...
Top 50 recent answers are included