00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asSkyBoxComponent.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../ScriptHelper.h"
00022 #include "asSceneComponent.h"
00023
00024 #include "../../../components/scene/SkyBoxComponent.h"
00025
00026
00028 SkyBoxComponent* createSkyBoxComponent(Entity *parent)
00029 {
00030 return new SkyBoxComponent(parent);
00031 }
00032
00034 SkyBoxComponent* createSkyBoxComponent(Entity *parent, const std::string &top,
00035 const std::string &bottom, const std::string &left,
00036 const std::string &right, const std::string &front,
00037 const std::string &back)
00038 {
00039 return new SkyBoxComponent(parent, top, bottom, left, right, front, back);
00040 }
00041
00043 void bindSkyBoxComponent(asIScriptEngine *engine)
00044 {
00045
00046 int r;
00047
00048
00049 r = engine->RegisterObjectType("SkyBoxComponent", sizeof(SkyBoxComponent), asOBJ_REF); assert(r >= 0);
00050
00051
00052 bindSceneComponentBase<SkyBoxComponent>(engine, "SkyBoxComponent");
00053
00054
00055 r = engine->RegisterObjectBehaviour("SkyBoxComponent", asBEHAVE_FACTORY, "SkyBoxComponent@ f(Entity @+)",
00056 asFUNCTIONPR(createSkyBoxComponent, (Entity*), SkyBoxComponent*), asCALL_CDECL);
00057 assert(r >= 0);
00058 r = engine->RegisterObjectBehaviour("SkyBoxComponent", asBEHAVE_FACTORY, "SkyBoxComponent@ f(Entity @+, " \
00059 "const string &in, const string &in, const string &in, const string &in, " \
00060 "const string &in, const string &in)",
00061 asFUNCTIONPR(createSkyBoxComponent, (Entity*, const std::string&,
00062 const std::string&, const std::string&, const std::string&, const std::string&,
00063 const std::string&), SkyBoxComponent*), asCALL_CDECL); assert(r >= 0);
00064
00065 r = engine->RegisterObjectMethod("SkyBoxComponent", "SkyBoxComponent& opAssign(const SkyBoxComponent &in)",
00066 asFUNCTION(assignT<SkyBoxComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00067
00068
00069 r = engine->RegisterObjectMethod("SkyBoxComponent", "void setTextures(const string &in, const string &in," \
00070 "const string &in, const string &in, const string &in, const string &in, bool)",
00071 asMETHODPR(SkyBoxComponent, setTextures, (const std::string&, const std::string&,
00072 const std::string&, const std::string&, const std::string&, const std::string&, bool),
00073 void), asCALL_THISCALL); assert(r >= 0);
00074 }
00075
00076 #endif // __COMPILE_WITH_ANGELSCRIPT__
00077
00078