# Camera

**UDiTH** offers three camera modes. After loading a new model, **UDiTH** starts in Orbit mode by default.

You can select another mode by clicking the <img src="./media/ButtonCameraMode.png" width="16" height="16"> **Select camera mode** icon in the top-left corner of the screen.

<table>
<tr><th>Mode</th><th></th><th>Hold left mouse button</th><th>Hold right mouse button</th><th>Mouse wheel</th><th>Keyboard</th></tr>
<tr><td>

<img src="./media/ButtonCameraMode.png" width="44" height="44">

</td><td>

Orbit mode

</td><td>

Rotate the camera around the centred object

</td><td>

Move the camera forwards or backwards

</td><td>

Move the camera towards or away from the mouse pointer

</td><td>

<strong>W, A, S, D</strong> or the arrow keys: move camera
<strong>Shift + W</strong>, <strong>Shift + S</strong>: raise or lower camera
<strong>Space</strong>: raise camera

</td></tr>
<tr><td>

<img src="./media/ButtonFlightMode.png" width="44" height="44">

</td><td>

Flight mode

</td><td>

Rotate the camera

</td><td>

Move the camera forwards or backwards

</td><td>

Move the camera towards or away from the mouse pointer

</td><td>

<strong>W, A, S, D</strong> or the arrow keys: move camera
<strong>Shift + W</strong>, <strong>Shift + S</strong>: raise or lower camera
<strong>Space</strong>: raise camera

</td></tr>
<tr><td>

<img src="./media/ButtonWalkMode.png" width="44" height="44">

</td><td>

Walk mode

</td><td>

Rotate the camera left or right, and move forwards or backwards

</td><td>

Two fingers: move the camera left or right, and up or down

</td><td>

Three fingers or press and hold the mouse wheel: rotate the camera

</td><td>

</td></tr>
</table>

<table>
<tr>
<td>

<img src="./media/ButtonBubbleView.png" width="44" height="44">

</td><td>

<strong>Toggle display of 360° panorama centres</strong>

A light background indicates that this option is active. Panorama locations then appear as red spheres in the model. To deactivate it, click the button again.

</td></tr>
<tr>
<td>

<img src="./media/ButtonOrthographicCamera.png" width="44" height="44">

</td><td>

<strong>Toggle orthographic camera mode</strong>

To deactivate this function, move the camera or click the button again.

</td>
</tr>
<tr><td>

<img src="./media/ButtonReset.png" width="44" height="44">

</td><td>

<strong>Reset view</strong>

Clicking this icon resets all options, such as camera type, position, highlighting, and more. Everything is restored to its default state.

</td></tr>
<tr><td>

<img src="./media/ButtonClippingPlane.png" width="44" height="44">

</td><td>

<strong>Set near/far clipping plane</strong>

Sets the distance from the camera at which objects are rendered. For example, if the far clipping plane is set to 100 metres, objects beyond that distance are not rendered.

</td></tr>
<tr><td>

<img src="./media/ButtonInspect.png" width="44" height="44">

</td><td>

<strong>Set camera position</strong> 
Places the camera at the specified position, facing the given target.

</td></tr>
<tr><td>

<img src="./media/ButtonGoToGPS.png" width="44" height="44">

</td><td>

<strong>Go to GPS position</strong> 
Places the camera at the specified GPS location. This function requires an active GPS device.

</td></tr>
<tr><td>

<img src="./media/ButtonFollowGPS.png" width="44" height="44">

</td><td>

<strong>Follow GPS position</strong>

This function follows the live GPS signal and requires an active GPS device.

</td></tr>
</table>

> Any comments and views will be lost unless they are saved in a configuration file.

<table>
<tr><th>Action</th><th>Alternative action</th><th><img src="./media/ButtonCameraMode.png" width="44" height="44"></th><th><img src="./media/ButtonFlightMode.png" width="44" height="44"></th><th><img src="./media/ButtonBubbleView.png" width="44" height="44"></th><th><img src="./media/ButtonWalkMode.png" width="44" height="44"></th><th>2D</th></tr>
<tr><td>

