Fov



  • On 15/05/2013 at 07:49, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R14+ 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
     I am trying to get the fov:

    BaseDraw* editor = doc->GetActiveBaseDraw();
    if (!editor)
           return false;
      m_camera= editor->GetSceneCamera(doc);

    BaseContainer *data = m_camera->GetDataInstance();

    Real fov_h=data->GetReal (CAMERAOBJECT_FOV);
      Real fov_v=data->GetReal (CAMERAOBJECT_FOV_VERTICAL);

    but fov_h, fov_v is always==0. What could I be doing wrong?

    Edit: I seem to have worked out what to do to get the fov.

    I would also like to get hold of the clipping planes and frustum (as in OGL) is are these values available somewhere?

    Markus



  • On 15/05/2013 at 09:29, xxxxxxxx wrote:

    So, how did you get the FOV?



  • On 15/05/2013 at 10:42, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    So, how did you get the FOV?

    basically

    GeData fov_h;
      m_camera->GetParameter(DescID(CAMERAOBJECT_FOV), fov_h, (DTYPE_REAL, DESCFLAGS_GET_0));



  • On 15/05/2013 at 10:50, xxxxxxxx wrote:

    you have to calculate the view cone by yourself.  it is pretty simple math.

    http://forums.cgsociety.org/showpost.php?p=7573932&postcount=3



  • On 16/05/2013 at 03:43, xxxxxxxx wrote:

    How does this work for parallel projections?



  • On 16/05/2013 at 04:44, xxxxxxxx wrote:

    zoom = 1024/units



  • On 16/05/2013 at 06:36, xxxxxxxx wrote:

    Sorry, how does that related to the frustum?



  • On 16/05/2013 at 08:56, xxxxxxxx wrote:

    It doesn't, as a parallel camera doesn't have a frustum.
    You work with the zoom for coverage where the base 1024
    is a zoom of 1.



  • On 16/05/2013 at 09:53, xxxxxxxx wrote:

    I see, so the width of the world that I can see in the view is 1024 units


Log in to reply