Jump to content
  • Advertisement
Sign in to follow this  
babarorhum

OpenGL From data model to its representation in opengl transformations

This topic is 2529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

A trivial question for many of you; which i would really appreciate with this matter as i am starting to bang my head on the wall ;)

My app contains a data model consisting of my "main axises" for each 3d object shown in the opengl module. These axises are in fact a representation axises of 3d objects (like the bone of a body and the 3d objects would be then the members of the body).

Based on user interactions these changes in these main axises are calculated from the current position to the new one.
and i would like to represent these changes also on the screen via the Open GL modules through some glrotate and translate.

For example an axis with its origin in x =0/ y = 0/ z = 0 and x =2, y = 2, z = 0; would be translated in opengl as a glrotate on z wih an angle of 45 degrees; and no glrotate on x or y

At first i thought taking two glrotates on x and y or x and z ; would do the trick but i am having some challenges. Now considering to use orthographic projection on the planes x,y / z,y / x,z to then determine glrotates for respectively x , y and z.

Is that from your oppinion the way to go ? I am not fully convinced and i wanted your oppinion about it.
Or do you see another approach which would be more straightforward ?

Many thanks in advance for any insight you can provide :)

babarorhum

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!