Skip to content

BoundingBox

Benedikt Hensen edited this page Nov 22, 2018 · 6 revisions

Bounding Box

The bounding box encapulates 3D models and provides the transformation controls in order to place the 3D model somewhere in the environment.

Structure

The bounding box is organized into the following components:

  • Box
  • X
  • Y
  • Z
  • Widgets
  • Content
  • MenuCenter
  • FacePlayer

Box

The box is an empty gameobject with a box collider. It ensures that the bounding box is solid if it is displayed.

Wires

The bounding box's edges are represented by wires. These wires are cylinder 3D models with a low diameter. The wire objects are separated into the groups X, Y, Z according to the directoin in which they are pointing. This grouping allows for better size adaption: The length of the wires in one direction can be adapted by scaling the parent group element. Without the separation, scaling the wires into one direction, means that the other two groups of wires will get strechted along their width which changes the thickness of the wires. Instead, changes to the size are broken down to the individual groups so that only the length of a wire is changed but not its thickness.

Widgets

The widgets container consists of controls for scaling and rotation. The scaling widgets are situated at the corners of the box and the rotation widgets are positoined at the middle of the edges. The whole bounding box itself is also a widget: It acts as a translation control for moving the 3D model.

The functionality of the widgets is determined by the DragHandle script. It defines if the control is for translating, rotating or scaling. Its parameter gesture orientation is used in the rotation case. It expects a unit vector which specifies the rotation axis, e.g. (1,0,0) for rotation around the forward axis. The DragHanle script relies on the TransformationManager which also needs to be attached to the bounding box game object. The TransformationManager handles the actual transformation action based on the input on the control.

In addition, the bounding box supports voice input. This is realized by the SpeechInputHandler component from the MixedRealityToolkit.

HoloLens also supports a two-handed scaling gesture which has been added by the component TwoHandManipulatable which is also the MixedRealityToolkit. Its functionality has been restricted to scaling and the option Enable One Hand Movement has been deactivated because it is already handled by the DragHandle and the TransformationManager. The translation functionality should not be substituted with the One Hand Movement from this component because the TransformationManager also handles some application specific synchronization triggers between connected HoloLenses.

Two Hand Scaling Demo

Further short clips of the Bounding Box's features can be found here.

Content

The 3D models in the bounding box are integrated as children of the Content game object. In GaMR, they are added in the 3D model import pipeline. In the same step, the bounding box is resized so that it encapsulates the bounding box.

Menus

The Menu Center game object is an auxilary point. It always stays at the bottom of the box so any menus which are attached to the bounding box like a context menu or the quiz menus, are anchored to this point.

See also

  • Bounding Box Interactions: User-manual page which displays the bounding box's interaction possibilities.
  • Buttons: Description of the different implemented buttons on the menus
Clone this wiki locally