Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3671192
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:27:25+00:00 2026-05-19T02:27:25+00:00

I draw a sphere with OpenGL which will be transformed by glRotate(), glScale(), glTranslate().

  • 0

I draw a sphere with OpenGL which will be transformed by glRotate(), glScale(), glTranslate().
How could I get the absolute Position of the Object without calculating all transformations on my own?

I need the coordinates for setting the camera eye position to this point.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:27:25+00:00Added an answer on May 19, 2026 at 2:27 am

    When using those transformations, you are manipulating the modelviewmatrix

    To get the current one you can use ( http://linux.die.net/man/3/glgetfloatv )

    void glGetFloatv(
    GLenum pname,
    GLfloat * params
    );
    

    for example:

    float modelview[16];
    
    // save the current modelview matrix
    glPushMatrix();
    
    // get the current modelview matrix
    glGetFloatv(GL_MODELVIEW_MATRIX , modelview);
    

    should get you the current matrix, multiplying the starting vectors/vertices/coordinates with this matrix will give you the absolute world coordinates.

    EDIT: When making an application you usually want control over the absolute coordinates of each object, manipulate them, and use the opengl transformations to draw them where they are defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm trying to draw a sphere out of discrete blocks. I need this
I'm using GLUT to work with OpenGL (would work with SDL if I could).
I am trying to draw a cylinder in OpenGl. I found this algorithm but
I'm trying to draw lots of circles on a sphere using shaders. The basic
I want to draw a 3D cat(with animation) which is no more than a
I have the following drawScene function which draws a sphere. The coords of X,Y
I draw two spheres in 3d WPF which has points like Point3D(0,0,0) and Point3D(-1.0,1.0,2.0)
I have an object: function Shape(color, position, coordinates){ this.color = color; this.position = position;
Draw a circle,make a rounded UIImageView in it.How to get this, please guide me.
To draw a cube which has 6 sides using libgdx need 6 meshes. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.