![]() |
Dungeon Architect
17.0.0
|
A camera that manages the graph editor's viewport More...
Public Member Functions | |
| void | Pan (int x, int y) |
| Pan the camera along the specified delta value More... | |
| void | Pan (Vector2 delta) |
| Pan the camera along the specified delta value More... | |
| void | HandleInput (Event e) |
| Handles the user mouse and keyboard input More... | |
| Vector2 | WorldToScreen (Vector2 worldCoord) |
| Converts world coordinates (in the graph view) into Screen coordinates (relative to the editor window) More... | |
| Vector2 | ScreenToWorld (Vector2 screenCoord) |
| Converts the Screen coordinates (of the editor window) into the graph's world coordinate More... | |
| Rect | WorldToScreen (Rect worldCoord) |
| Converts world coordinates (in the graph view) into Screen coordinates (relative to the editor window) More... | |
| Rect | ScreenToWorld (Rect screenCoord) |
| Converts the Screen coordinates (of the editor window) into the graph's world coordinate More... | |
| void | FocusOnBestFit (Graph graph, Rect editorBounds) |
| Moves the camera so most of the nodes are visible More... | |
| void | FocusOnNode (GraphNode node, Rect editorBounds) |
| Moves the camera to the specified node More... | |
Public Attributes | |
| Vector2 | ScreenOffset = Vector2.zero |
Properties | |
| float | MaxAllowedZoom [get, set] |
| Vector2 | Position [get, set] |
| Position of the camera More... | |
| float | ZoomLevel [get, set] |
| Zoom scale of the graph camera More... | |
A camera that manages the graph editor's viewport
Definition at line 12 of file GraphCamera.cs.
| void DungeonArchitect.Graphs.GraphCamera.FocusOnBestFit | ( | Graph | graph, |
| Rect | editorBounds | ||
| ) |
Moves the camera so most of the nodes are visible
| graph | The graph to query |
| editorBounds | The bounds of the editor window |
Definition at line 162 of file GraphCamera.cs.
| void DungeonArchitect.Graphs.GraphCamera.FocusOnNode | ( | GraphNode | node, |
| Rect | editorBounds | ||
| ) |
Moves the camera to the specified node
| node | The node to focus on |
| editorBounds | The bounds of the editor window |
Definition at line 189 of file GraphCamera.cs.
| void DungeonArchitect.Graphs.GraphCamera.HandleInput | ( | Event | e | ) |
Handles the user mouse and keyboard input
| e |
Definition at line 80 of file GraphCamera.cs.
| void DungeonArchitect.Graphs.GraphCamera.Pan | ( | int | x, |
| int | y | ||
| ) |
Pan the camera along the specified delta value
| x | Delta value to move along the X value |
| y | Delta value to move along the Y value |
Definition at line 62 of file GraphCamera.cs.
| void DungeonArchitect.Graphs.GraphCamera.Pan | ( | Vector2 | delta | ) |
Pan the camera along the specified delta value
| delta | The delta offset to move the camera to |
Definition at line 71 of file GraphCamera.cs.
| Rect DungeonArchitect.Graphs.GraphCamera.ScreenToWorld | ( | Rect | screenCoord | ) |
Converts the Screen coordinates (of the editor window) into the graph's world coordinate
| screenCoord |
Definition at line 147 of file GraphCamera.cs.
| Vector2 DungeonArchitect.Graphs.GraphCamera.ScreenToWorld | ( | Vector2 | screenCoord | ) |
Converts the Screen coordinates (of the editor window) into the graph's world coordinate
| screenCoord |
Definition at line 122 of file GraphCamera.cs.
| Rect DungeonArchitect.Graphs.GraphCamera.WorldToScreen | ( | Rect | worldCoord | ) |
Converts world coordinates (in the graph view) into Screen coordinates (relative to the editor window)
| worldCoord | The world cooridnates of the graph view |
Definition at line 134 of file GraphCamera.cs.
| Vector2 DungeonArchitect.Graphs.GraphCamera.WorldToScreen | ( | Vector2 | worldCoord | ) |
Converts world coordinates (in the graph view) into Screen coordinates (relative to the editor window)
| worldCoord | The world cooridnates of the graph view |
Definition at line 112 of file GraphCamera.cs.
|
getset |
Position of the camera
Definition at line 26 of file GraphCamera.cs.
|
getset |
Zoom scale of the graph camera
Definition at line 45 of file GraphCamera.cs.