![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <EntityPrefabGraphDocument.h>
Collaboration diagram for Olympe::EntityPrefabGraphDocument:Static Public Member Functions | |
| static EntityPrefabGraphDocument | FromJson (const json &data) |
Private Member Functions | |
| NodeId | GenerateNodeId () |
| std::vector< LayoutNode > | CalculateLayout () |
Private Attributes | |
| std::vector< ComponentNode > | m_nodes |
| std::vector< NodeId > | m_selectedNodes |
| std::vector< std::pair< NodeId, NodeId > > | m_connections |
| std::string | m_documentName |
| Vector | m_canvasOffset |
| float | m_canvasZoom = 1.0f |
| NodeId | m_nextNodeId = 1 |
| bool | m_isDirty = false |
| std::map< std::string, std::map< std::string, std::string > > | m_parameterSchemas |
Definition at line 22 of file EntityPrefabGraphDocument.h.
| Olympe::EntityPrefabGraphDocument::EntityPrefabGraphDocument | ( | ) |
Definition at line 8 of file EntityPrefabGraphDocument.cpp.
Referenced by FromJson().
Here is the caller graph for this function:| Olympe::EntityPrefabGraphDocument::~EntityPrefabGraphDocument | ( | ) |
Definition at line 9 of file EntityPrefabGraphDocument.cpp.
| void Olympe::EntityPrefabGraphDocument::ArrangeNodesInGrid | ( | int | gridWidth = 4, |
| float | spacing = 200.0f |
||
| ) |
Definition at line 77 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_nodes.
Referenced by LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::EntityPrefabGraphDocument::AutoLayout | ( | ) |
Definition at line 75 of file EntityPrefabGraphDocument.cpp.
|
private |
Definition at line 598 of file EntityPrefabGraphDocument.cpp.
| void Olympe::EntityPrefabGraphDocument::CenterViewport | ( | ) |
Definition at line 90 of file EntityPrefabGraphDocument.cpp.
| void Olympe::EntityPrefabGraphDocument::Clear | ( | ) |
Definition at line 496 of file EntityPrefabGraphDocument.cpp.
References m_connections, m_isDirty, m_nextNodeId, m_nodes, and m_selectedNodes.
Referenced by LoadFromFile().
Here is the caller graph for this function:Definition at line 92 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), m_connections, m_isDirty, and ValidateConnection().
Referenced by Olympe::PrefabCanvas::CompleteConnection(), and LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 11 of file EntityPrefabGraphDocument.cpp.
References CreateComponentNode().
Referenced by Olympe::PrefabCanvas::AcceptComponentDropAtScreenPos(), Olympe::PrefabCanvas::AddComponentNode(), CreateComponentNode(), and LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:| NodeId Olympe::EntityPrefabGraphDocument::CreateComponentNode | ( | const std::string & | componentType, |
| const std::string & | componentName | ||
| ) |
Definition at line 14 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), InitializeNodeProperties(), m_isDirty, m_nextNodeId, and m_nodes.
Here is the call graph for this function:| void Olympe::EntityPrefabGraphDocument::DeselectAll | ( | ) |
Definition at line 63 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), GetNode(), and m_selectedNodes.
Referenced by Olympe::PrefabCanvas::ClearSelection(), Olympe::PrefabCanvas::DeleteSelectedNodes(), Olympe::PrefabCanvas::OnMouseDown(), Olympe::PrefabCanvas::RenderContextMenu(), Olympe::PrefabCanvas::SelectAll(), Olympe::PrefabCanvas::SelectNodeAt(), and Olympe::PrefabCanvas::SelectNodesInRectangle().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 55 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), GetNode(), and m_selectedNodes.
Referenced by Olympe::PrefabCanvas::OnMouseDown().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 104 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), m_connections, and m_isDirty.
Referenced by Olympe::PrefabCanvas::RenderConnectionContextMenu().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 149 of file EntityPrefabGraphDocument.cpp.
References EntityPrefabGraphDocument(), and GetComponentTypeID_Static().
Here is the call graph for this function:
|
private |
| const std::vector< ComponentNode > & Olympe::EntityPrefabGraphDocument::GetAllNodes | ( | ) | const |
Definition at line 44 of file EntityPrefabGraphDocument.cpp.
References m_nodes.
Referenced by Olympe::PrefabCanvas::GetNodeAtPosition(), Olympe::PrefabCanvas::OnMouseDown(), Olympe::PrefabCanvas::OnMouseUp(), Olympe::PrefabCanvas::Render(), Olympe::PrefabCanvas::RenderContextMenu(), Olympe::PrefabCanvas::SelectAll(), and Olympe::PrefabCanvas::SelectNodesInRectangle().
Here is the caller graph for this function:| Vector Olympe::EntityPrefabGraphDocument::GetCanvasOffset | ( | ) | const |
Definition at line 490 of file EntityPrefabGraphDocument.cpp.
References m_canvasOffset.
| float Olympe::EntityPrefabGraphDocument::GetCanvasZoom | ( | ) | const |
Definition at line 493 of file EntityPrefabGraphDocument.cpp.
References m_canvasZoom.
| const std::vector< std::pair< NodeId, NodeId > > & Olympe::EntityPrefabGraphDocument::GetConnections | ( | ) | const |
Definition at line 111 of file EntityPrefabGraphDocument.cpp.
References m_connections.
Referenced by Olympe::PrefabCanvas::OnMouseMove(), Olympe::PrefabCanvas::RenderConnectionContextMenu(), and Olympe::PrefabCanvas::RenderContextMenu().
Here is the caller graph for this function:| std::string Olympe::EntityPrefabGraphDocument::GetDocumentName | ( | ) | const |
Definition at line 488 of file EntityPrefabGraphDocument.cpp.
References m_documentName.
| ComponentNode * Olympe::EntityPrefabGraphDocument::GetNode | ( | NodeId | nodeId | ) |
Definition at line 38 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_nodes.
Referenced by Olympe::PrefabCanvas::AcceptComponentDropAtScreenPos(), Olympe::PrefabCanvas::AddComponentNode(), DeselectAll(), DeselectNode(), Olympe::PrefabCanvas::HandleNodeDrag(), Olympe::PrefabCanvas::HandleNodeDragStart(), LoadFromFile(), Olympe::PrefabCanvas::OnMouseMove(), Olympe::PrefabCanvas::RenderConnectionPreview(), Olympe::PrefabCanvas::RenderContextMenu(), Olympe::PropertyEditorPanel::RenderNodeInfo(), Olympe::PropertyEditorPanel::RenderNodeProperties(), and SelectNode().
Here is the call graph for this function:
Here is the caller graph for this function:| const ComponentNode * Olympe::EntityPrefabGraphDocument::GetNode | ( | NodeId | nodeId | ) | const |
Definition at line 41 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_nodes.
Here is the call graph for this function:| size_t Olympe::EntityPrefabGraphDocument::GetNodeCount | ( | ) | const |
Definition at line 497 of file EntityPrefabGraphDocument.cpp.
References m_nodes.
Referenced by Olympe::PrefabCanvas::RenderContextMenu(), and Olympe::PrefabCanvas::RenderDebugInfo().
Here is the caller graph for this function:| NodeId Olympe::EntityPrefabGraphDocument::GetSelectedNode | ( | ) | const |
Definition at line 70 of file EntityPrefabGraphDocument.cpp.
References Olympe::InvalidNodeId, and m_selectedNodes.
Definition at line 73 of file EntityPrefabGraphDocument.cpp.
References m_selectedNodes.
Referenced by Olympe::PrefabCanvas::DeleteSelectedNodes(), Olympe::PrefabCanvas::HandleNodeDrag(), Olympe::PrefabCanvas::OnMouseDown(), and Olympe::EntityPrefabRenderer::RenderRightPanelTabs().
Here is the caller graph for this function:Definition at line 136 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_connections.
Referenced by ValidateConnection().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 35 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_nodes.
Referenced by ValidateConnection().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::EntityPrefabGraphDocument::InitializeNodeProperties | ( | ComponentNode & | node | ) |
Definition at line 585 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_parameterSchemas.
Referenced by CreateComponentNode().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Olympe::EntityPrefabGraphDocument::IsDirty | ( | ) | const |
Definition at line 499 of file EntityPrefabGraphDocument.cpp.
References m_isDirty.
Referenced by Olympe::EntityPrefabRenderer::IsDirty().
Here is the caller graph for this function:Definition at line 151 of file EntityPrefabGraphDocument.cpp.
References ArrangeNodesInGrid(), Clear(), ConnectNodes(), CreateComponentNode(), GetComponentTypeID_Static(), GetNode(), Olympe::InvalidNodeId, Olympe::PrefabLoader::LoadJsonFromFile(), LoadParameterSchemas(), m_isDirty, m_nodes, m_parameterSchemas, SetCanvasOffset(), SetCanvasZoom(), SYSTEM_LOG, and Olympe::Vector.
Here is the call graph for this function:Definition at line 502 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), m_parameterSchemas, and SYSTEM_LOG.
Referenced by LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 29 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), m_isDirty, and m_nodes.
Referenced by Olympe::PrefabCanvas::DeleteSelectedNodes(), and Olympe::PrefabCanvas::RenderContextMenu().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 387 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), m_canvasOffset, m_canvasZoom, m_connections, m_isDirty, m_nodes, Olympe::PrefabLoader::SaveJsonToFile(), SYSTEM_LOG, Vector::x, and Vector::y.
Here is the call graph for this function:Definition at line 46 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), GetNode(), and m_selectedNodes.
Referenced by Olympe::PrefabCanvas::HandleNodeDragStart(), Olympe::PrefabCanvas::RenderContextMenu(), Olympe::PrefabCanvas::SelectAll(), Olympe::PrefabCanvas::SelectNodeAt(), and Olympe::PrefabCanvas::SelectNodesInRectangle().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 491 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_canvasOffset.
Referenced by LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 494 of file EntityPrefabGraphDocument.cpp.
References m_canvasZoom.
Referenced by LoadFromFile().
Here is the caller graph for this function:Definition at line 500 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), and m_isDirty.
Referenced by Olympe::PropertyEditorPanel::ApplyChanges(), and Olympe::PrefabCanvas::RenderConnectionContextMenu().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 487 of file EntityPrefabGraphDocument.cpp.
References m_documentName.
| json Olympe::EntityPrefabGraphDocument::ToJson | ( | ) | const |
Definition at line 148 of file EntityPrefabGraphDocument.cpp.
| bool Olympe::EntityPrefabGraphDocument::ValidateConnection | ( | NodeId | sourceId, |
| NodeId | targetId | ||
| ) | const |
Definition at line 113 of file EntityPrefabGraphDocument.cpp.
References GetComponentTypeID_Static(), HasConnection(), and HasNode().
Referenced by ConnectNodes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 94 of file EntityPrefabGraphDocument.h.
Referenced by GetCanvasOffset(), SaveToFile(), and SetCanvasOffset().
|
private |
Definition at line 95 of file EntityPrefabGraphDocument.h.
Referenced by GetCanvasZoom(), SaveToFile(), and SetCanvasZoom().
Definition at line 92 of file EntityPrefabGraphDocument.h.
Referenced by Clear(), ConnectNodes(), DisconnectNodes(), GetConnections(), HasConnection(), and SaveToFile().
|
private |
Definition at line 93 of file EntityPrefabGraphDocument.h.
Referenced by GetDocumentName(), and SetDocumentName().
Definition at line 97 of file EntityPrefabGraphDocument.h.
Referenced by Clear(), ConnectNodes(), CreateComponentNode(), DisconnectNodes(), IsDirty(), LoadFromFile(), RemoveNode(), SaveToFile(), and SetDirty().
|
private |
Definition at line 96 of file EntityPrefabGraphDocument.h.
Referenced by Clear(), and CreateComponentNode().
|
private |
Definition at line 90 of file EntityPrefabGraphDocument.h.
Referenced by ArrangeNodesInGrid(), Clear(), CreateComponentNode(), GetAllNodes(), GetNode(), GetNode(), GetNodeCount(), HasNode(), LoadFromFile(), RemoveNode(), and SaveToFile().
|
private |
Definition at line 100 of file EntityPrefabGraphDocument.h.
Referenced by InitializeNodeProperties(), LoadFromFile(), and LoadParameterSchemas().
|
private |
Definition at line 91 of file EntityPrefabGraphDocument.h.
Referenced by Clear(), DeselectAll(), DeselectNode(), GetSelectedNode(), GetSelectedNodes(), and SelectNode().