Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Fov

    SDK Help
    0
    9
    692
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        So, how did you get the FOV?

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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));

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

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

              How does this work for parallel projections?

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

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

                zoom = 1024/units

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

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

                  Sorry, how does that related to the frustum?

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post