Hymn to Beauty
C++ 3D Engine
BoxShapeEditor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "IShapeEditor.hpp"
4
5namespace Component {
6class Shape;
7}
8
9namespace GUI {
12 public:
14 BoxShapeEditor() = default;
15
16 const char* Label() const override {
17 return "Box";
18 }
19 void Show(Component::Shape* comp) override;
20 void Apply(Component::Shape* comp) override;
21 bool SetFromShape(const Physics::Shape& shape) override;
22
23 private:
24 float width = 1.0f;
25 float height = 1.0f;
26 float depth = 1.0f;
27};
28} // namespace GUI
Definition: Shape.hpp:15
Box shape editor for physics components.
Definition: BoxShapeEditor.hpp:11
bool SetFromShape(const Physics::Shape &shape) override
Definition: BoxShapeEditor.cpp:41
void Show(Component::Shape *comp) override
Displays the editor.
Definition: BoxShapeEditor.cpp:10
BoxShapeEditor()=default
Constructor.
void Apply(Component::Shape *comp) override
Set the shape of a shape component.
Definition: BoxShapeEditor.cpp:37
const char * Label() const override
Definition: BoxShapeEditor.hpp:16
Interface to editors of physics shapes.
Definition: IShapeEditor.hpp:14
Definition: Shape.hpp:18
Definition: BoxShapeEditor.hpp:5
Definition: AssetEditor.hpp:9