Viewport manager class. This class is used to create, manage, and remove all viewports in the Editor.
More...
|
static ViewportWindowId | createViewportWindow (const char *name=nullptr) |
| Creates a new viewport window with the specified name. More...
|
|
static bool | removeViewportWindow (ViewportWindowId viewport_id) |
| Removes the viewport window with the specified ID. More...
|
|
static bool | showViewportWindow (ViewportWindowId viewport_id) |
| Shows the viewport window with the specified ID. More...
|
|
static bool | hideViewportWindow (ViewportWindowId viewport_id) |
| Hides the viewport window with the specified ID. More...
|
|
static int | getNumViewportWindows () |
| Returns the total number of existing viewport windows. More...
|
|
static ViewportWindowId | getViewportWindowId (int index) |
| Returns the ID of the viewport window by its index if it exists; otherwise, nullptr. More...
|
|
static ViewportWindowId | getLastHoveredViewportWindow () |
| Returns the ID of the last viewport window hovered by the mouse cursor. Can be used for implementation of Drag&Drop operations More...
|
|
static ViewportWindowId | getActiveViewportWindow () |
| Returns the ID of a viewport window that is currently active. More...
|
|
static const char * | getViewportWindowName (ViewportWindowId viewport_id) |
| Returns the name of the viewport window with the specified ID if it exists; otherwise, nullptr. More...
|
|
static ViewportWindowId | getViewportWindowId (const char *name) |
| Returns the ID of the viewport window with the specified name if it exists; otherwise nullptr. More...
|
|
static Unigine::PlayerPtr | getViewportWindowPlayer (ViewportWindowId viewport_id) |
| Returns the main player (camera) whose current view is rendered to the viewport window with the specified ID if it exists; otherwise, nullptr. More...
|
|
static void | setViewportWindowPlayer (ViewportWindowId viewport_id, const Unigine::PlayerPtr &player) |
| Sets a new main player (camera) whose current view is to be rendered to the viewport window with the specified ID. More...
|
|
static Unigine::ViewportPtr | getViewportWindowViewport (ViewportWindowId viewport_id) |
| Returns the Engine Viewport instance for the viewport window with the specified ID. More...
|
|
static Unigine::GuiPtr | getViewportWindowGui (ViewportWindowId viewport_id) |
| Returns the Gui instance for the viewport window with the specified ID. You can use it to add and manage your UI elements. More...
|
|
static int | getViewportWindowMouseX (ViewportWindowId viewport_id) |
| Returns the X coordinate of the mouse position relative to the viewport window with the specified ID. While the mouse cursor is within the window the coordinate is in the [0, getViewportWindowWidth() - 1] range, otherwise the value can be negative or greater than window width (depending on the mouse cursor position relative to the window). More...
|
|
static int | getViewportWindowMouseY (ViewportWindowId viewport_id) |
| Returns the Y coordinate of the mouse position relative to the viewport window with the specified ID. While the mouse cursor is within the window the coordinate is in the [0, getViewportWindowHeight() - 1] range, otherwise the value can be negative or greater than window height (depending on the mouse cursor position relative to the window). More...
|
|
static Unigine::Math::ivec2 | getViewportWindowMousePos (ViewportWindowId viewport_id) |
| Returns the coordinates of the mouse position relative to the viewport window with the specified ID. Coordinates are returned as a two-component vector (X, Y). While the mouse cursor is within the window the coordinates are within the following ranges: X - [0, getViewportWindowWidth() - 1]; Y - [0, getViewportWindowHeight() - 1]. Otherwise the values can be negative or greater than window height and width (depending on the mouse cursor position relative to the window). More...
|
|
static int | getViewportWindowWidth (ViewportWindowId viewport_id) |
| Returns the current width (in pixels) of the viewport window with the specified ID. More...
|
|
static int | getViewportWindowHeight (ViewportWindowId viewport_id) |
| Returns the current height (in pixels) of the viewport window with the specified ID. More...
|
|
static Unigine::Math::ivec2 | getViewportWindowSize (ViewportWindowId viewport_id) |
| Returns the current size of the viewport window with the specified ID. The value is returned as a two-component vector (Width, Height). More...
|
|
static void | setEnabledRectangleSelection (bool enable) |
| Sets a value indicating if rectangular selection for viewport windows is enabled. More...
|
|
static bool | isEnabledRectangleSelection () |
| Returns a value indicating if rectangular selection for viewport windows is enabled. More...
|
|
static void | focusOnNode (ViewportWindowId viewport_id, const Unigine::NodePtr &node) |
| Sets the camera focus for the viewport window with the specified ID on the specified node. More...
|
|
static void | focusOnNodeList (ViewportWindowId viewport_id, const Unigine::Vector< Unigine::NodePtr > &nodes) |
| Sets the camera focus for the viewport window with the specified ID on the specified nodes (the viewport will be adjusted to display all the specified nodes). More...
|
|
static void | focusOnSurface (ViewportWindowId viewport_id, const Unigine::ObjectPtr &object, int surface) |
| Sets the camera focus for the viewport window with the specified ID on the specified surface of the specified object (the viewport will be adjusted to display the specified surface). More...
|
|
static void | focusOnSurfaceList (ViewportWindowId viewport_id, const Unigine::ObjectPtr &object, const Unigine::Vector< int > &surfaces) |
| Sets the camera focus for the viewport window with the specified ID on the specified surfaces of the specified object (the viewport will be adjusted to display all the specified surfaces). More...
|
|
static void | focusOnCenter (ViewportWindowId viewport_id, const Unigine::Math::Vec3 ¢er, float radius) |
| Sets the camera focus for the viewport window with the specified ID on an imaginary sphere with the specified center point and radius. More...
|
|
static void | forceWireframeWarming () |
| Renders an effect of wireframe warming, a temporary wireframe fading in and out for the current selection (such effect can be seen when selecting a node or a group of nodes in the Editor). More...
|
|
static void | placeNode (const Unigine::NodePtr &node) |
| Activates placement mode for the specified node. The node is to be placed at the location within the viewport where the left mouse button is clicked. If the Esc key is pressed before clicking within the viewport the current node placement operation will be cancelled. This behavior can be observed in the Editor, when the user creates a node via the Create menu. This function will automatically create all necessary Undo Actions (for adding nodes to the world and for selecting them). More...
|
|
static void | placeNodeList (const Unigine::Vector< Unigine::NodePtr > &nodes) |
| Activates placement mode for the specified nodes. The nodes are to be placed at the location within the viewport where the left mouse button is clicked. If the Esc key is pressed before clicking within the viewport the current node placement operation will be cancelled. This behavior can be observed in the Editor, when the user creates a node via the Create menu. This function will automatically create all necessary Undo Actions (for adding nodes to the world and for selecting them). More...
|
|
Viewport manager class. This class is used to create, manage, and remove all viewports in the Editor.