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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:31:09+00:00 2026-05-26T16:31:09+00:00

When designing objects to be placed in an OpenGL world space, how are the

  • 0

When designing objects to be placed in an OpenGL world space, how are the world space coordinates stored with their corresponding objects/models?

I’ve been using Wavefront Object files for simplicity and I’ve heard of Collada but haven’t been able to find any standard method of saving a world space, as one might if designing a game level.

I am very new to OpenGL.

  • 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-26T16:31:10+00:00Added an answer on May 26, 2026 at 4:31 pm

    A world position, rotation and scale can always be defined as a 4×4 matrix, but it loses some information if you just store it in one matrix. Therefore, the three matrices are stored separated like so:

    W = Translation * Rotation * Scale
    with
        [ 1 0 0 x ]
        [ 0 1 0 y ]
        [ 0 0 1 z ]
    T = [ 0 0 0 1 ]
    
        [ r r r 0 ]
        [ r r r 0 ]
        [ r r r 0 ]
    R = [ 0 0 0 1 ]
    
        [ sx 0  0  0 ]
        [ 0  sy 0  0 ]
        [ 0  0  sz 0 ]
    S = [ 0  0  0  1 ]
    

    The rotation is quite hard to store in only a single matrix. So most of the time, we use the Quaternion to store a rotation, because it is easier to understand what it does and complies to better calculations. There is a lot that I could explain about gimbal locks (movie), but you probably need a reference guide for matrices and a good openGL math library that contains these data types.

    Since OpenGL is not an engine that has some basic GameObject that you can use, you will have to create that class yourself (assuming OOP here). Store the world data in these objects and draw them in the appropriate order. You should not save world data into the 3D model, since you can instantiate multiple objects of the same model (multiple enemies that look the same).

    Here is a tutorial that shows you how to create a basic engine.

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

Sidebar

Related Questions

I am creating the domain model in my system. When designing my model objects,
I am designing a helper method that does lazy loading of certain objects for
Designing a new system from scratch. I'll be using the STL to store lists
Designing forms has always been fun, but getting them to send email on the
When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to
Is there a commonly-accepted practice for designing java objects that are frequently loaded and
I am designing a set of 'service' layer objects (data objects and interface definitions)
I am currently designing a game in which a maximum of approximately 10,000 objects
I'm designing a Java application using SWT. I have some tables which will display
Assuming I am designing a collection of objects for use by others and assuming

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.