#include <polyhedral_editor_panel.h>


Public Member Functions | |
| PolyhedralEditorPanel (Rom *rom=nullptr) | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| int | GetPriority () const override |
| Get display priority for menu ordering. | |
| void | SetRom (Rom *rom) |
| absl::Status | Load () |
| void | Draw (bool *p_open) override |
| Draw the polyhedral editor UI (EditorPanel interface) | |
| absl::Status | Update () |
| Legacy Update method for backward compatibility. | |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual PanelCategory | GetPanelCategory () const |
| Get the lifecycle category for this panel. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
Private Types | |
| enum class | PlotPlane { kXY , kXZ , kYZ } |
Private Member Functions | |
| absl::Status | LoadShapes () |
| absl::Status | SaveShapes () |
| absl::Status | WriteShape (const PolyShape &shape) |
| void | DrawShapeEditor (PolyShape &shape) |
| void | DrawVertexList (PolyShape &shape) |
| void | DrawFaceList (PolyShape &shape) |
| void | DrawPlot (const char *label, PlotPlane plane, PolyShape &shape) |
| void | DrawPreview (PolyShape &shape) |
| uint32_t | TablePc () const |
Private Attributes | |
| Rom * | rom_ = nullptr |
| bool | data_loaded_ = false |
| bool | dirty_ = false |
| int | selected_shape_ = 0 |
| int | selected_vertex_ = 0 |
| std::vector< PolyShape > | shapes_ |
Definition at line 36 of file polyhedral_editor_panel.h.
|
strongprivate |
| Enumerator | |
|---|---|
| kXY | |
| kXZ | |
| kYZ | |
Definition at line 72 of file polyhedral_editor_panel.h.
|
inlineexplicit |
Definition at line 38 of file polyhedral_editor_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::EditorPanel.
Definition at line 44 of file polyhedral_editor_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::EditorPanel.
Definition at line 45 of file polyhedral_editor_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 46 of file polyhedral_editor_panel.h.
References ICON_MD_VIEW_IN_AR.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 47 of file polyhedral_editor_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::EditorPanel.
Definition at line 48 of file polyhedral_editor_panel.h.
|
inline |
Definition at line 54 of file polyhedral_editor_panel.h.
References data_loaded_, and rom_.
| absl::Status yaze::editor::PolyhedralEditorPanel::Load | ( | ) |
Definition at line 57 of file polyhedral_editor_panel.cc.
References dirty_, LoadShapes(), and RETURN_IF_ERROR.

|
overridevirtual |
Draw the polyhedral editor UI (EditorPanel interface)
Implements yaze::editor::EditorPanel.
Definition at line 169 of file polyhedral_editor_panel.cc.
References data_loaded_, dirty_, DrawShapeEditor(), yaze::gui::plotting::EnsureImPlotContext(), ICON_MD_REFRESH, ICON_MD_SAVE, yaze::Rom::is_loaded(), LoadShapes(), rom_, SaveShapes(), selected_shape_, selected_vertex_, shapes_, and TablePc().
| absl::Status yaze::editor::PolyhedralEditorPanel::Update | ( | ) |
Legacy Update method for backward compatibility.
Definition at line 235 of file polyhedral_editor_panel.cc.
References data_loaded_, dirty_, DrawShapeEditor(), yaze::gui::plotting::EnsureImPlotContext(), ICON_MD_REFRESH, ICON_MD_SAVE, yaze::Rom::is_loaded(), LoadShapes(), RETURN_IF_ERROR, rom_, SaveShapes(), selected_shape_, selected_vertex_, shapes_, and TablePc().
|
private |
Definition at line 63 of file polyhedral_editor_panel.cc.
References ASSIGN_OR_RETURN, data_loaded_, yaze::editor::PolyShape::face_count, yaze::editor::PolyShape::face_ptr, yaze::editor::PolyShape::faces, yaze::Rom::is_loaded(), yaze::editor::PolyShape::name, yaze::Rom::ReadByte(), yaze::Rom::ReadByteVector(), rom_, selected_shape_, selected_vertex_, yaze::editor::PolyFace::shade, shapes_, TablePc(), yaze::editor::PolyShape::vertex_count, yaze::editor::PolyFace::vertex_indices, yaze::editor::PolyShape::vertex_ptr, yaze::editor::PolyShape::vertices, yaze::editor::PolyVertex::x, yaze::editor::PolyVertex::y, and yaze::editor::PolyVertex::z.
Referenced by Draw(), Load(), and Update().

|
private |
Definition at line 133 of file polyhedral_editor_panel.cc.
References dirty_, RETURN_IF_ERROR, shapes_, and WriteShape().
Referenced by Draw(), and Update().

|
private |
Definition at line 143 of file polyhedral_editor_panel.cc.
References yaze::editor::PolyShape::face_ptr, yaze::editor::PolyShape::faces, RETURN_IF_ERROR, rom_, yaze::editor::PolyShape::vertex_ptr, yaze::editor::PolyShape::vertices, and yaze::Rom::WriteVector().
Referenced by SaveShapes().

|
private |
Definition at line 288 of file polyhedral_editor_panel.cc.
References DrawFaceList(), DrawPlot(), DrawPreview(), DrawVertexList(), yaze::editor::PolyShape::face_count, yaze::editor::PolyShape::face_ptr, kXY, kXZ, yaze::editor::PolyShape::vertex_count, and yaze::editor::PolyShape::vertex_ptr.
Referenced by Draw(), and Update().

|
private |
Definition at line 317 of file polyhedral_editor_panel.cc.
References dirty_, selected_vertex_, and yaze::editor::PolyShape::vertices.
Referenced by DrawShapeEditor().
|
private |
Definition at line 345 of file polyhedral_editor_panel.cc.
References dirty_, yaze::editor::PolyShape::faces, and yaze::editor::PolyShape::vertices.
Referenced by DrawShapeEditor().
|
private |
Definition at line 383 of file polyhedral_editor_panel.cc.
References dirty_, kXY, kXZ, kYZ, selected_vertex_, and yaze::editor::PolyShape::vertices.
Referenced by DrawShapeEditor().
|
private |
Definition at line 452 of file polyhedral_editor_panel.cc.
References yaze::editor::PolyShape::faces, and yaze::editor::PolyShape::vertices.
Referenced by DrawShapeEditor().
|
private |
Definition at line 53 of file polyhedral_editor_panel.cc.
References yaze::SnesToPc().
Referenced by Draw(), LoadShapes(), and Update().

|
private |
Definition at line 85 of file polyhedral_editor_panel.h.
Referenced by Draw(), LoadShapes(), SetRom(), Update(), and WriteShape().
|
private |
Definition at line 86 of file polyhedral_editor_panel.h.
Referenced by Draw(), LoadShapes(), SetRom(), and Update().
|
private |
Definition at line 87 of file polyhedral_editor_panel.h.
Referenced by Draw(), DrawFaceList(), DrawPlot(), DrawVertexList(), Load(), SaveShapes(), and Update().
|
private |
Definition at line 88 of file polyhedral_editor_panel.h.
Referenced by Draw(), LoadShapes(), and Update().
|
private |
Definition at line 89 of file polyhedral_editor_panel.h.
Referenced by Draw(), DrawPlot(), DrawVertexList(), LoadShapes(), and Update().
|
private |
Definition at line 91 of file polyhedral_editor_panel.h.
Referenced by Draw(), LoadShapes(), SaveShapes(), and Update().