Skip to content

OGrEE 3D AR

taufflie edited this page Aug 5, 2022 · 2 revisions

User manual

Start

Looking at the palm of one of your hands brings up the menu. The children of an object are not loaded by default, they are only loaded if the user wants to display them for performance reasons.

General notions

There are three modes of interaction with the objects of a room: selection, focus, and edit (the names are temporary). All objects in a rack can be interacted with by touching them with the index finger. However, for performance reasons, only the front and back sides of a rack detect touches. Touching the front(back) face of a rack will update all its direct and indirect children so that their interoperable face is the face on the same side as the front(back) face of the rack. It will be above the touched face that the buttons will be positioned.

Modes description

Select

When an object is touched with the index, the object is selected: it becomes green and half transparent and its children are loaded via the API if necessary and displayed. As soon as an object has been selected, buttons appear at the top left of it. The buttons appear and disappear according to the user's manipulations. It is possible to use a button by touching it with the index finger or by pinching it remotely.

Focus

When an object is focused, it becomes the highest object in the hierarchy and it is not possible to move up with the parent selection button until the object is defocused (by pressing the same button). In this mode it is possible to move children independently by pinching them at a distance and to select them by touching them. Selecting a child will make the father disappear but he will remain the focus object as long as another child is not focused or this one is not defocused.

Edit

When an object is in Edit mode, the children of the object are always displayed but are neither movable nor selectable. It is possible to apply transformations to the focus object according to its nature:

  • If it is a rack, it is possible to move it vertically by pinching it from a distance or by touching it and to rotate it along the vertical axis by pinching the handles located in the middle of the vertical edges from a distance or by touching them.
  • If it is not a rack, it is possible to turn it in any direction by pinching the handles located in the middle of the edges or to change its size by pinching the handles located on the corners.

Buttons description

Edit button

The Edit button appears when the selected object is in focus and switches to Edit mode.

Focus button

The focus button allows to focus on the selected object.

Parent selection button

The parent selection button allows you to select the father of the selected object, except if the latter is a rack. In this case, the rack will simply be deselected.

Reset button

The Reset button resets the positions of the direct children of the selected object as well as its own position. This button cancels all manipulations made in Edit and Focus modes.

Switch button

The switch button is used to change the selectable face of the objects, which is the one that the buttons overlay. It is useful when the object has been rotated 180 degrees in Edit mode.

Developer's guide

Modified scripts for AR

FocusHandler

The focus, selection and edit mode changes are handled in the FocusHandler and are not yet integrated in the PC version.

Events/AllEvent

Added ChangeOrientationEvent, EditModeInEvent and EditModeOutEvent.

Added scripts for XR

All the scripts added the XR folder.

XR

ButtonManager

Manages the positioning and the behavior of the buttons, contains the functions called when a button is clicked.

HandInteractionHandler

Is made to handle all actions resulting from touching an object, only selecting exists for the moment. Handles the selection of objects when they are touched as well as the assignment of the interactable face in the case of a rack.

ScaleBehaviour

Resets the size of the hand menu to its initial value when it is recalled in front of the user.

XR

ApiListener

Most important class of the AR version. A function in this class takes a picture when called. The picture is then processed into an array of bites and send alongside with additional information (deviceType and currentSite) to the python API. IMPORTANT: The response of the API is currently deserialized into 3 strings site, room, and rack. This is what is adapted for my use. Some modifications are made on these strings because we know exactly how they are supposed to be (since we are using regular expressions). At some point, I only keep a part of the string for instance, or I add some letters because I know that I need them to match the name of my site in the Database.

SettingsMenuManager

Manages the settings menu that allows setting deviceType and currentSite for APiListener.

SearchMenuManager

Manages the search menu that allows browsing the database with a 3D interface.

APIMenuHandler

Child class of GridMenuHandler, handles the menu for loading objects via the API.

RackRotationHandler

In Edit mode, detects if a rack is grabbed and stops it from rotating as long as he stays grabbed.

RoomTpMenuHandler

Child class of GridMenuHandler, handles the menu for teleporting to loaded rooms.

UManager

Enables/Disables the Uhelpers to give visual information about the position of a device in a rack.

GridCell

Manages the creation/destruction of a plane-cutting grid to have a better understanding of the height of devices.

ActivateGridOnTouch

Class attached to Uhelpers that calls the GridCell class with the right arguments(height).

XR prefabs

All prefabs and non-script XR objects are stored in Prefabs/XR.