Getting the screen bounding box of an object



  • 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?



  • 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



  • 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.



  • 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.


Log in to reply