Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
HierarchicalDesignerObject.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <SDL/sdl_interface.h>
6#include <Utility/utility.h>
7
8#include <vector>
9
10namespace ph::editor
11{
12
14{
15public:
17
18 math::TDecomposedTransform<real> getLocalToParent() const override = 0;
19 void setLocalToParent(const math::TDecomposedTransform<real>& transform) override = 0;
20
21 TSpanView<DesignerObject*> getChildren() const override;
22 bool canHaveChildren() const override;
23
24protected:
26
27private:
28 DesignerObject* addChild(DesignerObject* childObj) override;
29 bool removeChild(DesignerObject* childObj) override;
30
31private:
32 std::vector<DesignerObject*> m_children;
33
34public:
35 PH_DEFINE_SDL_CLASS(TSdlOwnerClass<HierarchicalDesignerObject>)
36 {
37 ClassType clazz("hierarchical-dobj");
38 clazz.docName("Hierarchical Designer Object");
39 clazz.description("A designer object that allow children.");
40 clazz.baseOn<DesignerObject>();
41 return clazz;
42 }
43};
44
45}// end namespace ph::editor
46
Definition DesignerObject.h:31
Definition HierarchicalDesignerObject.h:14
bool canHaveChildren() const override
Definition HierarchicalDesignerObject.cpp:15
math::TDecomposedTransform< real > getLocalToParent() const override=0
void setLocalToParent(const math::TDecomposedTransform< real > &transform) override=0
TSpanView< DesignerObject * > getChildren() const override
Definition HierarchicalDesignerObject.cpp:10
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< HierarchicalDesignerObject >)
Definition HierarchicalDesignerObject.h:35
PH_DECLARE_RULE_OF_5_MEMBERS_NO_DTOR(HierarchicalDesignerObject)
Definition ph_editor.h:10