(2016-04-23, 20:42)Roland Melkert Wrote: And last: Anyone has the default view orientation matrix as used in Lpub?
I don't know for sure, but I suspect that it is latitude 30, longitude 45 in lat/long spherical coordinates. Here is my OpenGL-compatible code for initializing the matrix in LDView; I'm pretty sure that's the same as what's in LPub:
Code:
void LDrawModelViewer::setupIsoViewAngle(void)
{
rotationMatrix[0] = (TCFloat)(sqrt(2.0) / 2.0);
rotationMatrix[1] = (TCFloat)(sqrt(2.0) / 4.0);
rotationMatrix[2] = (TCFloat)(-sqrt(1.5) / 2.0);
rotationMatrix[3] = 0.0f;
rotationMatrix[4] = 0.0f;
rotationMatrix[5] = (TCFloat)(sin(M_PI / 3.0));
rotationMatrix[6] = 0.5f;
rotationMatrix[7] = 0.0f;
rotationMatrix[8] = (TCFloat)(sqrt(2.0) / 2.0);
rotationMatrix[9] = (TCFloat)(-sqrt(2.0) / 4.0);
rotationMatrix[10] = (TCFloat)(sqrt(1.5) / 2.0);
rotationMatrix[11] = 0.0f;
rotationMatrix[12] = 0.0f;
rotationMatrix[13] = 0.0f;
rotationMatrix[14] = 0.0f;
rotationMatrix[15] = 1.0f;
examineLatitude = 30.0f;
examineLongitude = 45.0f;
}