00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asSkyDomeComponent.h"
00018
00019
00020 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00021
00022 #include "../../ScriptHelper.h"
00023 #include "asSceneComponent.h"
00024
00025 #include "../../../components/scene/SkyDomeComponent.h"
00026
00027
00029 SkyDomeComponent* createSkyDomeComponent(Entity *parent)
00030 {
00031 return new SkyDomeComponent(parent);
00032 }
00033
00035 SkyDomeComponent* createSkyDomeComponent(Entity *parent, u32 hRes, u32 vRes, f32 texturePerc,
00036 f32 spherePerc, f32 radius)
00037 {
00038 return new SkyDomeComponent(parent, hRes, vRes, texturePerc, spherePerc, radius);
00039 }
00040
00042 SkyDomeComponent* createSkyDomeComponent(Entity *parent, const std::string &fileName,
00043 u32 hRes, u32 vRes, f32 texturePerc, f32 spherePerc,
00044 f32 radius)
00045 {
00046 return new SkyDomeComponent(parent, fileName, hRes, vRes, texturePerc, spherePerc, radius);
00047 }
00048
00050 void bindSkyDomeComponent(asIScriptEngine *engine)
00051 {
00052
00053 int r;
00054
00055
00056 r = engine->RegisterObjectType("SkyDomeComponent", sizeof(SkyDomeComponent), asOBJ_REF); assert(r >= 0);
00057
00058
00059 bindSceneComponentBase<SkyDomeComponent>(engine, "SkyDomeComponent");
00060
00061
00062 r = engine->RegisterObjectBehaviour("SkyDomeComponent", asBEHAVE_FACTORY, "SkyDomeComponent@ f(Entity @+)",
00063 asFUNCTIONPR(createSkyDomeComponent, (Entity*), SkyDomeComponent*),
00064 asCALL_CDECL); assert(r >= 0);
00065 r = engine->RegisterObjectBehaviour("SkyDomeComponent", asBEHAVE_FACTORY, "SkyDomeComponent@ f(Entity @+, " \
00066 "u32, u32, f32, f32, f32)",
00067 asFUNCTIONPR(createSkyDomeComponent, (Entity*, u32, u32, f32, f32, f32),
00068 SkyDomeComponent*), asCALL_CDECL); assert(r >= 0);
00069 r = engine->RegisterObjectBehaviour("SkyDomeComponent", asBEHAVE_FACTORY, "SkyDomeComponent@ f(Entity @+, " \
00070 "const string &in, u32, u32, f32, f32, f32)",
00071 asFUNCTIONPR(createSkyDomeComponent, (Entity*, const std::string&,
00072 u32, u32, f32, f32, f32), SkyDomeComponent*), asCALL_CDECL); assert(r >= 0);
00073
00074 r = engine->RegisterObjectMethod("SkyDomeComponent", "SkyDomeComponent& opAssign(const SkyDomeComponent &in)",
00075 asFUNCTION(assignT<SkyDomeComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00076 }
00077
00078 #endif // __COMPILE_WITH_ANGELSCRIPT__
00079
00080