Handedness and Vertex Ordering

  • Right-hand system vs Left-hand system
Pasted image 20240220163052
  • To make the normals point out of the object, RHS adopts CCW ordering whereas LHS adopts CW ordering.
Screenshot 2024-02-20 182345

Conversion between RHS and LHS

  • LHS is the default coordinate system of OpenGL, and LHS is that of Direct3D. Porting between RHS and LHS need to be clearly understood.
  • The difference constructed a barrier hard to cross over for inexperienced programmers. However, the barrier has crumbled away, and we can run an RHS-based application on top of Direct3D, for example. It has been due to GPU's programmability.
  • Poritng an application between RHS and LHS needs two tasks.
    • The order of triangle vertices has to be changed: <p1,p2,p3p_{1}, p_{2}, p_{3}> →\to <p1,p2,p3p_{1}, p_{2}, p_{3}>
    • The z-coordinates (objects and view parameters) are negated.
Built with LogoFlowershow