CSEngine
Loading...
Searching...
No Matches
MoreComponentFunc.cpp
1
//
2
// Created by ounols on 19. 8. 31.
3
//
4
5
#include "MoreComponentFunc.h"
6
#include "../Component/Animation/AnimatorComponent.h"
7
#include "../Component/CameraComponent.h"
8
#include "../Component/CustomComponent.h"
9
#include "../Component/LightComponent.h"
10
#include "../Component/RenderComponent.h"
11
#include "../Component/TransformComponent.h"
12
13
#define BIND_COMPONENT_MACRO(CLASSNAME) \
14
if(component_type == #CLASSNAME) { \
15
auto comp_r = static_cast<CLASSNAME*>(component); \
16
instance->set(name.c_str(), comp_r); \
17
return; \
18
}
19
20
using namespace
CSE;
21
22
void
MoreComponentFunc::BindComponentToSQInstance(
SComponent
* component, std::string name,
23
sqext::SQIClassInstance* instance) {
24
std::string component_type = component->GetClassType();
25
26
BIND_COMPONENT_MACRO(
AnimatorComponent
);
27
BIND_COMPONENT_MACRO(
JointComponent
);
28
BIND_COMPONENT_MACRO(
CameraComponent
);
29
BIND_COMPONENT_MACRO(
CustomComponent
);
30
BIND_COMPONENT_MACRO(
DrawableSkinnedMeshComponent
);
31
BIND_COMPONENT_MACRO(
DrawableStaticMeshComponent
);
32
BIND_COMPONENT_MACRO(
LightComponent
);
33
BIND_COMPONENT_MACRO(
RenderComponent
);
34
BIND_COMPONENT_MACRO(
TransformComponent
);
35
}
36
CSE::AnimatorComponent
Definition
AnimatorComponent.h:10
CSE::CameraComponent
Definition
CameraComponent.h:31
CSE::CustomComponent
Definition
CustomComponent.h:11
CSE::DrawableSkinnedMeshComponent
Definition
DrawableSkinnedMeshComponent.h:8
CSE::DrawableStaticMeshComponent
Definition
DrawableStaticMeshComponent.h:8
CSE::JointComponent
Definition
JointComponent.h:8
CSE::LightComponent
Definition
LightComponent.h:13
CSE::RenderComponent
Definition
RenderComponent.h:15
CSE::SComponent
Definition
SComponent.h:19
CSE::TransformComponent
Definition
TransformComponent.h:10
Util
MoreComponentFunc.cpp
Generated on Wed Oct 8 2025 01:09:56 for CSEngine by
1.12.0