Viewport manager class. This class is used to create, manage, and remove all viewports in the Editor. Warning: this class is NOT THREAD-SAFE, you should call its methods FROM THE MAIN THREAD ONLY.
More...
|
static Unigine::Ptr< ViewportWindow > | createViewportWindow (const char *name) |
| Creates a new viewport window with the specified name. More...
|
|
static bool | removeViewportWindow (const char *name) |
| Removes the viewport window with the specified name. More...
|
|
static void | getViewports (Unigine::Vector< Unigine::Ptr< ViewportWindow >> &viewports) |
| Collects all existing viewport windows and puts them to the specified output vector. More...
|
|
static Unigine::Ptr< ViewportWindow > | getViewportWindow (const char *name) |
| Returns the viewport window with the specified name if it exists; otherwise nullptr. More...
|
|
static Unigine::Ptr< ViewportWindow > | getLastHoveredViewportWindow () |
| Returns the last viewport window hovered by the mouse cursor. Can be used for implementation of Drag&Drop operations More...
|
|
static Unigine::Ptr< ViewportWindow > | getActiveViewportWindow () |
| Returns the viewport window that is currently active. 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 | 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::Ptr< Unigine::Node > &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::Ptr< Unigine::Node >> &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...
|
|
static bool | isNodeTypeSelectable (Unigine::Node::TYPE node_type) |
| Returns a value indicating if selection is enabled for the specified node type. More...
|
|
Viewport manager class. This class is used to create, manage, and remove all viewports in the Editor. Warning: this class is NOT THREAD-SAFE, you should call its methods FROM THE MAIN THREAD ONLY.
◆ createViewportWindow()
static Unigine::Ptr<ViewportWindow> UnigineEditor::ViewportManager::createViewportWindow |
( |
const char * |
name | ) |
|
|
static |
Creates a new viewport window with the specified name.
- Parameters
-
name | Title of the viewport window. |
- Returns
- Created viewport.
◆ forceWireframeWarming()
static void UnigineEditor::ViewportManager::forceWireframeWarming |
( |
| ) |
|
|
static |
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).
◆ getActiveViewportWindow()
static Unigine::Ptr<ViewportWindow> UnigineEditor::ViewportManager::getActiveViewportWindow |
( |
| ) |
|
|
static |
Returns the viewport window that is currently active.
◆ getLastHoveredViewportWindow()
static Unigine::Ptr<ViewportWindow> UnigineEditor::ViewportManager::getLastHoveredViewportWindow |
( |
| ) |
|
|
static |
Returns the last viewport window hovered by the mouse cursor. Can be used for implementation of Drag&Drop operations
◆ getViewports()
static void UnigineEditor::ViewportManager::getViewports |
( |
Unigine::Vector< Unigine::Ptr< ViewportWindow >> & |
viewports | ) |
|
|
static |
Collects all existing viewport windows and puts them to the specified output vector.
- Parameters
-
viewports | Output vector to receive the list of viewport windows. |
◆ getViewportWindow()
static Unigine::Ptr<ViewportWindow> UnigineEditor::ViewportManager::getViewportWindow |
( |
const char * |
name | ) |
|
|
static |
Returns the viewport window with the specified name if it exists; otherwise nullptr.
- Parameters
-
name | Name of the viewport window. |
◆ isEnabledRectangleSelection()
static bool UnigineEditor::ViewportManager::isEnabledRectangleSelection |
( |
| ) |
|
|
static |
Returns a value indicating if rectangular selection for viewport windows is enabled.
- Returns
- true if rectangular selection for viewport windows is enabled; otherwise, false.
◆ isNodeTypeSelectable()
static bool UnigineEditor::ViewportManager::isNodeTypeSelectable |
( |
Unigine::Node::TYPE |
node_type | ) |
|
|
static |
Returns a value indicating if selection is enabled for the specified node type.
- Returns
- true if selection for specified node type is enabled; otherwise, false.
◆ placeNode()
static void UnigineEditor::ViewportManager::placeNode |
( |
const Unigine::Ptr< Unigine::Node > & |
node | ) |
|
|
static |
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).
- Parameters
-
node | The node to be placed at the point within the viewport clicked by the user. |
◆ placeNodeList()
static void UnigineEditor::ViewportManager::placeNodeList |
( |
const Unigine::Vector< Unigine::Ptr< Unigine::Node >> & |
nodes | ) |
|
|
static |
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).
- Parameters
-
nodes | Vector containing nodes to be placed at the point within the viewport clicked by the user. |
◆ removeViewportWindow()
static bool UnigineEditor::ViewportManager::removeViewportWindow |
( |
const char * |
name | ) |
|
|
static |
Removes the viewport window with the specified name.
- Parameters
-
name | Name of the viewport window to be removed. |
- Returns
- true if the viewport window with the specified name was successfully removed; otherwise, false.
◆ setEnabledRectangleSelection()
static void UnigineEditor::ViewportManager::setEnabledRectangleSelection |
( |
bool |
enable | ) |
|
|
static |
Sets a value indicating if rectangular selection for viewport windows is enabled.
- Parameters
-
enable | true to enable rectangular selection for viewport windows; false - to disable it. |