NDEVR
API Documentation
ViewportLayout.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/ViewportLayoutTheme.h>
4#include <NDEVR/CameraAnimation.h>
5#include <NDEVR/TranslatedString.h>
6#include <NDEVR/AutoZoomFocus.h>
7#include <NDEVR/INIInterface.h>
8namespace NDEVR
9{
14 class NDEVR_DESIGN_API ViewportFormat final
15 {
16 public:
21
27
32
33 UUID camera_id = Constant<UUID>::Invalid;
37 fltp08 ortho_fov = Constant<fltp08>::Invalid;
39 bool is_user_camera = true;
40 bool is_ortho = false;
41 bool use_reference_size = true;
42 public:
48 bool operator==(const ViewportFormat& layout) const;
49
55 bool operator!=(const ViewportFormat& layout) const;
56 };
57
62 class NDEVR_DESIGN_API ViewportLayout final : public INIInterface
63 {
64 public:
69
75
81
87
93
99 bool operator==(const ViewportLayout& layout) const;
100
106 bool operator!=(const ViewportLayout& layout) const;
107
112 void getINI(INIFactory& factory) final override;
113
118 void finishReadingINI(INIFactory& factory) final override;
119 public:
125 };
126}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:107
INIInterface()
Constructs an INIInterface with no default INI file.
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
Vector< 2, Angle< fltp08 > > perspective_fov
The horizontal and vertical perspective field of view. Invalid uses the default.
fltp08 ortho_fov
The orthographic field of view. Invalid uses the default.
bool is_ortho
Whether the viewport uses orthographic projection instead of perspective.
bool operator!=(const ViewportFormat &layout) const
Checks inequality with another ViewportFormat.
bool use_reference_size
Whether the viewport should use a reference size for scaling.
UUID camera_id
The UUID of the assigned camera. Invalid indicates any camera may be used.
Buffer< CameraAnimation > viewport_animations
The list of camera animations applied to this viewport.
TranslatedString name
The user-facing display name for this viewport.
ViewportFormat(bool is_user_camera)
Constructs a ViewportFormat with the specified user camera flag.
ViewportFormat()
Constructs a default ViewportFormat.
bool is_user_camera
Whether this viewport uses a user-controlled camera rather than a fixed one.
AutoZoomFocus focus
The auto-zoom and focus settings for this viewport.
void autoSetName()
Automatically generates a display name for this viewport based on its current settings.
bool operator==(const ViewportFormat &layout) const
Checks equality with another ViewportFormat.
bool operator!=(const ViewportLayout &layout) const
Checks inequality with another ViewportLayout.
ViewportLayout()
Constructs a default ViewportLayout.
Buffer< ViewportFormat > floating_cameras
Cameras displayed in floating/detached windows.
bool operator==(const ViewportLayout &layout) const
Checks equality with another ViewportLayout.
void createDefaultOrthoAnimations(const TimeSpan &span)
Creates default orthographic camera animations for all cameras in this layout.
Buffer< ViewportFormat > hidden_cameras
Cameras that are part of the layout but currently hidden.
Buffer< ViewportFormat > cameras
The primary visible cameras in this layout.
void setViewportTheme(ViewportLayoutTheme new_theme)
Sets the viewport theme and reconfigures cameras to match the new theme.
void finishReadingINI(INIFactory &factory) final override
Called after INI reading is complete to perform any post-load setup.
uint04 themeCameraCount() const
Returns the number of cameras defined by the current theme.
void getINI(INIFactory &factory) final override
Serializes or deserializes this layout to/from an INI file.
UUID id
The unique identifier for this viewport layout.
ViewportLayoutTheme theme
The active layout theme controlling viewport arrangement.
ViewportLayout(ViewportLayoutTheme new_theme)
Constructs a ViewportLayout with the specified theme.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
ViewportLayoutTheme
The potential layouts of multiple viewports within the NDEVR engine.
Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects ...
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...