Rotation/Translation of axis

This topic contains 3 replies, has 3 voices, and was last updated by  Aaron 5 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30683

    biplab777
    Member

    Hi,

    Without modifying the vertices of the objct, how can I rotate or translate the axis or co-ordinate system in openGL ES 2.0 ?

    Thanks,
    Biplab

    #35220

    Hi Biplab,

    Translation and rotation in OpenGL ES 2.0 is performed in the vertex shader. For examples on how to do this I’d suggest looking at the training courses that come with our SDK, most of them incorporate some form of translation or rotation.

    Thanks,

    Tobias

    #35221

    biplab777
    Member

    Thanks for your reply.

    All the translations/rotations done in vertext shaders in SDK are translation/rotation of object. I could not find any example which does axis(not object) translation/rotation.
    Please correct me if I am wrong.

    Thanks,
    Biplab

    #35222

    Aaron
    Member
    biplab777 wrote:
    All the translations/rotations done in vertext shaders in SDK are translation/rotation of object

    Not strictly true; in addition to the world matrix, most of our vertex shaders also apply view and projection matrices. In general our demos do most of the interesting things in the World matrix to translate/rotate an object. But you can also apply more transforms to the view and projection matrices.

    It’s not obvious what exactly you are trying to achieve by “axis translation/rotation.” However I think you may be able to achieve your goals by applying more matrices to your projection matrix. You could use rotations, or for example you can premultiply it by a matrix to swap the x and y coordinates:

    [0 1 0 0]

    [1 0 0 0]

    [0 0 1 0]

    [0 0 0 1]

    Aaron.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.