Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: GClements

Search: Search took 0.00 seconds.

  1. Replies
    10
    Views
    683

    A matrix represents a linear function....

    A matrix represents a linear function. Multiplying matrices is equivalent to composing the functions.

    Matrix multiplication is associative: (A.B).v = A.(B.v) (vectors are just matrices with a...
  2. Replies
    10
    Views
    683

    This should be the other way around: ...

    This should be the other way around:


    _vector = _trans * _vector;

    Reversing the order has the same effect as transposing the matrix:

    (A.B)T=BT.AT

    GLM has the same behaviour as GLSL:...
  3. Replies
    10
    Views
    683

    glm::mat4 my = glm::rotate(yrot, 0.0f, 1.0f,...

    glm::mat4 my = glm::rotate(yrot, 0.0f, 1.0f, 0.0f);
    glm::mat4 mx = glm::rotate(xrot, 1.0f, 0.0f, 0.0f);
    glm::mat4 m = my * mx;

    or:


    glm::mat4 m = glm::mat4(1.0);
    glm::rotate(m, yrot, 0.0f,...
  4. Replies
    10
    Views
    683

    In terms of your code, it's the direction you...

    In terms of your code, it's the direction you move when you press W. In the more general sense, Euler angles are just a way of representing a rotation (i.e. an orthonormal matrix). What that matrix...
  5. Replies
    10
    Views
    683

    yrotrad is the heading, xrotrad is the elevation...

    yrotrad is the heading, xrotrad is the elevation (angle from horizontal). However, the change to xpos/zpos should also be multiplied by cos(xrotrad).

    For the most part, the only trigonometry...
Results 1 to 5 of 5