00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asParticleSysComponent.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../ScriptHelper.h"
00022 #include "asSceneComponent.h"
00023
00024 #include "../../../components/scene/ParticleSysComponent.h"
00025
00026
00028 ParticleSysComponent* createParticleSysComponent(Entity *parent, const vector3df &scale)
00029 {
00030 return new ParticleSysComponent(parent, scale);
00031 }
00032
00034 void bindParticleSysComponent(asIScriptEngine *engine)
00035 {
00036
00037 int r;
00038
00039
00040 r = engine->RegisterObjectType("ParticleSysComponent", sizeof(ParticleSysComponent), asOBJ_REF); assert(r >= 0);
00041
00042
00043 bindSceneComponentBase<ParticleSysComponent>(engine, "ParticleSysComponent");
00044
00045
00046 r = engine->RegisterObjectBehaviour("ParticleSysComponent", asBEHAVE_FACTORY, "ParticleSysComponent@ f(Entity @+, " \
00047 "const vector3df &in)", asFUNCTIONPR(createParticleSysComponent, (Entity*,
00048 const vector3df&), ParticleSysComponent*), asCALL_CDECL); assert(r >= 0);
00049
00050 r = engine->RegisterObjectMethod("ParticleSysComponent", "ParticleSysComponent& opAssign(const ParticleSysComponent &in)",
00051 asFUNCTION(assignT<ParticleSysComponent>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00052
00053
00054 r = engine->RegisterObjectMethod("ParticleSysComponent", "void addAttractionAffector(const vector3df &in, f32, " \
00055 "bool, bool, bool, bool)", asMETHOD(ParticleSysComponent, addAttractionAffector),
00056 asCALL_THISCALL); assert(r >= 0);
00057 r = engine->RegisterObjectMethod("ParticleSysComponent", "void addFadeOutParticleAffector(const SColor &in, u32)",
00058 asMETHOD(ParticleSysComponent, addFadeOutParticleAffector), asCALL_THISCALL); assert(r >= 0);
00059 r = engine->RegisterObjectMethod("ParticleSysComponent", "void addGravityAffector(const vector3df &in, u32)",
00060 asMETHOD(ParticleSysComponent, addGravityAffector), asCALL_THISCALL); assert(r >= 0);
00061 r = engine->RegisterObjectMethod("ParticleSysComponent", "void addRotationAffector(const vector3df &in, const vector3df &in)",
00062 asMETHOD(ParticleSysComponent, addRotationAffector), asCALL_THISCALL); assert(r >= 0);
00063 r = engine->RegisterObjectMethod("ParticleSysComponent", "void addScaleParticleAffector(const dimension2df &in)",
00064 asMETHOD(ParticleSysComponent, addScaleParticleAffector), asCALL_THISCALL); assert(r >= 0);
00065 r = engine->RegisterObjectMethod("ParticleSysComponent", "void removeAffectors()",
00066 asMETHOD(ParticleSysComponent, removeAffectors), asCALL_THISCALL); assert(r >= 0);
00067
00068 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setBoxEmitter(const aabbox3df &in, const vector3df &in, " \
00069 "u32, u32, const SColor &in, const SColor &in, u32, u32, s32, " \
00070 "const dimension2df &in, const dimension2df &in)",
00071 asMETHOD(ParticleSysComponent, setBoxEmitter), asCALL_THISCALL); assert(r >= 0);
00072 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setCylinderEmitter(const vector3df &in, f32, " \
00073 "const vector3df &in, f32, bool, const vector3df &in, u32, u32, " \
00074 "const SColor &in, const SColor &in, u32, u32, s32, const dimension2df &in, " \
00075 "const dimension2df &in)", asMETHOD(ParticleSysComponent, setCylinderEmitter),
00076 asCALL_THISCALL); assert(r >= 0);
00077 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setMeshEmitter(const string &in, bool, " \
00078 "const vector3df &in, f32, bool, u32, u32, const SColor &in, const SColor &in, " \
00079 "u32, u32, s32, const dimension2df &in, const dimension2df &in)",
00080 asMETHODPR(ParticleSysComponent, setMeshEmitter, (const std::string&, bool,
00081 const vector3df&, f32, bool, u32, u32, const SColor&, const SColor&, u32, u32, s32,
00082 const dimension2df&, const dimension2df&), void), asCALL_THISCALL); assert(r >= 0);
00083 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setPointEmitter(const vector3df &in, u32, u32, " \
00084 "const SColor &in, const SColor &in, u32, u32, s32, const dimension2df &in, " \
00085 "const dimension2df &in)", asMETHOD(ParticleSysComponent, setPointEmitter),
00086 asCALL_THISCALL); assert(r >= 0);
00087 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setRingEmitter(const vector3df &in, f32, f32, " \
00088 "const vector3df &in, u32, u32, const SColor &in, const SColor &in, " \
00089 "u32, u32, s32, const dimension2df &in, const dimension2df &in)",
00090 asMETHOD(ParticleSysComponent, setRingEmitter), asCALL_THISCALL); assert(r >= 0);
00091 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setSphereEmitter(const vector3df &in, f32, " \
00092 "const vector3df &in, u32, u32, const SColor &in, const SColor &in, " \
00093 "u32, u32, s32, const dimension2df &in, const dimension2df &in)",
00094 asMETHOD(ParticleSysComponent, setSphereEmitter), asCALL_THISCALL); assert(r >= 0);
00095
00096 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticlesAreGlobal()",
00097 asMETHOD(ParticleSysComponent, setParticlesAreGlobal), asCALL_THISCALL); assert(r >= 0);
00098 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticlesAreGlobal(bool)",
00099 asMETHOD(ParticleSysComponent, setParticlesAreGlobal), asCALL_THISCALL); assert(r >= 0);
00100 r = engine->RegisterObjectMethod("ParticleSysComponent", "void setParticleSize(const dimension2df &in)",
00101 asMETHOD(ParticleSysComponent, setParticleSize), asCALL_THISCALL); assert(r >= 0);
00102 }
00103
00104 #endif // __COMPILE_WITH_ANGELSCRIPT__
00105
00106