[x3d-public] candidate feature: display bounding box

Andreas Plesch andreasplesch at gmail.com
Sun Feb 2 17:38:15 PST 2020


Thanks, a few more questions:
On Sat, Feb 1, 2020, 8:57 PM Don Brutzman <brutzman at nps.edu> wrote:

>
>
> ...

>     * X3D Architecture, 10.2.2 Bounding boxes
> >
> https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
> >
> >     "The bounding box shall be large enough at all times to enclose the
> union of the group's children's bounding boxes;"
> >
> >     so we should be good on that score.  Note the "at all times" above
> which seems to apply that actual bounding box sizes always get displayed.
> >
> >
> > An empty group has an actual bbox size of 0. How could such a bbox be
> displayed ? A point ?
> > Or by nothing ?
>
> An empty Group (or Inline or whatever) might still have positive
> bboxCenter and bboxSize values specified by the author, in the original
> scene, perhaps in anticipation of animation changes.
>

Yes, so if specified, those values should be used, not computed ones. But
what about the case where the size is not specified, and there is no
geometry, eg a computed size would be 0?


> >      > X3D defines the bounding box aligned with local coordinate system:
> >      >
> https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
> >      > If the appearance of a display bounding box is left unspecified,
> then
> >      > it would make sense to also allow display as world axis aligned
> >      > bounding boxes.
> >
> >     Added ", so that both are aligned with world coordinates" as follows:
> >
> > If "both" is referring to bbox and associated geometry, then it is
> unclear why aligning geometry is mentioned.
> >
> > Aligning the bbox with world axes would mean that all displayed bboxes
> have the same orientation which could be helpful. The drawback is that the
> orientation of the geometry would be hidden.
>
> The goal is simply to have the browser display a bounding box around the
> rendered geometry.
>
> Here it is again:
>
> >     ======================================
> >     https://www.web3d.org/member-only/mantis/view.php?id=1277
> >
> >     10.3.1 X3DBoundedObject
> >
> >           SFBool [in out] displayBBox FALSE
> >
> >     "When displayBBox is true, the bounding box is displayed for the
> associated geometry, so that both are aligned with world coordinates. The
> bounding box is displayed regardless of whether contained content is
> visible."
> >     ======================================
> [...]
>
> Perhaps better:
>
> "When displayBBox is true, the bounding box is displayed for the
> associated geometry. The bounding box is displayed regardless of whether
> the associated geometry is visible."
>
> Phrasing improvements and complete clarity is always welcome.   8)
>

I was trying to raise the question of the orientation of the displayed
bbox. In principle, there are multiple ways to compute a bbox: tightest fit
or axis aligned, where the axes could be from the local or the world
coordinate system. The x3d bbox is defined as axis aligned with the local
coordinate system. So in a more narrow sense the display would just follow
the definition and show the bbox in the orientation of the local coordinate
system. But in a broader sense the display may be thought of as separate
from the definition, since there is no very specific guidance on how to
display the bbox. In this case, the bbox could be displayed as being
aligned with world coordinate axes. This would make for a more uniform look
if many bbox are displayed.

Here is a suggestion for wording:

  "When displayBBox is true, the bounding box for the associated geometry
is displayed aligned with the local coordinate system. If no geometry is
associated, the display is undefined. The bounding box is displayed
regardless of whether the associated geometry is visible."



> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics
> http://faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200202/b43f3d88/attachment.html>


More information about the x3d-public mailing list