What's the coordinate system of orx?

edited September 2013 in General discussions
What's the coordinate system of orx, is it opengl compatible?
What's the different about the camera coordinate, object coordinate, viewport coordinate? and word position, screen position?


  • edited September 2013
    The coordinate system is right handed and is an extension of the traditional 2D:
    X point right
    Y pointing down
    Z pointing toward the screen

    When we speak of <referential> coordinates, it just means that that system's origin is the <referential> and that the axes are rotated/scaled according to the referential.

    All those systems are world coordinates. Screen coordinates are 2D only and are the traditional ones:
    X pointing right
    Y pointing down
    Origin being the top left corner

    Conversion between screen & world coordinates are done using the transformations applied by the camera/viewport couple (and there are functions for this in orxRender).
  • edited September 2013
    I see :)
  • edited October 2013
    What's the comara direction?
    Suppose i define a camera

    ; We use the same size for the camera than our display on screen so as to obtain a 1:1 ratio
    FrustumWidth = @Display.ScreenWidth
    FrustumHeight = @Display.ScreenHeight
    FrustumFar = 100.0
    FrustumNear = 0.0
    Position = (10.0, 100.0, -1.0)

    Where is the camera locate? which direction does the camera towards?
  • edited October 2013
    Cameras are always pointed toward the same direction: they all point toward the Z axis, ie with growing Z.

    As for your camera location, you just wrote it's position the line above. :)
  • edited October 2013
    I have done a lot of test, now make sense :) thank you
    By the way, the camera/viewport transform just make the opengl coordinate system the same as screen one, right i means two dimension compare.
  • edited October 2013
    Yes, we've tried to hide the differences as much as possible. Up till recently one would still need to vertically flip compressed textures and invert texture coordinates in shaders but it's not required anymore.
  • edited October 2013
    The object create with Scroll get No graphics on object xxx, can't set repeat. while using orx without this assert waring. any idea?
  • edited October 2013
    That warning message got fixed about a week ago: https://bitbucket.org/orx/scroll/commits/43ea21bf530446c946c4d1e1ae958d0c2921ed68

    If you sync the repository, you should be good.
    Also I'll answer your other questions tonight as I'm on my phone at the moment.
  • edited October 2013
    Thank you, do you have other IMs in use such as GTalk or others?
  • edited October 2013
    I replied in PM.
Sign In or Register to comment.