Questions tagged [glm]
GLM is a C++ math library based on the GLSL language.
154 questions
1
vote
0
answers
27
views
CGLM Not Rendering with Sokol [closed]
I've setup cglm from a wrap configured with Meson, and have copied one of the samples from https://github.com/floooh/sokol-samples/tree/master (cube-sapp, to be exact). I've tried to replace sokol's ...
0
votes
2
answers
46
views
Position camera to 'head' joint's position in skeletal animation
Finished this great tutorial on skeletal animation:
https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation
All works as expected, no issues!
Here is what matrixes I use to achieve skeletal ...
1
vote
0
answers
54
views
Cannot transform vectors from viewport to world
I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions.
However, i stumbled upon a very ...
0
votes
1
answer
230
views
Mouse Ray Picking: Z-Coordinate of Projected vector (glm::unproject)
I've run into a curious issue when implementing ray picking in my game engine.
It seems the Z coordinate of the Projected matrix has to be ever so slightly more than ...
0
votes
0
answers
69
views
Bullet physics incorrect rotation with more than one axis
im try to integrate currently bullet into my game framework. But when i try to set the rotation for an rigidbody with more the 1 axis i recive the current result
It looks that the rotation is ...
0
votes
1
answer
99
views
Vulkan Phong shader problem
Light increases its intensity as it come closer the origin model.
Vertex Shader:
...
0
votes
1
answer
1k
views
glm::frustum vs glm::perspectiveFov
When I use glm::perspectiveFov(90.0f,512.0f,512.0f,1.0f,256.0f) I receive a working perspective projection with 90° in both x and y, as seen below (camera is in ...
0
votes
1
answer
274
views
Unprojecting screen space to world space stops working when camera not at origin
I'm trying to implement screen space to world space in my engine to allow object selection in editor. I understand that the process should essentially be the reverse of projection. So to go from world ...
0
votes
1
answer
98
views
Transforming a ray to NDC coordinates
I am trying to have ray tracing with a mesh using NanoRT and I want to be able to allow for a model transform on top of my view and projection transforms.
I have successfully transformed my ray from ...
0
votes
1
answer
219
views
glm::eulerAngles gives unexpected output for quaternion
I used the euler->mat4->quat to give the right result, but euler->quat gives the wrong result - is there something I did wrong?
...
1
vote
1
answer
708
views
Implementing a Maya-like orbit camera in Vulkan/OpenGL
I want to create an orbit camera with zooming, panning, and rotation. I used the following examples to create cameras:
https://stackoverflow.com/questions/54400422/how-to-implement-altmmb-camera-...
1
vote
1
answer
1k
views
How do I increment a quaternion rotation in update()?
When working with rotations expressed as angles, it makes sense to be able do to something like
void GameLoop::update(){
pawn.rotation.x += 0.01;
}
And slowly ...
0
votes
0
answers
46
views
How to calculate angles after subsequent rotations?
I have a class that manipulates a model matrix in opengl:
...
2
votes
1
answer
1k
views
How to make a concisely, elegantly, and human-friendly Quaternion camera?
I have spent three weeks struggling with the quaternion camera!
Now I have two Implementations. One has some kind of gimbal lock issue or something like that. Another one is totally anti-human ( I ...
1
vote
1
answer
1k
views
How is the GLM '*' operator on quaternion and vec3 defined?
Using the definition of quaternion rotation given here:
So the equivalent code in GLM of the above formula would be like this:
...