[x3d-public] candidate feature: display bounding box

Don Brutzman brutzman at nps.edu
Mon Jan 20 18:20:08 PST 2020


Summary: we should consider adding a field on X3DBoundedObject nodes to display bounding boxes.

On 1/18/2020 7:04 AM, Andreas Plesch wrote:
> It makes a lot of sense to use X3DBoundedObject for a visible field.
> It turns out that x3dom always used X3DBoundedObject for its render field:
> 
> https://github.com/x3dom/x3dom/blob/master/src/nodes/Grouping/X3DBoundedObject.js#L40
> 
> x3dom  followed InstantReality:
> 
> https://doc.instantreality.org/documentation/nodetype/BoundedNode/

namely "showBBox 	SFBool 	inputOutput 	FALSE 		Show Bounding Box of Subtree."

Bounding boxes may optionally be provided by authors but are almost always computed directly by browsers.

This feature is also provided in view3dscene and other tools, albeit perhaps as a browser setting.

The ability to display bounding boxes has multiple potential benefits:
- highlight geometry of interest, such as a selection or a target;
- show collision boundaries, for camera-to-object or object-to-object collisions;
- provide highlighted user feedback,
- ... other uses perhaps?

This feature can be accomplished by authors but only with significant effort, complex error-prone computation, and higher profiles for use of scripting (and likely prototypes as) well.

I doubt if an X3D player can implement X3D without having this feature already.

Suggested specification addition:

https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#X3DBoundedObject
10.3.1 X3DBoundedObject

	SFBool [in out] showBBox FALSE

"When showBBox is true, a wireframe bounding box is displayed for the associated geometry."

All opinions and improvements welcome.

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



More information about the x3d-public mailing list