2

I'm having a play about with GLScene (an OpenGL based library) in a Delphi 7 project and having trouble trying to alter the "global" (not sure what the correct terminology is for this!) axes of a model.

Essentially, a model loads in sideways, so what I would expect the Y axis to be, it's actually the Z axis. I've attached a screenshot with the floor's axes showing along with the model's. Is there a way I can rotate the mesh when it's loaded in perhaps so it aligns with that the eye would expect? Or is there a particular TGLFreeForm function I can use?

enter image description here

genpfault
  • 51,148
  • 11
  • 85
  • 139
sxthomson
  • 563
  • 2
  • 5
  • 18

1 Answers1

0

so what I would expect the Y axis to be, it's actually the Z axis

What are your assumptions about the default OpenGL coordinate system? Using the typical matrices:

  • +X goes to the right
  • +Y goes up
  • +Z goes out of the screen toward the viewer
datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • And always keep in mind this all depends on how your camera is oriented, once your start rotating the camera, everything can become upside down (like when rotating your head in the real world) – Eric Grange Jan 18 '13 at 08:35
  • @EricGrange: rotating the camera won't flip the coordinate handedness though. – datenwolf Jan 18 '13 at 11:00