Default Z value to 0 and reverse the value, so positive Z is closer to the viewer
This commit is contained in:
@@ -30,8 +30,7 @@ DisplayObject::DisplayObject(bool inInitRef) : Object(inInitRef)
|
|||||||
mParent = 0;
|
mParent = 0;
|
||||||
mGfx = 0;
|
mGfx = 0;
|
||||||
mDirtyFlags = 0;
|
mDirtyFlags = 0;
|
||||||
x = y = 0;
|
x = y = z = 0;
|
||||||
z = 0.1;
|
|
||||||
scaleX = scaleY = 1.0;
|
scaleX = scaleY = 1.0;
|
||||||
rotation = 0;
|
rotation = 0;
|
||||||
visible = true;
|
visible = true;
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ void OpenGLS3D::FocusEye (Trans4x4 &outTrans) {
|
|||||||
outTrans[0][0] = (a*n);
|
outTrans[0][0] = (a*n);
|
||||||
outTrans[0][1] = (b*n);
|
outTrans[0][1] = (b*n);
|
||||||
outTrans[0][2] = m;
|
outTrans[0][2] = m;
|
||||||
outTrans[0][3] = (n*tx + m*tz);
|
outTrans[0][3] = (n*tx + m*-tz);
|
||||||
|
|
||||||
outTrans[1][0] = c;
|
outTrans[1][0] = c;
|
||||||
outTrans[1][1] = d;
|
outTrans[1][1] = d;
|
||||||
@@ -282,7 +282,7 @@ void OpenGLS3D::FocusEye (Trans4x4 &outTrans) {
|
|||||||
outTrans[2][0] = -a*m;
|
outTrans[2][0] = -a*m;
|
||||||
outTrans[2][1] = -b*m;
|
outTrans[2][1] = -b*m;
|
||||||
outTrans[2][2] = -n;
|
outTrans[2][2] = -n;
|
||||||
outTrans[2][3] = -(n*tz-m*tx);
|
outTrans[2][3] = -(n*-tz-m*tx);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user