00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __ASBILLBOARDCOMPONENT_H__
00017 #define __ASBILLBOARDCOMPONENT_H__
00018
00019
00020 #include "../../../dependencies.h"
00021
00022 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00023
00024 #include "asSceneComponent.h"
00025 #include "../../../components/scene/BillboardComponent.h"
00026
00027
00029 extern void bindBillboardComponent(asIScriptEngine *engine);
00030
00033 template<typename T>
00034 void bindBillboardComponentBase(asIScriptEngine *engine, const char *type)
00035 {
00036
00037 int r;
00038 std::string sType = type;
00039
00040
00041 bindSceneComponentBase<T>(engine, type);
00042
00043
00044 r = engine->RegisterObjectBehaviour("BillboardComponent", asBEHAVE_REF_CAST, std::string(sType + "@ f()").c_str(),
00045 asFUNCTION((asRefCast<BillboardComponent,T>)), asCALL_CDECL_OBJLAST); assert( r >= 0 );
00046 r = engine->RegisterObjectBehaviour(type, asBEHAVE_IMPLICIT_REF_CAST, std::string("BillboardComponent@ f()").c_str(),
00047 asFUNCTION((asRefCast<T,BillboardComponent>)), asCALL_CDECL_OBJLAST); assert( r >= 0 );
00048
00049
00050 r = engine->RegisterObjectMethod(type, "void getColor(SColor &out, SColor &out)",
00051 asMETHOD(T, getColor), asCALL_THISCALL); assert(r >= 0);
00052 r = engine->RegisterObjectMethod(type, "const dimension2df& getSize()",
00053 asMETHOD(T, getSize), asCALL_THISCALL); assert(r >= 0);
00054
00055 r = engine->RegisterObjectMethod(type, "void setColor(const SColor &in)",
00056 asMETHODPR(T, setColor, (const SColor&), void), asCALL_THISCALL); assert(r >= 0);
00057 r = engine->RegisterObjectMethod(type, "void setColor(const SColor &in, const SColor &in)",
00058 asMETHODPR(T, setColor, (const SColor&, const SColor&), void), asCALL_THISCALL); assert(r >= 0);
00059 r = engine->RegisterObjectMethod(type, "void setSize(const dimension2df &in)",
00060 asMETHOD(T, setSize), asCALL_THISCALL); assert(r >= 0);
00061 }
00062
00063 #endif //__COMPILE_WITH_ANGELSCRIPT__
00064
00065 #endif