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
    • Recent
    • Tags
    • Users
    • Login

    Getting the screen bounding box of an object

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 435 Views
    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 Offline
      Helper
      last edited by

      On 14/07/2016 at 14:31, xxxxxxxx wrote:

      I need to know what screen space bounding box an object occupies.
      Something like this:

      Is there any way to know that?

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

        On 14/07/2016 at 17:05, xxxxxxxx wrote:

        Iterate over every point, convert it to screen space and take the minimum/maximum values of the
        components to get the AABB in 2D space.

        Cheers,
        Niklas

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

          On 15/07/2016 at 00:09, xxxxxxxx wrote:

          Thank you, Niklas.
          So, for parametric objects, I will need to convert them internally to a polygonal object.
          Mmmmmm, ok.

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

            On 15/07/2016 at 01:36, xxxxxxxx wrote:

            Hi Rui,

            for parametric objects you can simply access the cache, see GetCache() and siblings in BaseObject API reference. You could also take a look into the new BaseObject Manual of the C++ docs, if you are not afraid of C++ code.
            The functions for coordinate conversion Niklas mentioned are part of the BaseView.

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