/// <summary> /// Create a viewport: view at scene from top, no rotation /// </summary> public ILCamera() { m_posX = 0; m_posY = 0; m_posZ = 10; m_quadrant = CameraQuadrant.TopLeftFront; updateCachedVars(); }
///// <summary> ///// update position, cons. polar coord and lookat as new ///// </summary> //private void pol2Cart() { //} private void computeQuadrant() { //if (m_phi == 0.0 && m_rho == 0.0) { // m_quadrant = CameraQuadrant.TopLeftFront; // return; //} if (m_rho < System.Math.PI / 2) { // top if (m_phi < Math.PI) { // right if (m_phi < Math.PI / 2) { // front m_quadrant = CameraQuadrant.TopRightFront; } else { // back m_quadrant = CameraQuadrant.TopRightBack; } } else { // left if (m_phi > Math.PI / 2 * 3) { // front m_quadrant = CameraQuadrant.TopLeftFront; } else { // back m_quadrant = CameraQuadrant.TopLeftBack; } } } else { // bottom if (m_phi < Math.PI) { // right if (m_phi < Math.PI / 2) { // front m_quadrant = CameraQuadrant.BottomRightFront; } else { // back m_quadrant = CameraQuadrant.BottomRightBack; } } else { // left if (m_phi > Math.PI / 2 * 3) { // front m_quadrant = CameraQuadrant.BottomLeftFront; } else { // back m_quadrant = CameraQuadrant.BottomLeftBack; } } } }
/// <summary> /// Create a viewport: view at scene from top, no rotation /// </summary> public ILCamera () { m_posX = 0; m_posY = 0; m_posZ = 10; m_quadrant = CameraQuadrant.TopLeftFront; updateCachedVars(); }