4 #include <editor/EditorGlobal.h> 6 #include <UniginePlayers.h> 7 #include <UnigineGui.h> 8 #include <UnigineViewport.h> 9 #include <UnigineVector.h> 10 #include <UnigineNode.h> 11 #include <UnigineObjects.h> 17 struct ViewportWindow;
18 using ViewportWindowId = ViewportWindow *;
31 static ViewportWindowId createViewportWindow(
const char *name =
nullptr);
35 static bool removeViewportWindow(ViewportWindowId viewport_id);
39 static bool showViewportWindow(ViewportWindowId viewport_id);
43 static bool hideViewportWindow(ViewportWindowId viewport_id);
46 static int getNumViewportWindows();
49 static ViewportWindowId getViewportWindowId(
int index);
52 static ViewportWindowId getLastHoveredViewportWindow();
54 static ViewportWindowId getActiveViewportWindow();
58 static const char *getViewportWindowName(ViewportWindowId viewport_id);
61 static ViewportWindowId getViewportWindowId(
const char *name);
65 static Unigine::PlayerPtr getViewportWindowPlayer(ViewportWindowId viewport_id);
69 static void setViewportWindowPlayer(ViewportWindowId viewport_id,
const Unigine::PlayerPtr &player);
73 static Unigine::ViewportPtr getViewportWindowViewport(ViewportWindowId viewport_id);
76 static Unigine::GuiPtr getViewportWindowGui(ViewportWindowId viewport_id);
80 static int getViewportWindowMouseX(ViewportWindowId viewport_id);
83 static int getViewportWindowMouseY(ViewportWindowId viewport_id);
86 static Unigine::Math::ivec2 getViewportWindowMousePos(ViewportWindowId viewport_id);
90 static int getViewportWindowWidth(ViewportWindowId viewport_id);
93 static int getViewportWindowHeight(ViewportWindowId viewport_id);
96 static Unigine::Math::ivec2 getViewportWindowSize(ViewportWindowId viewport_id);
100 static void setEnabledRectangleSelection(
bool enable);
103 static bool isEnabledRectangleSelection();
108 static void focusOnNode(ViewportWindowId viewport_id,
const Unigine::NodePtr &node);
112 static void focusOnNodeList(ViewportWindowId viewport_id,
113 const Unigine::Vector<Unigine::NodePtr> &nodes);
118 static void focusOnSurface(ViewportWindowId viewport_id,
const Unigine::ObjectPtr &
object,
124 static void focusOnSurfaceList(ViewportWindowId viewport_id,
const Unigine::ObjectPtr &
object,
125 const Unigine::Vector<int> &surfaces);
130 static void focusOnCenter(ViewportWindowId viewport_id,
const Unigine::Math::Vec3 ¢er,
134 static void forceWireframeWarming();
138 static void placeNode(
const Unigine::NodePtr &node);
141 static void placeNodeList(
const Unigine::Vector<Unigine::NodePtr> &nodes);
Viewport manager class. This class is used to create, manage, and remove all viewports in the Editor.
Definition: ViewportManager.h:25