Jump to: navigation, search

Difference between revisions of "GEF3D Coordinate Systems"

(New page: In GEF, there usually is one global coordinate system and figure-local coordinate systems to deal with. Generally, mouse coordinates can be translate to the global coordinate system and th...)
 
Line 3: Line 3:
 
In GEF3D, there are three types of coordinate systems that framework users have to deal with:
 
In GEF3D, there are three types of coordinate systems that framework users have to deal with:
  
* screen coordinates (also called mouse coordinates in GEF or window coordinates in OpenGL)
+
* '''screen coordinates''' (also called mouse coordinates in GEF or window coordinates in OpenGL)
* global world coordinates (3D coordinates in world space)
+
* '''global world coordinates''' (3D coordinates in world space)
 
** figure-local 3D coordinates
 
** figure-local 3D coordinates
* surface coordinates (2D coordinates on the surface of a 3D host figure)
+
* '''surface coordinates''' (2D coordinates on the surface of a 3D host figure)
 
** figure-local 2D coordinates (only applies to embedded 2D editors)
 
** figure-local 2D coordinates (only applies to embedded 2D editors)
  

Revision as of 06:20, 27 June 2009

In GEF, there usually is one global coordinate system and figure-local coordinate systems to deal with. Generally, mouse coordinates can be translate to the global coordinate system and the figure-local coordinate systems in a simple and straightforward fashion, and users of the framework seldomly have to deal with these issues. In GEF3D however, there are more coordinate systems involved and dealing with those can become cumbersome. This article aims to describe the concepts of coordinate systems and coordinate system conversion in GEF3D.

In GEF3D, there are three types of coordinate systems that framework users have to deal with:

  • screen coordinates (also called mouse coordinates in GEF or window coordinates in OpenGL)
  • global world coordinates (3D coordinates in world space)
    • figure-local 3D coordinates
  • surface coordinates (2D coordinates on the surface of a 3D host figure)
    • figure-local 2D coordinates (only applies to embedded 2D editors)

On top of that, the following conversions are possible:

  • global world coordinates <-> figure-local 3D coordinates
  • surface coordinates <-> global world coordinates
  • screen coordinates + depth value -> global world coordinates
  • screen coordinates -> figure-local 3D coordinates
  • screen coordinates -> surface coordinates

To explain more about these concepts, we will first describe in greater detail the coordinate systems and the conversions. After that, we will explain how embedded GEF editors and their tools relate to the GEF3D coordinate systems and how GEF3D provides 2D coordinates to them.