<img src="./media/MouseLeftClick.png" width="44">

</td><td>

Touch one-finger click

</td><td colspan="5">Select object

</td></tr>
<tr><td>

<img src="./media/MouseLeftDoubleClick.png" width="44">

</td><td>

Touch one-finger double-click

</td><td colspan="4">Jump to the closest panorama or markup

</td><td>

</td></tr>
<tr><td>

<img src="./media/MouseScrollWheelUp.png" width="44">

</td><td>

</td><td rowspan="2" colspan="5">Move forward/zoom in

</td></tr>
<tr><td>

<kbd>↑</kbd>

</td><td>

<kbd>W</kbd>

</td></tr>
<tr><td>

<img src="./media/MouseScrollWheelDown.png" width="44">

</td><td>

</td><td rowspan="2" colspan="5">Move backwards / zoom out</tr>
<tr><td>

<kbd>↓</kbd>

</td><td>

<kbd>S</kbd>

</td></tr>
<tr><td>

<kbd>Shift</kbd>-<kbd>↑</kbd>

</td><td>

<kbd>Shift</kbd>-<kbd>W</kbd>

</td><td colspan="4">Move up

</td><td>

</td></tr>
<tr><td>

<kbd>Shift</kbd>-<kbd>↓</kbd>

</td><td>

<kbd>Shift</kbd>-<kbd>S</kbd>

</td><td colspan="4">Move down

</td><td>

</td></tr>
<tr><td>

<kbd>←</kbd>

</td><td>

<kbd>A</kbd>

</td><td colspan="2">Move left

</td><td colspan="2">Rotate left

</td><td>

</td></tr>
<tr><td>

<kbd>→</kbd>

</td><td>

<kbd>D</kbd>

</td><td colspan="2">Move right

</td><td colspan="2">Rotate right

</td><td>

</td></tr>
<tr><td>

<img src="./media/MouseLeftMove.png" width="44">-↑

</td><td>

Swipe

</td><td>

Orbit up

</td><td colspan="2">Rotate up

</td><td>

Move forward

</td><td>

</td></tr>
<tr><td>

<img src="./media/MouseLeftMove.png" width="44">-↓

</td><td>

Swipe

</td><td>

Orbit down

</td><td colspan="2">Rotate down

</td><td>

Move backward

</td><td>

</td></tr>
<tr><td>

<img src="./media/MouseLeftMove.png" width="44">-←

</td><td>

Swipe

</td><td>

Orbit left

</td><td colspan="3">Rotate left

</td><td>

</td></tr>
<tr><td>

<img src="./media/MouseLeftMove.png" width="44">-→

</td><td>

Swipe

</td><td>

Orbit right

</td><td colspan="3">Rotate right

</td><td>

</td></tr>
<tr><td>

MMB-Press&Drag-↑

</td><td>

</td><td colspan="3">Pan/scroll up

</td><td>

Rotate up

</td><td>

</td></tr>
<tr><td>

MMB-Press&Drag-↓

</td><td>

</td><td colspan="3">Pan/scroll down

</td><td>

Rotate down

</td><td>

</td></tr>
<tr><td>

MMB-Press&Drag-←

</td><td>

</td><td colspan="3">Pan/scroll left

</td><td>

Rotate left

</td><td>

</td></tr>
<tr><td>

MMB-Press&Drag-→

</td><td>

</td><td colspan="3">Pan/scroll right

</td><td>

Rotate right

</td><td>

</td></tr>
</table>

### Pan Mode
<table>
<tr><td>

<img src="./media/ButtonPan.png" width="44" height="44">

</td><td>

<strong>Toggle Pan Mode</strong> activates the panning feature. Alternatively, you can hold down the middle mouse button, press and hold the mouse wheel, or press the left and right mouse buttons simultaneously. On mobile devices, simply swipe the screen with two fingers to pan.

