Front or back facing -- LH/RH system unknown
Given the screen space coordinates of a triangle in counter clockwise order, how would you determine if the triangle is front or back facing, if you didn''t know whether the coordinate system is right-handed or left-handed?
jerry
The "front" is whatever you choose it to be... If you want
clockwise to to "front", go ahead. If you want counter-clockwise
to be "front", that works too. Just be consistent.
~~~~
Kami no Itte ga ore ni zettai naru!
clockwise to to "front", go ahead. If you want counter-clockwise
to be "front", that works too. Just be consistent.
~~~~
Kami no Itte ga ore ni zettai naru!
神はサイコロを振らない!
Jerry,
The coordinate system''s "handedness" determines the screen space winding order rule on whether a triangle is front-facing or not.
Front-facing triangles in a right hand coordinate system will have a counter-clockwise winding order in screen space. Back-facing triangles will have a clockwise windind order in screen space. Reverse this rule for left hand coordinate systems.
To answer your question, the triangle is always visible in screen space until you define the world space coordinate system (LH or RH). One could argue that if the object never existed in a 3D coordinate space, then it doesn''t have the notion of a front or back face because the concept of "front" or "back" is defined by Z.
The coordinate system''s "handedness" determines the screen space winding order rule on whether a triangle is front-facing or not.
Front-facing triangles in a right hand coordinate system will have a counter-clockwise winding order in screen space. Back-facing triangles will have a clockwise windind order in screen space. Reverse this rule for left hand coordinate systems.
To answer your question, the triangle is always visible in screen space until you define the world space coordinate system (LH or RH). One could argue that if the object never existed in a 3D coordinate space, then it doesn''t have the notion of a front or back face because the concept of "front" or "back" is defined by Z.
quote:
Original post by don
The coordinate system''s "handedness" determines the screen space winding order rule on whether a triangle is front-facing or not.
Not necessarily. The norm is to use CCW for RH system and
CW for LH system.
You can use CW as front for RH and CCW for LH, if you REALLY
want to. In OpenGL, it''s just a matter of calling
glFrontFace(GL_CW) or glFrontFace(GL_CCW).
~~~~
Kami no Itte ga ore ni zettai naru!
神はサイコロを振らない!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement