Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
GeneralImposter.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <SDL/sdl_interface.h>
7
8#include <string>
9
10namespace ph::editor
11{
12
14{
15public:
17
18 bool bindDescription(
19 const std::shared_ptr<ISdlResource>& descResource,
20 const std::string& descName) override;
21
22 void unbindDescription() override;
23
25 math::TDecomposedTransform<real> getLocalToParent() const override;
26 void setLocalToParent(const math::TDecomposedTransform<real>& transform) override;
27
28private:
29 // SDL-binded fields:
30 ObjectTransform m_imposterTransform;
31
32public:
33 PH_DEFINE_SDL_CLASS(TSdlOwnerClass<GeneralImposter>)
34 {
35 ClassType clazz("general-imposter");
36 clazz.docName("General Imposter");
37 clazz.description(
38 "An object that can represent any render description resource. This is a good fallback "
39 "if a more specific imposter type does not present.");
40 clazz.baseOn<ImposterObject>();
41
42 clazz.addStruct(&OwnerType::m_imposterTransform);
43
44 return clazz;
45 }
46};
47
48}// end namespace ph::editor
Definition GeneralImposter.h:14
bool bindDescription(const std::shared_ptr< ISdlResource > &descResource, const std::string &descName) override
Definition GeneralImposter.cpp:9
math::TDecomposedTransform< real > getLocalToParent() const override
Definition GeneralImposter.cpp:46
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< GeneralImposter >)
Definition GeneralImposter.h:33
void setLocalToParent(const math::TDecomposedTransform< real > &transform) override
Definition GeneralImposter.cpp:51
UIPropertyLayout layoutProperties() override
Create custom property layout.
Definition GeneralImposter.cpp:26
void unbindDescription() override
Definition GeneralImposter.cpp:21
Definition ImposterObject.h:17
Definition ObjectTransform.h:16
Definition UIPropertyLayout.h:17
Definition ph_editor.h:10