Hi,
I made a long time ago an application in openGL to do augmented reality, and I want to do it with Urho3D now.
I have the intrinsic parameters of my camera, optic center (cx, cy) and focal (fx, fy).
In openGL, I set the camera with :
glFrustum(-_near*cx/(GLfloat)fx,_near*(FRAMEWIDTH-cx)/(GLfloat)fx,_near*(cy-FRAMEHEIGHT)/(GLfloat)fy,_near*cy/(GLfloat)fy,_near,_far);
The prototype is :
glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
What’s the equivalent in Urho3D? I saw that there is a frustum class in Urho3D but in the camera class, there is no “SetFrustum” function, only GetFrustum(). So how to assign a frustum to a scene?
I tried :
camera->SetAspectRatio((float)FRAMEWIDTH/(float)FRAMEHEIGHT);
camera->SetFov(CV_MAT_ELEM( *intrinsic_matrix, float,0,0));
camera->SetNearClip(0.1f);
camera->SetFarClip(1000.0);
but it doesn’t give the expected result.