Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ImposterObject.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <SDL/sdl_interface.h>
6#include <Common/logging.h>
7
8#include <string>
9#include <memory>
10
11namespace ph::editor
12{
13
15
17{
18public:
19 virtual bool bindDescription(
20 const std::shared_ptr<ISdlResource>& descResource,
21 const std::string& descName);
22
23 virtual void unbindDescription();
24
25 const std::string& getDescriptionName() const;
26 ISdlResource* getDescription() const;
27
28private:
29 std::shared_ptr<ISdlResource> m_descResource;
30
31 // SDL-binded fields
32 std::string m_descName;
33
34public:
35 PH_DEFINE_SDL_CLASS(TSdlOwnerClass<ImposterObject>)
36 {
37 ClassType clazz("imposter");
38 clazz.docName("Imposter Object");
39 clazz.description(
40 "Base of all imporster objects. Imposters are designer objects representing some render "
41 "description resource.");
42 clazz.baseOn<FlatDesignerObject>();
43
44 TSdlString<OwnerType> descName("desc-name", &OwnerType::m_descName);
45 descName.description("Name of the render description resource this object is representing.");
46 clazz.addField(descName);
47
48 return clazz;
49 }
50};
51
52}// end namespace ph::editor
53
Definition FlatDesignerObject.h:12
Definition ImposterObject.h:17
virtual bool bindDescription(const std::shared_ptr< ISdlResource > &descResource, const std::string &descName)
Definition ImposterObject.cpp:10
ISdlResource * getDescription() const
Definition ImposterObject.ipp:13
virtual void unbindDescription()
Definition ImposterObject.cpp:26
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< ImposterObject >)
Definition ImposterObject.h:35
const std::string & getDescriptionName() const
Definition ImposterObject.ipp:8
Definition ph_editor.h:10
PH_DECLARE_LOG_GROUP(DesignerScene)