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 7787511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:41:45+00:00 2026-06-01T20:41:45+00:00

I am displaying an object in OpenGL using a model matrix for the object,

  • 0

I am displaying an object in OpenGL using a model matrix for the object, which I build from my pre-stored object location AND a quaternion applied to the rotation. I need to find the final cartesian coordinates in 3D of my object AFTER the rotations and transformations applied (the coordinates that the object appears at on the screen). How can I get the plain coordinates?

  • 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-06-01T20:41:47+00:00Added an answer on June 1, 2026 at 8:41 pm

    If I understand correctly, you have an object; if you rendered it without applying any transformation, its center would be at [0,0,0].

    You have a point, [a,b,c], in 3D space. You apply a translation to the modelview matrix. Now, if you rendered the object, its center would be at [a,b,c] in world space coordinates.

    You have a quaternion, [qw,qx,qy,qz]. You create a rotation matrix, M, from this and apply it to the modelview matrix. Now you want to know the new coordinates, [a’,b’,c’], of the object’s center in world space.

    If this is true, then the easiest way is to just do the matrix multiplication yourself:

    a' = m11*a + m12*b + m13*c
    b' = m21*a + m22*b + m23*c
    c' = m31*a + m32*b + m33*c
    

    where

        [m11 m12 m13]
    M = [m21 m22 m23]
        [m31 m32 m33]
    

    But perhaps you’re not actually building M. Another way would be to use the quaternion directly, although that essentially involves building the rotation matrix and then using it.

    There should be no need to actually use gluProject. When you apply the rotation to the modelview matrix, the matrix multiply is done there. So you could just get the values from the matrix itself:

    double mv[16];
    glGetDoublev(GL_MODELVIEW_MATRIX,mv);
    a' = mv[13];
    b' = mv[14];
    c' = mv[15];
    

    This tells you where the modelview matrix is moving the model’s origin.

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

Sidebar

Related Questions

I am using the System.Windows.Forms.WebBrowser object for displaying and printing a report. Unfortunately the
I have a flash object which im currently displaying with 100% width & height
I have a basic dashboard which consists of a single grid object displaying 3
I have a pointer to a third party QListView object, which is simply displaying
I have a View that is displaying data from a list of object that
I recently switched from using NSTimer to CVDisplayLink to redraw my OpenGL animation, but
I have an object which contains several different NSStrings. When displaying this object, depending
I have a DecimalFormat object which I'm using to format all of my double
I have a custom UITableViewCell which is displaying various attributes of a Person object
I am having a problem with displaying a content from a ArrayList() stored as

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.