</td></tr>
</table>

## 360° Panoramas

<table>
<tr><td>

<img src="./media/image222.png" width="270">

</td><td>

When you click one of the spheres, the camera moves to its centre and overlays the model with the panorama image captured at that position. While inside a panorama sphere, you can only rotate the camera. You can zoom in and out using the mouse wheel, or by pinching and spreading on mobile devices.

</td></tr>
</table>

The additional context menu contains the panorama options:

<table>
<tr><td Rowspan="3"><img src="./media/360PanoramaMenu.png" width="300">

</td>
<td>

You can select the most recently activated panoramas in chronological order from the drop-down list. Selecting one moves the view to that specific sphere.

</td></tr>
<tr><td>

The <strong>Opacity</strong> slider adjusts the transparency of the overlaid panorama image, allowing you to increase or decrease its visibility.

</td></tr>
<tr><td>

To exit panorama mode, click the <strong>Toggle display of 360° panorama centres</strong> button [<img src="./media/ButtonBubbleView.png" width="20" height="20">] again.

</td></tr>

</table>

> When you select a laser scan object, any visible panorama spheres from the clicked point are displayed in the attributes field within the additional context menu. Clicking one of them allows you to jump directly to that specific sphere.

## Minimap

<table>
<tr><td>

<img src="./media/SettingsToggleMiniMap.png" width="300">

</td>
<td>

Click the <strong>Settings</strong> button [<img src="./media/ButtonSettings.png" width="20" height="20">] on the left side of the screen to access the quick navigation controls in the lower-right corner of the screen, regardless of the camera mode. Scroll down to <strong>3D user interface</strong> and toggle <strong>Minimap</strong>.

</td></tr> 
</table>

<table>
<tr><td rowspan="3"><img src="./media/MiniMap.png" width="300">

</td>
<td>

You can then <strong>move</strong> the camera using the <em>left mouse button</em> and <strong>rotate</strong> it using the <em>right mouse button</em>, directing it precisely to a point on the map with a left or right click. The 90° angle shown indicates the camera's field of view.

</td></tr>
<tr><td>

You can <strong>zoom</strong> in and out using the <strong>magnifying glass</strong> icons.

</td></tr>
<tr><td>

You can use the <strong>bar</strong> on the right to change the camera's <strong>height</strong>. The lower half represents the total height of the model.

</td></tr>
</table>

## Common Views Cube

<table>
<tr><td>

<img src="./media/SettingsToggleCommonViewsCube.png" width="300">

</td>
<td>

Click the <strong>Settings</strong> button [<img src="./media/ButtonSettings.png" width="20" height="20">] on the left side of the screen to access the quick navigation controls in the lower-right corner of the screen, regardless of the camera mode. Scroll down to <strong>3D user interface</strong> and toggle <strong>Common views cube</strong>.

</td></tr> 
</table>

<table>
<tr><td rowspan="3"><img src="./media/IconViewCube.png" width="140" height="149">

</td><td>

The cube in the upper-right corner of the screen indicates direction: <strong>N</strong> - North, <strong>W</strong> - West, <strong>S</strong> - South, <strong>E</strong> - East, <strong>U</strong> - Up, <strong>D</strong> - Down.

</td><tr><td>

Clicking any face of the cube, or the small spheres connecting two or three faces, orients the camera to look directly at that face or corner. For example, clicking <strong>Up</strong> directs the camera to point straight down.

</td></tr>
<tr><td>

In the <strong>Settings</strong> menu, you can toggle the visibility of the cube, switch between compass and XYZ modes, and make other adjustments.

</td></tr></tr>
</table>

To customise the text on the cube faces, modify the model configuration file and add the following line to `defaultconfig.upv`:

```"CommonViewsCubeText": " S \| E \| N \| W \| U \| D "```

This displays the specified text on the faces of the cube.
