The glm tag has no wiki summary.
1
vote
1answer
124 views
glm quaternion camera rotating on wrong axis
I'm trying to get my camera implemented with a glm::quat used to store the rotation.
However, whenever I do circles with the mouse, the camera rotates along the axis I am viewing (i.e. I think it's ...
2
votes
0answers
114 views
Use quaterions to move the camera direction according to mouse movement
I am trying to use quaterions to move the camera direction vector in the following way.
This code is perfectly working
glm::quat temp1 = glm::normalize( glm::quat((GLfloat)( ...
1
vote
1answer
215 views
Combining rotation,scaling around a pivot with translation into a matrix
In short: I need to combine rotation (in the form of a quaternion), scaling around a pivot point along with translation into a transformation matrix.
The long:
I am trying to implement a proprietary ...
1
vote
0answers
72 views
Determining axis to rotate around
I'm trying to implement a free-look third person camera (using glm). I know that the general transformation is
newCameraPosition = translate(lookatPoint) * rotation(angle,axis) * ...
1
vote
2answers
118 views
What ways are there for making vector types available in scripting?
I use Google V8 engine to embed Javascript into my game for scripting. As interface to my native code, I already registered some C++ functions to the scripting context.
In the native code, I make ...
0
votes
0answers
141 views
Space Strategy Ship Movement Math
This is similar to a question I asked a while ago, but I phrased it so terribly so might as well start over. I am trying to implement ship movement in 3D space, but confined to a 2D plane at y=0 (see ...
3
votes
2answers
432 views
Rotating an object when the center in not the origin - opengl
I'm beginning with GLSL and I learning the basic, I am using glm to do the matrix calculations at this point everthing ok,the problem is how I can move the origin to the center of my object, not the ...
0
votes
1answer
104 views
Trying to convert as3 Matrix to C++ glm matrix
I am trying to convert a library called DragonBones to C++ Opengl which allows you to use Flash based skeletal animation. I'm almost done but I am running into a problem. I am trying to transform the ...
0
votes
1answer
232 views
How can I remove the view and projection matrix from ray position to get only the ray model?
I've got a little problem with my picking module and I need your help.
I have a method to project a ray from the camera to a fixed point when I click somewhere. The computed ray looks good, it go to ...
1
vote
1answer
70 views
Get the address of a matrix in GLM library
Is there a way to get the address of a matrix from a GLM matrix?
I'm using opengl 4 and glm library though I can't seem to find anything, which might help.
2
votes
1answer
117 views
How to rotate camera around some point?
I have screen with dimensions: 800x600.
The object that I want to rotate around is located at (400,300, -50) - center of the screen.
Orthogonal projection:
Near plan - 0.1f, far plane - 1000.0f
left - ...
2
votes
1answer
200 views
Rotating and Translating a Node in Horde3D with Matrices and Quaternions
I have been trying to learn how to use the Horde3D rendering engine for the past couple of days,
and so far I have managed to learn a decent amount and integrate Bullet Physics with it as well.
My ...
0
votes
2answers
397 views
Texture mapping issue in my Wavefront *.obj parser
I wrote a simple *.obj parser reading read vertices, texcoords and normals. But when I draw a model the texture isn't mapped correctly.
I have already tried uv.y = 1.0f - uv.y to get inverted Y axis ...
4
votes
1answer
397 views
Picking 3D with OpenGL ES 2
I'm trying to implement picking in my framework but I don't understand how I can do this.
I'm working with:
OpenGL ES 2.
GLM mathematic library.
What I have understand, picking can be made with ...
0
votes
1answer
204 views
gluLookAt strange behavior implementing camera
I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly ...
-1
votes
1answer
79 views
Transformations are not correct using GLM and OpenGL
The aim of my program is to render a simple colored triangle in rotation. The rotations are correct if all Z values of my vertices are equals to 0.0f. If one of these values are different of 0.0f the ...
-2
votes
1answer
125 views
Incorrect rotations using openGL GLM and shaders [closed]
The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...
2
votes
1answer
1k views
How to implement a basic arcball camera in OpenGL with GLM
I only just started learning OpenGL and even things like vector maths etc a couple of days ago, so I am having a bit of trouble figuring out exactly what to do to implement an arcball camera system.
...
2
votes
0answers
120 views
Box2D, OpenGL, resolution and matrix setup
Okay, my internal units are going to be meters, ranging between 0.1 and 10 meters for size.
First of all, my mind is all wrapped up in a knot trying to understand how to handle my game with multiple ...
0
votes
1answer
142 views
Box2D OpenGL debug renderer convert box2d coordinates to world space
I made an OpenGL 3.x renderer for Box2D's debug draw (b2Draw base class). Unfortunately I've tried for a while now to convert the box2D units, which are meters to my internal units which are pixels. I ...
0
votes
2answers
150 views
Translate camera position toward camera orientation
I have a camera position (Vec3) and camera horizontal/vertical angle. Now I want to translate my camera position toward the current camera orientation - what is the best way to do that? I am sure it's ...
0
votes
0answers
160 views
GLM Math: error: invalid cast from type 'const glm::detail::tvec3<float>' to type 'float'|
I'm casting a glm type to an normal array using glm::value_ptr() as follows
glm::vec4 position;
glm::mat3 orient;
...
glm::mat4 transformMatrix=glm::translate( glm::mat4(orient) , ...
1
vote
1answer
722 views
Android ndk-build can't find glm headers
I am trying to port some boilerplate code of mine to work on android, using the android ndk & NativeActivity
So far I have just one file that defines the glue between android and my code and it ...
1
vote
2answers
524 views
Matrix Rotation with three Angles
I want to rotate a form with three given angles fo each of the three axis. But the GLM rotation function takes only one angle and a vector as arguments.
How can I convert between both formats?
3
votes
2answers
5k views
Camera rotation - First Person Camera using GLM
I've just switched from deprecated opengl functions to using shaders and GLM math library and i'm having a few problems setting up my camera rotations (first person camera). I'll show what i've got ...
0
votes
1answer
1k views
matrix 4x4 position data
I understand that a 4x4 matrix holds rotation and position data.
The rotation data is held in the 3x3 sub-matrix at the top left of the matrix.
The position data is held in the last column of the ...
0
votes
1answer
323 views
vector rotations for branches of a 3d tree
I'm attempting to create a 3d tree procedurally. I'm hoping that someone can check my vector rotation maths, as I'm a bit confused.
I'm using an l-system (a recursive algorithm for generating ...
1
vote
2answers
2k views
GLM: Quaternion SLERP Interpolation
I wish to interpolate two quaternion values. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports GLM (OpenGL Mathemathics) library, so ...
4
votes
4answers
4k views
GLM: Euler Angles to Quaternion
I hope you know GL Mathematics (GLM) because I've got a problem, I can not break:
I have a set of Eular Angles and I need to perform smooth interpolation between them. The best way is converting them ...