Orbiter uses left hand, or 'clockwise' ordering of the triangle list to control face visibility.
From 3DModelpdf: "Only the “clockwise” (CW) side of each triangle is rendered: the side which, if you look at
it, has the vertices arranged in a clockwise order. The opposite “counterclockwise” (CCW)
side is invisible."
However, in Martin's blog post on 2D panel geometry there is this layout:
static DWORD panelW = 1280;
static DWORD panelH = 400;
float fpanelW = (float)panelW;
float fpanelH = (float)panelH;
static NTVERTEX VTX[4] = {
{ 0, 0,0, 0,0,0, 0,0},
{ 0,fpanelH,0, 0,0,0, 0,0},
{fpanelW,fpanelH,0, 0,0,0, 0,0},
{fpanelW, 0,0, 0,0,0, 0,0}
};
static WORD IDX[6] = {
0,2,1,
2,0,3
};
The DG in 2010 and in the beta appears to have a similar layout. Unless I'm reading this wrong this is counter clock-wise rotation. I have also noticed I need to flip the normals in my usual script to get the 2D panel to appear. The UV settings are then messed up which may be an un-related issue.
Does the 2D panel mesh geometry not follow the 'left hand' rule? Or am I doing something wrong?
Thanks.
From 3DModelpdf: "Only the “clockwise” (CW) side of each triangle is rendered: the side which, if you look at
it, has the vertices arranged in a clockwise order. The opposite “counterclockwise” (CCW)
side is invisible."
However, in Martin's blog post on 2D panel geometry there is this layout:
static DWORD panelW = 1280;
static DWORD panelH = 400;
float fpanelW = (float)panelW;
float fpanelH = (float)panelH;
static NTVERTEX VTX[4] = {
{ 0, 0,0, 0,0,0, 0,0},
{ 0,fpanelH,0, 0,0,0, 0,0},
{fpanelW,fpanelH,0, 0,0,0, 0,0},
{fpanelW, 0,0, 0,0,0, 0,0}
};
static WORD IDX[6] = {
0,2,1,
2,0,3
};
The DG in 2010 and in the beta appears to have a similar layout. Unless I'm reading this wrong this is counter clock-wise rotation. I have also noticed I need to flip the normals in my usual script to get the 2D panel to appear. The UV settings are then messed up which may be an un-related issue.
Does the 2D panel mesh geometry not follow the 'left hand' rule? Or am I doing something wrong?
Thanks.