From 82eccb9e28d2c908fcdb60b07c3428db21b7a28b Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sun, 1 May 2011 11:12:54 +0900 Subject: [PATCH] add luabinding --- lua/lmeshio.pkg | 390 ++ lua/lmeshio_bind.cpp | 11345 ++++++++++++++++++++++++++++++++++++++++++++++ lua/lmeshio_bind.h | 8 + lua/lmeshio_static.make | 140 + lua/premake4.lua | 67 + lua/tolua.make | 11 + 6 files changed, 11961 insertions(+) create mode 100755 lua/lmeshio.pkg create mode 100755 lua/lmeshio_bind.cpp create mode 100755 lua/lmeshio_bind.h create mode 100755 lua/lmeshio_static.make create mode 100755 lua/premake4.lua create mode 100755 lua/tolua.make diff --git a/lua/lmeshio.pkg b/lua/lmeshio.pkg new file mode 100755 index 0000000..7dd8dbe --- /dev/null +++ b/lua/lmeshio.pkg @@ -0,0 +1,390 @@ +$#include "pmd.h" +$#include "vmd.h" +$#include "mqo.h" +$#include "la.h" +$#include "color.h" + +$using namespace meshio; + +namespace meshio { + + namespace pmd { + + struct Vertex + { + //! 座標 + Vector3 pos; + //! 法線ベクトル + Vector3 normal; + //! テクスチャUV + Vector2 uv; + //! ブレンディングボーン1 + unsigned short bone0; + //! ブレンディングボーン2 + unsigned short bone1; + //! ウェイト[0 - 100] + unsigned char weight0; + //! 非エッジ + unsigned char edge_flag; + }; + + struct Material + { + //! Diffuse + fRGBA diffuse; + //! Shinness + float shinness; + //! Specular + fRGB specular; + //! Ambient + fRGB ambient; + //! トゥーンテクスチャ + unsigned char toon_index; + //! 輪郭/影 + unsigned char flag; + //! 面頂点数 + unsigned int vertex_count; + //! テクスチャ + fixed_string<20> texture; + }; + + //! ボーンの種類 + enum BONE_TYPE + { + // 回転 + BONE_ROTATE=0, + // 回転と移動 + BONE_ROTATE_MOVE, + // IK + BONE_IK, + // 不明 + BONE_UNKNOWN, + // IK影響下 + BONE_IK_INFLUENCED, + // 回転影響下 + BONE_ROTATE_INFLUENCED, + // IK接続先 + BONE_IK_CONNECT, + // 非表示 + BONE_INVISIBLE, + // 捻り + BONE_TWIST, + // 回転連動 + BONE_REVOLVE, + }; + + struct Bone + { + //! 名前 + fixed_string<20> name; + //! 親ボーン + unsigned short parent_index; + //! 子ボーン + unsigned short tail_index; + //! ボーン種類 + BONE_TYPE type; + //! 影響IKボーン + unsigned short ik_index; + // ボーン座標 + Vector3 pos; + //! 英語名 + fixed_string<20> english_name; + //! ボーン階層構築用 + Bone* parent; + Vector3 tail; + std::vector children; + unsigned short index; + + Bone(); + }; + + struct IK + { + //! IK(IKターゲット) + unsigned short index; + //! Target(エフェクター) + unsigned short target; + //! エフェクタに連動するボーン数 + unsigned char length; + //! IK値1。CCD-IK試行回数 + unsigned short iterations; + //! IK値2。CCD-IK試行一回辺りの影響度 + float weight; + //! エフェクタに連動するボーン(基本的に親ボーンに遡る) + std::vector children; + }; + + //! 表情の種類 + enum MORPH_TYPE + { + //! ベース表情 + MORPH_BASE=0, + //! まゆ + MORPH_MAYU, + //! 目 + MORPH_ME, + //! リップ + MORPH_LIP, + //! その他 + MORPH_OTHER, + }; + struct Morph + { + //! 表情名 + fixed_string<20> name; + //! 使用する頂点数 + unsigned int vertex_count; + //! 分類 + unsigned char type; + //! 頂点Index + std::vector indices; + //! 移動量 + std::vector pos_list; + //! 英語名 + fixed_string<20> english_name; + }; + + struct BoneGroup + { + fixed_string<50> name; + fixed_string<50> english_name; + }; + + //! 形状 + enum SHAPE_TYPE + { + //! 球 + SHAPE_SPHERE=0, + //! 箱 + SHAPE_BOX, + //! カプセル + SHAPE_CAPSULE, + }; + + //! 剛体タイプ + enum PROCESS_TYPE + { + //! ボーンと同じ動き + RIGIDBODY_KINEMATICS=0, + //! 物理演算 + RIGIDBODY_PHYSICS, + //! 物理演算結果をボーンに反映する + RIGIDBODY_PHYSICS_WITH_BONE, + }; + + struct RigidBody + { + //! 剛体名 + fixed_string<20> name; + //! 関連ボーン(ボーン追従とボーン位置合わせで必要) + unsigned short boneIndex; + //! グループ + unsigned char group; + //! 非衝突グループ + unsigned short target; + //! 形状 + SHAPE_TYPE shapeType; + //! サイズ + float w; + float h; + float d; + //! 姿勢 + Vector3 position; + Vector3 rotation; + //! 質量 + float weight; + //! 物理演算パラメータ(bullet) + float linearDamping; + float angularDamping; + float restitution; + float friction; + //! 剛体タイプ + PROCESS_TYPE processType; + }; + + //! Joint(物理演算でのJointとConstraintは同じ意味) + struct Constraint + { + //! Joint名 + fixed_string<20> name; + //! 接続剛体A + unsigned int rigidA; + //! 接続剛体B + unsigned int rigidB; + //! 位置 + Vector3 pos; + //! 回転 + Vector3 rot; + //! 移動制限 + Vector3 constraintPosMin; + Vector3 constraintPosMax; + //! 回転制限 + Vector3 constraintRotMin; + Vector3 constraintRotMax; + //! ばね + Vector3 springPos; + Vector3 springRot; + }; + + // IO + struct IO + { + float version; + fixed_string<20> name; + fixed_string<256> comment; + std::vector vertices; + std::vector indices; + std::vector materials; + std::vector bones; + std::vector ik_list; + std::vector morph_list; + std::vector face_list; + std::vector bone_group_list; + std::vector > bone_display_list; + std::array, 10> toon_textures; + std::vector rigidbodies; + std::vector constraints; + + fixed_string<20> english_name; + fixed_string<256> english_comment; + + IO(); + bool read(const char *path); + bool write(const char *path); + }; + + typedef std::vector VertexVector; + + } // namespace pmd + + + + namespace mqo { + + struct Scene + { + Vector3 pos; + Vector3 lookat; + float head; + float pitch; + int ortho; + float zoom2; + Vector3 ambient; + }; + + struct Material + { + std::string name; + int shader; + fRGBA color; + float diffuse; + float ambient; + float emit; + float specular; + float power; + std::string texture; + std::string alphamap; + std::string bumpmap; + int vcol; + }; + + struct Face + { + unsigned int index_count; + unsigned int indices[4]; + unsigned int material_index; + Vector2 uv[4]; + fRGBA color[4]; + }; + + struct Object + { + std::string name; + int depth; + int folding; + Vector3 scale; + Vector3 rotation; + Vector3 translation; + int visible; + int locking; + int shading; + float smoothing; + Vector3 color; + int color_type; + int mirror; + + std::vector vertices; + std::vector faces; + }; + + struct IO + { + Scene scene; + std::vector materials; + std::vector objects; + + IO(); + bool read(const char *path); + bool write(const char *path); + }; + + } + + struct Vector2 + { + float x; + float y; + + Vector2(float _x, float _y); + }; + + struct Vector3 + { + float x; + float y; + float z; + + Vector3(float _x, float _y, float _z); + bool operator==(const Vector3 &rhs)const; + Vector3 operator+(const Vector3 &rhs); + Vector3 operator-(const Vector3 &rhs); + }; + + struct Vector4 + { + float x; + float y; + float z; + float w; + + Vector4(float _x, float _y, float _z, float _w); + }; + + struct Quaternion + { + float x; + float y; + float z; + float w; + + Quaternion(float _x, float _y, float _z, float _w); + float dot(const Quaternion &rhs); + }; + + struct fRGBA + { + float r; + float g; + float b; + float a; + }; + + class fixed_string + { + TOLUA_TEMPLATE_BIND(T, 20, 50, 100, 256); + std::string str() const; + void assign(const std::string &src); + }; + +} + diff --git a/lua/lmeshio_bind.cpp b/lua/lmeshio_bind.cpp new file mode 100755 index 0000000..09f4200 --- /dev/null +++ b/lua/lmeshio_bind.cpp @@ -0,0 +1,11345 @@ +/* +** Lua binding: lmeshio +** Generated automatically by tolua++-1.0.93(lua) on Sun May 01 00:10:15 2011 +*/ + +#ifndef __cplusplus +#include "stdlib.h" +#endif +#include "string.h" + +#include "tolua++.h" + +/* Exported function */ +TOLUA_API int tolua_lmeshio_open (lua_State* tolua_S); + +#include "pmd.h" +#include "vmd.h" +#include "mqo.h" +#include "la.h" +#include "color.h" +using namespace meshio; + +/* function to release collected object via destructor */ +#ifdef __cplusplus + +static int tolua_collect_meshio__pmd__Bone (lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__IO (lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__Vector2 (lua_State* tolua_S) +{ + meshio::Vector2* self = (meshio::Vector2*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__fRGBA (lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__mqo__IO (lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__Vector3 (lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__Vector4 (lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__Quaternion (lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Bone__ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_unsigned_short_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_unsigned_int_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__Vector3_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Vertex_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__Vertex (lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Material_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__Material (lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Bone_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__IK_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__IK (lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Morph_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__Morph (lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__BoneGroup_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__BoneGroup (lua_State* tolua_S) +{ + meshio::pmd::BoneGroup* self = (meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_std__pair_unsigned_short_unsigned_char___ (lua_State* tolua_S) +{ + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__pair_unsigned_short_unsigned_char_ (lua_State* tolua_S) +{ + std::pair* self = (std::pair*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__RigidBody_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__RigidBody (lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__pmd__Constraint_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__pmd__Constraint (lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__mqo__Face_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__mqo__Face (lua_State* tolua_S) +{ + meshio::mqo::Face* self = (meshio::mqo::Face*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__mqo__Material_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__mqo__Material (lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_std__vector_meshio__mqo__Object_ (lua_State* tolua_S) +{ + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_meshio__mqo__Object (lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} +#endif + + +/* function to register type */ +static void tolua_reg_types (lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"meshio::pmd::Vertex"); + tolua_usertype(tolua_S,"meshio::pmd::Material"); + tolua_usertype(tolua_S,"meshio::pmd::Bone"); + tolua_usertype(tolua_S,"meshio::pmd::IK"); + tolua_usertype(tolua_S,"meshio::pmd::Morph"); + tolua_usertype(tolua_S,"meshio::pmd::BoneGroup"); + tolua_usertype(tolua_S,"meshio::pmd::RigidBody"); + tolua_usertype(tolua_S,"meshio::pmd::Constraint"); + tolua_usertype(tolua_S,"meshio::pmd::IO"); + tolua_usertype(tolua_S,"meshio::mqo::Scene"); + tolua_usertype(tolua_S,"meshio::mqo::Material"); + tolua_usertype(tolua_S,"meshio::mqo::Face"); + tolua_usertype(tolua_S,"meshio::mqo::Object"); + tolua_usertype(tolua_S,"meshio::mqo::IO"); + tolua_usertype(tolua_S,"meshio::Vector2"); + tolua_usertype(tolua_S,"meshio::Vector3"); + tolua_usertype(tolua_S,"meshio::Vector4"); + tolua_usertype(tolua_S,"meshio::Quaternion"); + tolua_usertype(tolua_S,"meshio::fRGBA"); + tolua_usertype(tolua_S,"meshio::fixed_string<20>"); + tolua_usertype(tolua_S,"meshio::fixed_string<50>"); + tolua_usertype(tolua_S,"meshio::fixed_string<100>"); + tolua_usertype(tolua_S,"meshio::fixed_string<256>"); + tolua_usertype(tolua_S,"fRGB"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector >"); + tolua_usertype(tolua_S,"std::array,10>"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::vector"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair >::iterator, std::vector >::iterator>"); + tolua_usertype(tolua_S,"std::pair"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); + tolua_usertype(tolua_S,"std::pair::iterator, std::vector::iterator>"); +} + +/* get function: pos of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_pos +static int tolua_get_meshio__pmd__Vertex_pos(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->pos,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pos of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_pos +static int tolua_set_meshio__pmd__Vertex_pos(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pos = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: normal of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_normal +static int tolua_get_meshio__pmd__Vertex_normal(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->normal,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: normal of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_normal +static int tolua_set_meshio__pmd__Vertex_normal(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->normal = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: uv of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_uv +static int tolua_get_meshio__pmd__Vertex_uv(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'uv'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->uv,"meshio::Vector2"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: uv of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_uv +static int tolua_set_meshio__pmd__Vertex_uv(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'uv'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector2",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->uv = *((meshio::Vector2*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bone0 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_unsigned_bone0 +static int tolua_get_meshio__pmd__Vertex_unsigned_bone0(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone0'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->bone0); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bone0 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_unsigned_bone0 +static int tolua_set_meshio__pmd__Vertex_unsigned_bone0(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone0'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bone0 = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bone1 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_unsigned_bone1 +static int tolua_get_meshio__pmd__Vertex_unsigned_bone1(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone1'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->bone1); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bone1 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_unsigned_bone1 +static int tolua_set_meshio__pmd__Vertex_unsigned_bone1(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone1'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bone1 = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: weight0 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_unsigned_weight0 +static int tolua_get_meshio__pmd__Vertex_unsigned_weight0(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight0'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->weight0); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: weight0 of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_unsigned_weight0 +static int tolua_set_meshio__pmd__Vertex_unsigned_weight0(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight0'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->weight0 = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: edge_flag of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Vertex_unsigned_edge_flag +static int tolua_get_meshio__pmd__Vertex_unsigned_edge_flag(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'edge_flag'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->edge_flag); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: edge_flag of class meshio::pmd::Vertex */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Vertex_unsigned_edge_flag +static int tolua_set_meshio__pmd__Vertex_unsigned_edge_flag(lua_State* tolua_S) +{ + meshio::pmd::Vertex* self = (meshio::pmd::Vertex*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'edge_flag'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->edge_flag = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: diffuse of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_diffuse +static int tolua_get_meshio__pmd__Material_diffuse(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'diffuse'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->diffuse,"meshio::fRGBA"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: diffuse of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_diffuse +static int tolua_set_meshio__pmd__Material_diffuse(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'diffuse'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fRGBA",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->diffuse = *((meshio::fRGBA*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: shinness of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_shinness +static int tolua_get_meshio__pmd__Material_shinness(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shinness'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->shinness); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: shinness of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_shinness +static int tolua_set_meshio__pmd__Material_shinness(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shinness'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->shinness = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: specular of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_specular +static int tolua_get_meshio__pmd__Material_specular(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'specular'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->specular,"fRGB"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: specular of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_specular +static int tolua_set_meshio__pmd__Material_specular(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'specular'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"fRGB",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->specular = *((fRGB*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ambient of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_ambient +static int tolua_get_meshio__pmd__Material_ambient(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->ambient,"fRGB"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ambient of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_ambient +static int tolua_set_meshio__pmd__Material_ambient(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"fRGB",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ambient = *((fRGB*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: toon_index of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_unsigned_toon_index +static int tolua_get_meshio__pmd__Material_unsigned_toon_index(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'toon_index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->toon_index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: toon_index of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_unsigned_toon_index +static int tolua_set_meshio__pmd__Material_unsigned_toon_index(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'toon_index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->toon_index = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: flag of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_unsigned_flag +static int tolua_get_meshio__pmd__Material_unsigned_flag(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'flag'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->flag); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: flag of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_unsigned_flag +static int tolua_set_meshio__pmd__Material_unsigned_flag(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'flag'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->flag = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vertex_count of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_unsigned_vertex_count +static int tolua_get_meshio__pmd__Material_unsigned_vertex_count(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertex_count'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->vertex_count); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: vertex_count of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_unsigned_vertex_count +static int tolua_set_meshio__pmd__Material_unsigned_vertex_count(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertex_count'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->vertex_count = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: texture of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Material_texture +static int tolua_get_meshio__pmd__Material_texture(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'texture'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->texture,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: texture of class meshio::pmd::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Material_texture +static int tolua_set_meshio__pmd__Material_texture(lua_State* tolua_S) +{ + meshio::pmd::Material* self = (meshio::pmd::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'texture'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->texture = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_name +static int tolua_get_meshio__pmd__Bone_name(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_name +static int tolua_set_meshio__pmd__Bone_name(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: parent_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_unsigned_parent_index +static int tolua_get_meshio__pmd__Bone_unsigned_parent_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parent_index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->parent_index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: parent_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_unsigned_parent_index +static int tolua_set_meshio__pmd__Bone_unsigned_parent_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parent_index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->parent_index = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: tail_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_unsigned_tail_index +static int tolua_get_meshio__pmd__Bone_unsigned_tail_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'tail_index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->tail_index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: tail_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_unsigned_tail_index +static int tolua_set_meshio__pmd__Bone_unsigned_tail_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'tail_index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->tail_index = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: type of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_type +static int tolua_get_meshio__pmd__Bone_type(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->type); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: type of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_type +static int tolua_set_meshio__pmd__Bone_type(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->type = ((meshio::pmd::BONE_TYPE) (int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ik_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_unsigned_ik_index +static int tolua_get_meshio__pmd__Bone_unsigned_ik_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ik_index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->ik_index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ik_index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_unsigned_ik_index +static int tolua_set_meshio__pmd__Bone_unsigned_ik_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ik_index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ik_index = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pos of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_pos +static int tolua_get_meshio__pmd__Bone_pos(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->pos,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pos of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_pos +static int tolua_set_meshio__pmd__Bone_pos(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pos = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: english_name of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_english_name +static int tolua_get_meshio__pmd__Bone_english_name(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->english_name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: english_name of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_english_name +static int tolua_set_meshio__pmd__Bone_english_name(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->english_name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: parent of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_parent_ptr +static int tolua_get_meshio__pmd__Bone_parent_ptr(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parent'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->parent,"meshio::pmd::Bone"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: parent of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_parent_ptr +static int tolua_set_meshio__pmd__Bone_parent_ptr(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parent'",NULL); + if (!tolua_isusertype(tolua_S,2,"meshio::pmd::Bone",0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->parent = ((meshio::pmd::Bone*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: tail of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_tail +static int tolua_get_meshio__pmd__Bone_tail(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'tail'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->tail,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: tail of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_tail +static int tolua_set_meshio__pmd__Bone_tail(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'tail'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->tail = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: children of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_children +static int tolua_get_meshio__pmd__Bone_children(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'children'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->children,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: children of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_children +static int tolua_set_meshio__pmd__Bone_children(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'children'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->children = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Bone_unsigned_index +static int tolua_get_meshio__pmd__Bone_unsigned_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: index of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Bone_unsigned_index +static int tolua_set_meshio__pmd__Bone_unsigned_index(lua_State* tolua_S) +{ + meshio::pmd::Bone* self = (meshio::pmd::Bone*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->index = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_Bone_new00 +static int tolua_lmeshio_meshio_pmd_Bone_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::pmd::Bone",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::pmd::Bone* tolua_ret = (meshio::pmd::Bone*) Mtolua_new((meshio::pmd::Bone)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::pmd::Bone"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::pmd::Bone */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_Bone_new00_local +static int tolua_lmeshio_meshio_pmd_Bone_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::pmd::Bone",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::pmd::Bone* tolua_ret = (meshio::pmd::Bone*) Mtolua_new((meshio::pmd::Bone)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::pmd::Bone"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: index of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_unsigned_index +static int tolua_get_meshio__pmd__IK_unsigned_index(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: index of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_unsigned_index +static int tolua_set_meshio__pmd__IK_unsigned_index(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->index = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: target of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_unsigned_target +static int tolua_get_meshio__pmd__IK_unsigned_target(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'target'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->target); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: target of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_unsigned_target +static int tolua_set_meshio__pmd__IK_unsigned_target(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'target'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->target = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: length of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_unsigned_length +static int tolua_get_meshio__pmd__IK_unsigned_length(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'length'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->length); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: length of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_unsigned_length +static int tolua_set_meshio__pmd__IK_unsigned_length(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'length'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->length = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: iterations of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_unsigned_iterations +static int tolua_get_meshio__pmd__IK_unsigned_iterations(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'iterations'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->iterations); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: iterations of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_unsigned_iterations +static int tolua_set_meshio__pmd__IK_unsigned_iterations(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'iterations'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->iterations = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: weight of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_weight +static int tolua_get_meshio__pmd__IK_weight(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->weight); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: weight of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_weight +static int tolua_set_meshio__pmd__IK_weight(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->weight = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: children of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IK_children +static int tolua_get_meshio__pmd__IK_children(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'children'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->children,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: children of class meshio::pmd::IK */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IK_children +static int tolua_set_meshio__pmd__IK_children(lua_State* tolua_S) +{ + meshio::pmd::IK* self = (meshio::pmd::IK*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'children'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->children = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_name +static int tolua_get_meshio__pmd__Morph_name(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_name +static int tolua_set_meshio__pmd__Morph_name(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vertex_count of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_unsigned_vertex_count +static int tolua_get_meshio__pmd__Morph_unsigned_vertex_count(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertex_count'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->vertex_count); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: vertex_count of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_unsigned_vertex_count +static int tolua_set_meshio__pmd__Morph_unsigned_vertex_count(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertex_count'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->vertex_count = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: type of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_unsigned_type +static int tolua_get_meshio__pmd__Morph_unsigned_type(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->type); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: type of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_unsigned_type +static int tolua_set_meshio__pmd__Morph_unsigned_type(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->type = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: indices of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_indices +static int tolua_get_meshio__pmd__Morph_indices(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indices'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->indices,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: indices of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_indices +static int tolua_set_meshio__pmd__Morph_indices(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indices'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->indices = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pos_list of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_pos_list +static int tolua_get_meshio__pmd__Morph_pos_list(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->pos_list,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pos_list of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_pos_list +static int tolua_set_meshio__pmd__Morph_pos_list(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pos_list = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: english_name of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Morph_english_name +static int tolua_get_meshio__pmd__Morph_english_name(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->english_name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: english_name of class meshio::pmd::Morph */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Morph_english_name +static int tolua_set_meshio__pmd__Morph_english_name(lua_State* tolua_S) +{ + meshio::pmd::Morph* self = (meshio::pmd::Morph*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->english_name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::BoneGroup */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__BoneGroup_name +static int tolua_get_meshio__pmd__BoneGroup_name(lua_State* tolua_S) +{ + meshio::pmd::BoneGroup* self = (meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<50>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::BoneGroup */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__BoneGroup_name +static int tolua_set_meshio__pmd__BoneGroup_name(lua_State* tolua_S) +{ + meshio::pmd::BoneGroup* self = (meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<50>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<50>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: english_name of class meshio::pmd::BoneGroup */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__BoneGroup_english_name +static int tolua_get_meshio__pmd__BoneGroup_english_name(lua_State* tolua_S) +{ + meshio::pmd::BoneGroup* self = (meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->english_name,"meshio::fixed_string<50>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: english_name of class meshio::pmd::BoneGroup */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__BoneGroup_english_name +static int tolua_set_meshio__pmd__BoneGroup_english_name(lua_State* tolua_S) +{ + meshio::pmd::BoneGroup* self = (meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<50>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->english_name = *((meshio::fixed_string<50>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_name +static int tolua_get_meshio__pmd__RigidBody_name(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_name +static int tolua_set_meshio__pmd__RigidBody_name(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: boneIndex of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_unsigned_boneIndex +static int tolua_get_meshio__pmd__RigidBody_unsigned_boneIndex(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'boneIndex'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->boneIndex); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: boneIndex of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_unsigned_boneIndex +static int tolua_set_meshio__pmd__RigidBody_unsigned_boneIndex(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'boneIndex'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->boneIndex = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: group of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_unsigned_group +static int tolua_get_meshio__pmd__RigidBody_unsigned_group(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'group'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->group); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: group of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_unsigned_group +static int tolua_set_meshio__pmd__RigidBody_unsigned_group(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'group'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->group = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: target of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_unsigned_target +static int tolua_get_meshio__pmd__RigidBody_unsigned_target(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'target'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->target); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: target of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_unsigned_target +static int tolua_set_meshio__pmd__RigidBody_unsigned_target(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'target'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->target = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: shapeType of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_shapeType +static int tolua_get_meshio__pmd__RigidBody_shapeType(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shapeType'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->shapeType); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: shapeType of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_shapeType +static int tolua_set_meshio__pmd__RigidBody_shapeType(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shapeType'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->shapeType = ((meshio::pmd::SHAPE_TYPE) (int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: w of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_w +static int tolua_get_meshio__pmd__RigidBody_w(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->w); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: w of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_w +static int tolua_set_meshio__pmd__RigidBody_w(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->w = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: h of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_h +static int tolua_get_meshio__pmd__RigidBody_h(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'h'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->h); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: h of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_h +static int tolua_set_meshio__pmd__RigidBody_h(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'h'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->h = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: d of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_d +static int tolua_get_meshio__pmd__RigidBody_d(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'd'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->d); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: d of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_d +static int tolua_set_meshio__pmd__RigidBody_d(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'd'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->d = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: position of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_position +static int tolua_get_meshio__pmd__RigidBody_position(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->position,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: position of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_position +static int tolua_set_meshio__pmd__RigidBody_position(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->position = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rotation of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_rotation +static int tolua_get_meshio__pmd__RigidBody_rotation(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rotation'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->rotation,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rotation of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_rotation +static int tolua_set_meshio__pmd__RigidBody_rotation(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rotation'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rotation = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: weight of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_weight +static int tolua_get_meshio__pmd__RigidBody_weight(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->weight); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: weight of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_weight +static int tolua_set_meshio__pmd__RigidBody_weight(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'weight'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->weight = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: linearDamping of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_linearDamping +static int tolua_get_meshio__pmd__RigidBody_linearDamping(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearDamping'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->linearDamping); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: linearDamping of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_linearDamping +static int tolua_set_meshio__pmd__RigidBody_linearDamping(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearDamping'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->linearDamping = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: angularDamping of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_angularDamping +static int tolua_get_meshio__pmd__RigidBody_angularDamping(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularDamping'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->angularDamping); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: angularDamping of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_angularDamping +static int tolua_set_meshio__pmd__RigidBody_angularDamping(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularDamping'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->angularDamping = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: restitution of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_restitution +static int tolua_get_meshio__pmd__RigidBody_restitution(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'restitution'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->restitution); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: restitution of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_restitution +static int tolua_set_meshio__pmd__RigidBody_restitution(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'restitution'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->restitution = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: friction of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_friction +static int tolua_get_meshio__pmd__RigidBody_friction(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'friction'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->friction); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: friction of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_friction +static int tolua_set_meshio__pmd__RigidBody_friction(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'friction'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->friction = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: processType of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__RigidBody_processType +static int tolua_get_meshio__pmd__RigidBody_processType(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'processType'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->processType); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: processType of class meshio::pmd::RigidBody */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__RigidBody_processType +static int tolua_set_meshio__pmd__RigidBody_processType(lua_State* tolua_S) +{ + meshio::pmd::RigidBody* self = (meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'processType'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->processType = ((meshio::pmd::PROCESS_TYPE) (int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_name +static int tolua_get_meshio__pmd__Constraint_name(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_name +static int tolua_set_meshio__pmd__Constraint_name(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rigidA of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_unsigned_rigidA +static int tolua_get_meshio__pmd__Constraint_unsigned_rigidA(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidA'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->rigidA); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rigidA of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_unsigned_rigidA +static int tolua_set_meshio__pmd__Constraint_unsigned_rigidA(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidA'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rigidA = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rigidB of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_unsigned_rigidB +static int tolua_get_meshio__pmd__Constraint_unsigned_rigidB(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidB'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->rigidB); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rigidB of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_unsigned_rigidB +static int tolua_set_meshio__pmd__Constraint_unsigned_rigidB(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidB'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rigidB = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pos of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_pos +static int tolua_get_meshio__pmd__Constraint_pos(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->pos,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pos of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_pos +static int tolua_set_meshio__pmd__Constraint_pos(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pos = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rot of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_rot +static int tolua_get_meshio__pmd__Constraint_rot(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rot'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->rot,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rot of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_rot +static int tolua_set_meshio__pmd__Constraint_rot(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rot'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rot = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: constraintPosMin of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_constraintPosMin +static int tolua_get_meshio__pmd__Constraint_constraintPosMin(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintPosMin'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->constraintPosMin,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: constraintPosMin of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_constraintPosMin +static int tolua_set_meshio__pmd__Constraint_constraintPosMin(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintPosMin'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->constraintPosMin = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: constraintPosMax of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_constraintPosMax +static int tolua_get_meshio__pmd__Constraint_constraintPosMax(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintPosMax'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->constraintPosMax,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: constraintPosMax of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_constraintPosMax +static int tolua_set_meshio__pmd__Constraint_constraintPosMax(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintPosMax'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->constraintPosMax = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: constraintRotMin of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_constraintRotMin +static int tolua_get_meshio__pmd__Constraint_constraintRotMin(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintRotMin'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->constraintRotMin,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: constraintRotMin of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_constraintRotMin +static int tolua_set_meshio__pmd__Constraint_constraintRotMin(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintRotMin'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->constraintRotMin = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: constraintRotMax of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_constraintRotMax +static int tolua_get_meshio__pmd__Constraint_constraintRotMax(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintRotMax'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->constraintRotMax,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: constraintRotMax of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_constraintRotMax +static int tolua_set_meshio__pmd__Constraint_constraintRotMax(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraintRotMax'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->constraintRotMax = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: springPos of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_springPos +static int tolua_get_meshio__pmd__Constraint_springPos(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'springPos'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->springPos,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: springPos of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_springPos +static int tolua_set_meshio__pmd__Constraint_springPos(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'springPos'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->springPos = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: springRot of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__Constraint_springRot +static int tolua_get_meshio__pmd__Constraint_springRot(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'springRot'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->springRot,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: springRot of class meshio::pmd::Constraint */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__Constraint_springRot +static int tolua_set_meshio__pmd__Constraint_springRot(lua_State* tolua_S) +{ + meshio::pmd::Constraint* self = (meshio::pmd::Constraint*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'springRot'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->springRot = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: version of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_version +static int tolua_get_meshio__pmd__IO_version(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'version'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->version); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: version of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_version +static int tolua_set_meshio__pmd__IO_version(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'version'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->version = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_name +static int tolua_get_meshio__pmd__IO_name(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_name +static int tolua_set_meshio__pmd__IO_name(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: comment of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_comment +static int tolua_get_meshio__pmd__IO_comment(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'comment'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->comment,"meshio::fixed_string<256>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: comment of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_comment +static int tolua_set_meshio__pmd__IO_comment(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'comment'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<256>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->comment = *((meshio::fixed_string<256>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vertices of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_vertices +static int tolua_get_meshio__pmd__IO_vertices(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertices'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->vertices,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: vertices of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_vertices +static int tolua_set_meshio__pmd__IO_vertices(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertices'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->vertices = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: indices of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_indices +static int tolua_get_meshio__pmd__IO_indices(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indices'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->indices,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: indices of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_indices +static int tolua_set_meshio__pmd__IO_indices(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indices'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->indices = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: materials of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_materials +static int tolua_get_meshio__pmd__IO_materials(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'materials'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->materials,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: materials of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_materials +static int tolua_set_meshio__pmd__IO_materials(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'materials'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->materials = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bones of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_bones +static int tolua_get_meshio__pmd__IO_bones(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bones'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->bones,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bones of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_bones +static int tolua_set_meshio__pmd__IO_bones(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bones'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bones = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ik_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_ik_list +static int tolua_get_meshio__pmd__IO_ik_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ik_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->ik_list,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ik_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_ik_list +static int tolua_set_meshio__pmd__IO_ik_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ik_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ik_list = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: morph_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_morph_list +static int tolua_get_meshio__pmd__IO_morph_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'morph_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->morph_list,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: morph_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_morph_list +static int tolua_set_meshio__pmd__IO_morph_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'morph_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->morph_list = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: face_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_face_list +static int tolua_get_meshio__pmd__IO_face_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'face_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->face_list,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: face_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_face_list +static int tolua_set_meshio__pmd__IO_face_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'face_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->face_list = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bone_group_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_bone_group_list +static int tolua_get_meshio__pmd__IO_bone_group_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone_group_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->bone_group_list,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bone_group_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_bone_group_list +static int tolua_set_meshio__pmd__IO_bone_group_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone_group_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bone_group_list = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bone_display_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_bone_display_list +static int tolua_get_meshio__pmd__IO_bone_display_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone_display_list'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->bone_display_list,"std::vector >"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bone_display_list of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_bone_display_list +static int tolua_set_meshio__pmd__IO_bone_display_list(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bone_display_list'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector >",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bone_display_list = *((std::vector >*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: toon_textures of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_toon_textures +static int tolua_get_meshio__pmd__IO_toon_textures(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'toon_textures'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->toon_textures,"std::array,10>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: toon_textures of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_toon_textures +static int tolua_set_meshio__pmd__IO_toon_textures(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'toon_textures'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::array,10>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->toon_textures = *((std::array,10>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rigidbodies of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_rigidbodies +static int tolua_get_meshio__pmd__IO_rigidbodies(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidbodies'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->rigidbodies,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rigidbodies of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_rigidbodies +static int tolua_set_meshio__pmd__IO_rigidbodies(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidbodies'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rigidbodies = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: constraints of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_constraints +static int tolua_get_meshio__pmd__IO_constraints(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraints'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->constraints,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: constraints of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_constraints +static int tolua_set_meshio__pmd__IO_constraints(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'constraints'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->constraints = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: english_name of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_english_name +static int tolua_get_meshio__pmd__IO_english_name(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->english_name,"meshio::fixed_string<20>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: english_name of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_english_name +static int tolua_set_meshio__pmd__IO_english_name(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_name'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<20>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->english_name = *((meshio::fixed_string<20>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: english_comment of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__pmd__IO_english_comment +static int tolua_get_meshio__pmd__IO_english_comment(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_comment'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->english_comment,"meshio::fixed_string<256>"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: english_comment of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__pmd__IO_english_comment +static int tolua_set_meshio__pmd__IO_english_comment(lua_State* tolua_S) +{ + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'english_comment'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fixed_string<256>",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->english_comment = *((meshio::fixed_string<256>*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_IO_new00 +static int tolua_lmeshio_meshio_pmd_IO_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::pmd::IO",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::pmd::IO* tolua_ret = (meshio::pmd::IO*) Mtolua_new((meshio::pmd::IO)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::pmd::IO"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_IO_new00_local +static int tolua_lmeshio_meshio_pmd_IO_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::pmd::IO",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::pmd::IO* tolua_ret = (meshio::pmd::IO*) Mtolua_new((meshio::pmd::IO)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::pmd::IO"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: read of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_IO_read00 +static int tolua_lmeshio_meshio_pmd_IO_read00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::pmd::IO",0,&tolua_err) || + !tolua_isstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); + const char* path = ((const char*) tolua_tostring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'read'", NULL); +#endif + { + bool tolua_ret = (bool) self->read(path); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'read'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: write of class meshio::pmd::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_pmd_IO_write00 +static int tolua_lmeshio_meshio_pmd_IO_write00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::pmd::IO",0,&tolua_err) || + !tolua_isstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::pmd::IO* self = (meshio::pmd::IO*) tolua_tousertype(tolua_S,1,0); + const char* path = ((const char*) tolua_tostring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'write'", NULL); +#endif + { + bool tolua_ret = (bool) self->write(path); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'write'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pos of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_pos +static int tolua_get_meshio__mqo__Scene_pos(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->pos,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pos of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_pos +static int tolua_set_meshio__mqo__Scene_pos(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pos'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pos = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: lookat of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_lookat +static int tolua_get_meshio__mqo__Scene_lookat(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'lookat'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->lookat,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: lookat of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_lookat +static int tolua_set_meshio__mqo__Scene_lookat(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'lookat'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->lookat = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: head of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_head +static int tolua_get_meshio__mqo__Scene_head(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'head'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->head); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: head of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_head +static int tolua_set_meshio__mqo__Scene_head(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'head'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->head = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pitch of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_pitch +static int tolua_get_meshio__mqo__Scene_pitch(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pitch'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->pitch); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pitch of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_pitch +static int tolua_set_meshio__mqo__Scene_pitch(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pitch'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pitch = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ortho of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_ortho +static int tolua_get_meshio__mqo__Scene_ortho(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ortho'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->ortho); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ortho of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_ortho +static int tolua_set_meshio__mqo__Scene_ortho(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ortho'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ortho = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: zoom2 of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_zoom2 +static int tolua_get_meshio__mqo__Scene_zoom2(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'zoom2'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->zoom2); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: zoom2 of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_zoom2 +static int tolua_set_meshio__mqo__Scene_zoom2(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'zoom2'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->zoom2 = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ambient of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Scene_ambient +static int tolua_get_meshio__mqo__Scene_ambient(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->ambient,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ambient of class meshio::mqo::Scene */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Scene_ambient +static int tolua_set_meshio__mqo__Scene_ambient(lua_State* tolua_S) +{ + meshio::mqo::Scene* self = (meshio::mqo::Scene*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ambient = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: name of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_name +static int tolua_get_meshio__mqo__Material_name(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushcppstring(tolua_S,(const char*)self->name); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_name +static int tolua_set_meshio__mqo__Material_name(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if (!tolua_iscppstring(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = ((std::string) tolua_tocppstring(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: shader of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_shader +static int tolua_get_meshio__mqo__Material_shader(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shader'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->shader); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: shader of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_shader +static int tolua_set_meshio__mqo__Material_shader(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shader'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->shader = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: color of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_color +static int tolua_get_meshio__mqo__Material_color(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->color,"meshio::fRGBA"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: color of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_color +static int tolua_set_meshio__mqo__Material_color(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::fRGBA",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->color = *((meshio::fRGBA*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: diffuse of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_diffuse +static int tolua_get_meshio__mqo__Material_diffuse(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'diffuse'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->diffuse); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: diffuse of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_diffuse +static int tolua_set_meshio__mqo__Material_diffuse(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'diffuse'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->diffuse = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: ambient of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_ambient +static int tolua_get_meshio__mqo__Material_ambient(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->ambient); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: ambient of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_ambient +static int tolua_set_meshio__mqo__Material_ambient(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ambient'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->ambient = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: emit of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_emit +static int tolua_get_meshio__mqo__Material_emit(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'emit'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->emit); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: emit of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_emit +static int tolua_set_meshio__mqo__Material_emit(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'emit'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->emit = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: specular of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_specular +static int tolua_get_meshio__mqo__Material_specular(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'specular'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->specular); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: specular of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_specular +static int tolua_set_meshio__mqo__Material_specular(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'specular'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->specular = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: power of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_power +static int tolua_get_meshio__mqo__Material_power(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'power'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->power); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: power of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_power +static int tolua_set_meshio__mqo__Material_power(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'power'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->power = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: texture of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_texture +static int tolua_get_meshio__mqo__Material_texture(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'texture'",NULL); +#endif + tolua_pushcppstring(tolua_S,(const char*)self->texture); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: texture of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_texture +static int tolua_set_meshio__mqo__Material_texture(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'texture'",NULL); + if (!tolua_iscppstring(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->texture = ((std::string) tolua_tocppstring(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: alphamap of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_alphamap +static int tolua_get_meshio__mqo__Material_alphamap(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'alphamap'",NULL); +#endif + tolua_pushcppstring(tolua_S,(const char*)self->alphamap); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: alphamap of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_alphamap +static int tolua_set_meshio__mqo__Material_alphamap(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'alphamap'",NULL); + if (!tolua_iscppstring(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->alphamap = ((std::string) tolua_tocppstring(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: bumpmap of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_bumpmap +static int tolua_get_meshio__mqo__Material_bumpmap(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bumpmap'",NULL); +#endif + tolua_pushcppstring(tolua_S,(const char*)self->bumpmap); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: bumpmap of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_bumpmap +static int tolua_set_meshio__mqo__Material_bumpmap(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bumpmap'",NULL); + if (!tolua_iscppstring(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->bumpmap = ((std::string) tolua_tocppstring(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vcol of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Material_vcol +static int tolua_get_meshio__mqo__Material_vcol(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vcol'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->vcol); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: vcol of class meshio::mqo::Material */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Material_vcol +static int tolua_set_meshio__mqo__Material_vcol(lua_State* tolua_S) +{ + meshio::mqo::Material* self = (meshio::mqo::Material*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vcol'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->vcol = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: index_count of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Face_unsigned_index_count +static int tolua_get_meshio__mqo__Face_unsigned_index_count(lua_State* tolua_S) +{ + meshio::mqo::Face* self = (meshio::mqo::Face*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index_count'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->index_count); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: index_count of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Face_unsigned_index_count +static int tolua_set_meshio__mqo__Face_unsigned_index_count(lua_State* tolua_S) +{ + meshio::mqo::Face* self = (meshio::mqo::Face*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index_count'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->index_count = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE +/* get function: indices of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_get_lmeshio_meshio_mqo_Face_indices +static int tolua_get_lmeshio_meshio_mqo_Face_indices(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->indices[tolua_index]); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + + +/* set function: indices of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_set_lmeshio_meshio_mqo_Face_indices +static int tolua_set_lmeshio_meshio_mqo_Face_indices(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + self->indices[tolua_index] = ((unsigned int) tolua_tonumber(tolua_S,3,0)); + return 0; +} +#endif //#ifndef TOLUA_DISABLE + + +/* get function: material_index of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Face_unsigned_material_index +static int tolua_get_meshio__mqo__Face_unsigned_material_index(lua_State* tolua_S) +{ + meshio::mqo::Face* self = (meshio::mqo::Face*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'material_index'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->material_index); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: material_index of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Face_unsigned_material_index +static int tolua_set_meshio__mqo__Face_unsigned_material_index(lua_State* tolua_S) +{ + meshio::mqo::Face* self = (meshio::mqo::Face*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'material_index'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->material_index = ((unsigned int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE +/* get function: uv of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_get_lmeshio_meshio_mqo_Face_uv +static int tolua_get_lmeshio_meshio_mqo_Face_uv(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->uv[tolua_index],"meshio::Vector2"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + + +/* set function: uv of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_set_lmeshio_meshio_mqo_Face_uv +static int tolua_set_lmeshio_meshio_mqo_Face_uv(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + self->uv[tolua_index] = *((meshio::Vector2*) tolua_tousertype(tolua_S,3,0)); + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: color of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_get_lmeshio_meshio_mqo_Face_color +static int tolua_get_lmeshio_meshio_mqo_Face_color(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->color[tolua_index],"meshio::fRGBA"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + + +/* set function: color of class meshio::mqo::Face */ +#ifndef TOLUA_DISABLE_tolua_set_lmeshio_meshio_mqo_Face_color +static int tolua_set_lmeshio_meshio_mqo_Face_color(lua_State* tolua_S) +{ + int tolua_index; + meshio::mqo::Face* self; + lua_pushstring(tolua_S,".self"); + lua_rawget(tolua_S,1); + self = (meshio::mqo::Face*) lua_touserdata(tolua_S,-1); +#ifndef TOLUA_RELEASE + { + tolua_Error tolua_err; + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + } +#endif + tolua_index = (int)tolua_tonumber(tolua_S,2,0); +#ifndef TOLUA_RELEASE + if (tolua_index<0 || tolua_index>=4) + tolua_error(tolua_S,"array indexing out of range.",NULL); +#endif + self->color[tolua_index] = *((meshio::fRGBA*) tolua_tousertype(tolua_S,3,0)); + return 0; +} +#endif //#ifndef TOLUA_DISABLE + + +/* get function: name of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_name +static int tolua_get_meshio__mqo__Object_name(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); +#endif + tolua_pushcppstring(tolua_S,(const char*)self->name); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: name of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_name +static int tolua_set_meshio__mqo__Object_name(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'name'",NULL); + if (!tolua_iscppstring(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->name = ((std::string) tolua_tocppstring(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: depth of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_depth +static int tolua_get_meshio__mqo__Object_depth(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'depth'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->depth); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: depth of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_depth +static int tolua_set_meshio__mqo__Object_depth(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'depth'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->depth = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: folding of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_folding +static int tolua_get_meshio__mqo__Object_folding(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'folding'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->folding); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: folding of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_folding +static int tolua_set_meshio__mqo__Object_folding(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'folding'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->folding = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: scale of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_scale +static int tolua_get_meshio__mqo__Object_scale(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'scale'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->scale,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: scale of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_scale +static int tolua_set_meshio__mqo__Object_scale(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'scale'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->scale = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: rotation of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_rotation +static int tolua_get_meshio__mqo__Object_rotation(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rotation'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->rotation,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: rotation of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_rotation +static int tolua_set_meshio__mqo__Object_rotation(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rotation'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->rotation = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: translation of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_translation +static int tolua_get_meshio__mqo__Object_translation(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'translation'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->translation,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: translation of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_translation +static int tolua_set_meshio__mqo__Object_translation(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'translation'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->translation = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: visible of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_visible +static int tolua_get_meshio__mqo__Object_visible(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'visible'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->visible); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: visible of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_visible +static int tolua_set_meshio__mqo__Object_visible(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'visible'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->visible = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: locking of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_locking +static int tolua_get_meshio__mqo__Object_locking(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'locking'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->locking); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: locking of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_locking +static int tolua_set_meshio__mqo__Object_locking(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'locking'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->locking = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: shading of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_shading +static int tolua_get_meshio__mqo__Object_shading(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shading'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->shading); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: shading of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_shading +static int tolua_set_meshio__mqo__Object_shading(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shading'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->shading = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: smoothing of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_smoothing +static int tolua_get_meshio__mqo__Object_smoothing(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'smoothing'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->smoothing); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: smoothing of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_smoothing +static int tolua_set_meshio__mqo__Object_smoothing(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'smoothing'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->smoothing = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: color of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_color +static int tolua_get_meshio__mqo__Object_color(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->color,"meshio::Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: color of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_color +static int tolua_set_meshio__mqo__Object_color(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->color = *((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: color_type of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_color_type +static int tolua_get_meshio__mqo__Object_color_type(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color_type'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->color_type); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: color_type of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_color_type +static int tolua_set_meshio__mqo__Object_color_type(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'color_type'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->color_type = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: mirror of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_mirror +static int tolua_get_meshio__mqo__Object_mirror(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'mirror'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->mirror); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: mirror of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_mirror +static int tolua_set_meshio__mqo__Object_mirror(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'mirror'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->mirror = ((int) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vertices of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_vertices +static int tolua_get_meshio__mqo__Object_vertices(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertices'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->vertices,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: vertices of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_vertices +static int tolua_set_meshio__mqo__Object_vertices(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vertices'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->vertices = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: faces of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__Object_faces +static int tolua_get_meshio__mqo__Object_faces(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'faces'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->faces,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: faces of class meshio::mqo::Object */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__Object_faces +static int tolua_set_meshio__mqo__Object_faces(lua_State* tolua_S) +{ + meshio::mqo::Object* self = (meshio::mqo::Object*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'faces'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->faces = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: scene of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__IO_scene +static int tolua_get_meshio__mqo__IO_scene(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'scene'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->scene,"meshio::mqo::Scene"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: scene of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__IO_scene +static int tolua_set_meshio__mqo__IO_scene(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'scene'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::mqo::Scene",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->scene = *((meshio::mqo::Scene*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: materials of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__IO_materials +static int tolua_get_meshio__mqo__IO_materials(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'materials'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->materials,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: materials of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__IO_materials +static int tolua_set_meshio__mqo__IO_materials(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'materials'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->materials = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: objects of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__mqo__IO_objects +static int tolua_get_meshio__mqo__IO_objects(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'objects'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->objects,"std::vector"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: objects of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__mqo__IO_objects +static int tolua_set_meshio__mqo__IO_objects(lua_State* tolua_S) +{ + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'objects'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::vector",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->objects = *((std::vector*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_mqo_IO_new00 +static int tolua_lmeshio_meshio_mqo_IO_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::mqo::IO",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::mqo::IO* tolua_ret = (meshio::mqo::IO*) Mtolua_new((meshio::mqo::IO)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::mqo::IO"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_mqo_IO_new00_local +static int tolua_lmeshio_meshio_mqo_IO_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::mqo::IO",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + meshio::mqo::IO* tolua_ret = (meshio::mqo::IO*) Mtolua_new((meshio::mqo::IO)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::mqo::IO"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: read of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_mqo_IO_read00 +static int tolua_lmeshio_meshio_mqo_IO_read00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::mqo::IO",0,&tolua_err) || + !tolua_isstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); + const char* path = ((const char*) tolua_tostring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'read'", NULL); +#endif + { + bool tolua_ret = (bool) self->read(path); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'read'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: write of class meshio::mqo::IO */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_mqo_IO_write00 +static int tolua_lmeshio_meshio_mqo_IO_write00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::mqo::IO",0,&tolua_err) || + !tolua_isstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::mqo::IO* self = (meshio::mqo::IO*) tolua_tousertype(tolua_S,1,0); + const char* path = ((const char*) tolua_tostring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'write'", NULL); +#endif + { + bool tolua_ret = (bool) self->write(path); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'write'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector2_x +static int tolua_get_meshio__Vector2_x(lua_State* tolua_S) +{ + meshio::Vector2* self = (meshio::Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector2_x +static int tolua_set_meshio__Vector2_x(lua_State* tolua_S) +{ + meshio::Vector2* self = (meshio::Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector2_y +static int tolua_get_meshio__Vector2_y(lua_State* tolua_S) +{ + meshio::Vector2* self = (meshio::Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector2_y +static int tolua_set_meshio__Vector2_y(lua_State* tolua_S) +{ + meshio::Vector2* self = (meshio::Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector2_new00 +static int tolua_lmeshio_meshio_Vector2_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + + { + meshio::Vector2* tolua_ret = (meshio::Vector2*) Mtolua_new((meshio::Vector2)(_x,_y)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector2"); + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::Vector2 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector2_new00_local +static int tolua_lmeshio_meshio_Vector2_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + + { + meshio::Vector2* tolua_ret = (meshio::Vector2*) Mtolua_new((meshio::Vector2)(_x,_y)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector3_x +static int tolua_get_meshio__Vector3_x(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector3_x +static int tolua_set_meshio__Vector3_x(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector3_y +static int tolua_get_meshio__Vector3_y(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector3_y +static int tolua_set_meshio__Vector3_y(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: z of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector3_z +static int tolua_get_meshio__Vector3_z(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->z); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: z of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector3_z +static int tolua_set_meshio__Vector3_z(lua_State* tolua_S) +{ + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->z = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector3_new00 +static int tolua_lmeshio_meshio_Vector3_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + + { + meshio::Vector3* tolua_ret = (meshio::Vector3*) Mtolua_new((meshio::Vector3)(_x,_y,_z)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector3"); + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector3_new00_local +static int tolua_lmeshio_meshio_Vector3_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + + { + meshio::Vector3* tolua_ret = (meshio::Vector3*) Mtolua_new((meshio::Vector3)(_x,_y,_z)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator== of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector3__eq00 +static int tolua_lmeshio_meshio_Vector3__eq00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const meshio::Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const meshio::Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const meshio::Vector3* self = (const meshio::Vector3*) tolua_tousertype(tolua_S,1,0); + const meshio::Vector3* rhs = ((const meshio::Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL); +#endif + { + bool tolua_ret = (bool) self->operator==(*rhs); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector3__add00 +static int tolua_lmeshio_meshio_Vector3__add00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const meshio::Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); + const meshio::Vector3* rhs = ((const meshio::Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + meshio::Vector3 tolua_ret = (meshio::Vector3) self->operator+(*rhs); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((meshio::Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"meshio::Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(meshio::Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"meshio::Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class meshio::Vector3 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector3__sub00 +static int tolua_lmeshio_meshio_Vector3__sub00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const meshio::Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::Vector3* self = (meshio::Vector3*) tolua_tousertype(tolua_S,1,0); + const meshio::Vector3* rhs = ((const meshio::Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + meshio::Vector3 tolua_ret = (meshio::Vector3) self->operator-(*rhs); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((meshio::Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"meshio::Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(meshio::Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"meshio::Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector4_x +static int tolua_get_meshio__Vector4_x(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector4_x +static int tolua_set_meshio__Vector4_x(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector4_y +static int tolua_get_meshio__Vector4_y(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector4_y +static int tolua_set_meshio__Vector4_y(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: z of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector4_z +static int tolua_get_meshio__Vector4_z(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->z); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: z of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector4_z +static int tolua_set_meshio__Vector4_z(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->z = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: w of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Vector4_w +static int tolua_get_meshio__Vector4_w(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->w); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: w of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Vector4_w +static int tolua_set_meshio__Vector4_w(lua_State* tolua_S) +{ + meshio::Vector4* self = (meshio::Vector4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->w = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector4_new00 +static int tolua_lmeshio_meshio_Vector4_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + float _w = ((float) tolua_tonumber(tolua_S,5,0)); + + { + meshio::Vector4* tolua_ret = (meshio::Vector4*) Mtolua_new((meshio::Vector4)(_x,_y,_z,_w)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector4"); + + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::Vector4 */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Vector4_new00_local +static int tolua_lmeshio_meshio_Vector4_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Vector4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + float _w = ((float) tolua_tonumber(tolua_S,5,0)); + + { + meshio::Vector4* tolua_ret = (meshio::Vector4*) Mtolua_new((meshio::Vector4)(_x,_y,_z,_w)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Vector4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Quaternion_x +static int tolua_get_meshio__Quaternion_x(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Quaternion_x +static int tolua_set_meshio__Quaternion_x(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Quaternion_y +static int tolua_get_meshio__Quaternion_y(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Quaternion_y +static int tolua_set_meshio__Quaternion_y(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: z of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Quaternion_z +static int tolua_get_meshio__Quaternion_z(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->z); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: z of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Quaternion_z +static int tolua_set_meshio__Quaternion_z(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->z = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: w of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__Quaternion_w +static int tolua_get_meshio__Quaternion_w(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->w); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: w of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__Quaternion_w +static int tolua_set_meshio__Quaternion_w(lua_State* tolua_S) +{ + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->w = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Quaternion_new00 +static int tolua_lmeshio_meshio_Quaternion_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Quaternion",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + float _w = ((float) tolua_tonumber(tolua_S,5,0)); + + { + meshio::Quaternion* tolua_ret = (meshio::Quaternion*) Mtolua_new((meshio::Quaternion)(_x,_y,_z,_w)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Quaternion"); + + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Quaternion_new00_local +static int tolua_lmeshio_meshio_Quaternion_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"meshio::Quaternion",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + float _w = ((float) tolua_tonumber(tolua_S,5,0)); + + { + meshio::Quaternion* tolua_ret = (meshio::Quaternion*) Mtolua_new((meshio::Quaternion)(_x,_y,_z,_w)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"meshio::Quaternion"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + + + + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: dot of class meshio::Quaternion */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_Quaternion_dot00 +static int tolua_lmeshio_meshio_Quaternion_dot00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::Quaternion",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const meshio::Quaternion",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::Quaternion* self = (meshio::Quaternion*) tolua_tousertype(tolua_S,1,0); + const meshio::Quaternion* rhs = ((const meshio::Quaternion*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'dot'", NULL); +#endif + { + float tolua_ret = (float) self->dot(*rhs); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'dot'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: r of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__fRGBA_r +static int tolua_get_meshio__fRGBA_r(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->r); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: r of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__fRGBA_r +static int tolua_set_meshio__fRGBA_r(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->r = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: g of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__fRGBA_g +static int tolua_get_meshio__fRGBA_g(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->g); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: g of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__fRGBA_g +static int tolua_set_meshio__fRGBA_g(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->g = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: b of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__fRGBA_b +static int tolua_get_meshio__fRGBA_b(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->b); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: b of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__fRGBA_b +static int tolua_set_meshio__fRGBA_b(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->b = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: a of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_get_meshio__fRGBA_a +static int tolua_get_meshio__fRGBA_a(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->a); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: a of class meshio::fRGBA */ +#ifndef TOLUA_DISABLE_tolua_set_meshio__fRGBA_a +static int tolua_set_meshio__fRGBA_a(lua_State* tolua_S) +{ + meshio::fRGBA* self = (meshio::fRGBA*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->a = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: str of class meshio::fixed_string<20> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_20__str00 +static int tolua_lmeshio_meshio_fixed_string_20__str00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const meshio::fixed_string<20>",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const meshio::fixed_string<20>* self = (const meshio::fixed_string<20>*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'str'", NULL); +#endif + { + std::string tolua_ret = (std::string) self->str(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'str'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: assign of class meshio::fixed_string<20> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_20__assign00 +static int tolua_lmeshio_meshio_fixed_string_20__assign00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::fixed_string<20>",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::fixed_string<20>* self = (meshio::fixed_string<20>*) tolua_tousertype(tolua_S,1,0); + const std::string src = ((const std::string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'assign'", NULL); +#endif + { + self->assign(src); + tolua_pushcppstring(tolua_S,(const char*)src); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'assign'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: str of class meshio::fixed_string<50> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_50__str00 +static int tolua_lmeshio_meshio_fixed_string_50__str00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const meshio::fixed_string<50>",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const meshio::fixed_string<50>* self = (const meshio::fixed_string<50>*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'str'", NULL); +#endif + { + std::string tolua_ret = (std::string) self->str(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'str'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: assign of class meshio::fixed_string<50> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_50__assign00 +static int tolua_lmeshio_meshio_fixed_string_50__assign00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::fixed_string<50>",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::fixed_string<50>* self = (meshio::fixed_string<50>*) tolua_tousertype(tolua_S,1,0); + const std::string src = ((const std::string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'assign'", NULL); +#endif + { + self->assign(src); + tolua_pushcppstring(tolua_S,(const char*)src); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'assign'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: str of class meshio::fixed_string<100> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_100__str00 +static int tolua_lmeshio_meshio_fixed_string_100__str00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const meshio::fixed_string<100>",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const meshio::fixed_string<100>* self = (const meshio::fixed_string<100>*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'str'", NULL); +#endif + { + std::string tolua_ret = (std::string) self->str(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'str'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: assign of class meshio::fixed_string<100> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_100__assign00 +static int tolua_lmeshio_meshio_fixed_string_100__assign00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::fixed_string<100>",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::fixed_string<100>* self = (meshio::fixed_string<100>*) tolua_tousertype(tolua_S,1,0); + const std::string src = ((const std::string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'assign'", NULL); +#endif + { + self->assign(src); + tolua_pushcppstring(tolua_S,(const char*)src); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'assign'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: str of class meshio::fixed_string<256> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_256__str00 +static int tolua_lmeshio_meshio_fixed_string_256__str00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const meshio::fixed_string<256>",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const meshio::fixed_string<256>* self = (const meshio::fixed_string<256>*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'str'", NULL); +#endif + { + std::string tolua_ret = (std::string) self->str(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'str'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: assign of class meshio::fixed_string<256> */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_meshio_fixed_string_256__assign00 +static int tolua_lmeshio_meshio_fixed_string_256__assign00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"meshio::fixed_string<256>",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + meshio::fixed_string<256>* self = (meshio::fixed_string<256>*) tolua_tousertype(tolua_S,1,0); + const std::string src = ((const std::string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'assign'", NULL); +#endif + { + self->assign(src); + tolua_pushcppstring(tolua_S,(const char*)src); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'assign'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isusertype(tolua_S,2,"meshio::pmd::Bone",0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Bone* value = ((meshio::pmd::Bone*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(value); + tolua_pushusertype(tolua_S,(void*)value,"meshio::pmd::Bone"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Bone*& tolua_ret = (meshio::pmd::Bone*&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone*"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone____geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone____geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Bone*& tolua_ret = (meshio::pmd::Bone*&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone*"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone____seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone____seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isusertype(tolua_S,3,"meshio::pmd::Bone",0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Bone* tolua_value = ((meshio::pmd::Bone*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Bone*"); + meshio::pmd::Bone*& tolua_ret = (meshio::pmd::Bone*&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone*"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short__new00 +static int tolua_lmeshio_std_vector_unsigned_short__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short__new00_local +static int tolua_lmeshio_std_vector_unsigned_short__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short__size00 +static int tolua_lmeshio_std_vector_unsigned_short__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short__push_back00 +static int tolua_lmeshio_std_vector_unsigned_short__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + unsigned short value = ((unsigned short) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(value); + tolua_pushnumber(tolua_S,(lua_Number)value); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short__back00 +static int tolua_lmeshio_std_vector_unsigned_short__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + unsigned short& tolua_ret = (unsigned short&) self->back(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short___geti00 +static int tolua_lmeshio_std_vector_unsigned_short___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + unsigned short& tolua_ret = (unsigned short&) self->operator[](index); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_short___seti00 +static int tolua_lmeshio_std_vector_unsigned_short___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + unsigned short tolua_value = ((unsigned short) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_unsigned_short__iterator +static int tolua_lmeshio_std__vector_unsigned_short__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_unsigned_short__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_unsigned_short__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "unsigned short"); + unsigned short& tolua_ret = (unsigned short&) *range->first++; + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + + return 2; +} + +static int tolua_lmeshio_std__vector_unsigned_short__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_unsigned_short__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int__new00 +static int tolua_lmeshio_std_vector_unsigned_int__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int__new00_local +static int tolua_lmeshio_std_vector_unsigned_int__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int__size00 +static int tolua_lmeshio_std_vector_unsigned_int__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int__push_back00 +static int tolua_lmeshio_std_vector_unsigned_int__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + unsigned int value = ((unsigned int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(value); + tolua_pushnumber(tolua_S,(lua_Number)value); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int__back00 +static int tolua_lmeshio_std_vector_unsigned_int__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + unsigned int& tolua_ret = (unsigned int&) self->back(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int___geti00 +static int tolua_lmeshio_std_vector_unsigned_int___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + unsigned int& tolua_ret = (unsigned int&) self->operator[](index); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_unsigned_int___seti00 +static int tolua_lmeshio_std_vector_unsigned_int___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + unsigned int tolua_value = ((unsigned int) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_unsigned_int__iterator +static int tolua_lmeshio_std__vector_unsigned_int__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_unsigned_int__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_unsigned_int__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "unsigned int"); + unsigned int& tolua_ret = (unsigned int&) *range->first++; + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + + return 2; +} + +static int tolua_lmeshio_std__vector_unsigned_int__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_unsigned_int__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3__new00 +static int tolua_lmeshio_std_vector_meshio__Vector3__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3__new00_local +static int tolua_lmeshio_std_vector_meshio__Vector3__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3__size00 +static int tolua_lmeshio_std_vector_meshio__Vector3__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3__push_back00 +static int tolua_lmeshio_std_vector_meshio__Vector3__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::Vector3* value = ((meshio::Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3__back00 +static int tolua_lmeshio_std_vector_meshio__Vector3__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::Vector3& tolua_ret = (meshio::Vector3&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::Vector3"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3___geti00 +static int tolua_lmeshio_std_vector_meshio__Vector3___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::Vector3& tolua_ret = (meshio::Vector3&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::Vector3"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__Vector3___seti00 +static int tolua_lmeshio_std_vector_meshio__Vector3___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::Vector3 tolua_value = *((meshio::Vector3*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__Vector3__iterator +static int tolua_lmeshio_std__vector_meshio__Vector3__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__Vector3__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__Vector3__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::Vector3"); + meshio::Vector3& tolua_ret = (meshio::Vector3&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::Vector3"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__Vector3__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__Vector3__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::Vertex",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Vertex* value = ((meshio::pmd::Vertex*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Vertex& tolua_ret = (meshio::pmd::Vertex&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Vertex"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Vertex& tolua_ret = (meshio::pmd::Vertex&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Vertex"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Vertex___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Vertex___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::Vertex",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Vertex tolua_value = *((meshio::pmd::Vertex*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Vertex"); + meshio::pmd::Vertex& tolua_ret = (meshio::pmd::Vertex&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Vertex"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Material__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::Material",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Material* value = ((meshio::pmd::Material*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Material& tolua_ret = (meshio::pmd::Material&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Material"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Material& tolua_ret = (meshio::pmd::Material&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Material"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Material___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Material___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::Material",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Material tolua_value = *((meshio::pmd::Material*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Material__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Material__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Material__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Material__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Material"); + meshio::pmd::Material& tolua_ret = (meshio::pmd::Material&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Material"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Material__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Material__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Bone__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::Bone",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Bone* value = ((meshio::pmd::Bone*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Bone& tolua_ret = (meshio::pmd::Bone&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Bone& tolua_ret = (meshio::pmd::Bone&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Bone___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Bone___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::Bone",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Bone tolua_value = *((meshio::pmd::Bone*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Bone"); + meshio::pmd::Bone& tolua_ret = (meshio::pmd::Bone&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Bone"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__IK__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::IK",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::IK* value = ((meshio::pmd::IK*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::IK& tolua_ret = (meshio::pmd::IK&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::IK"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::IK& tolua_ret = (meshio::pmd::IK&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::IK"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__IK___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__IK___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::IK",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::IK tolua_value = *((meshio::pmd::IK*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__IK__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__IK__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__IK__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__IK__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::IK"); + meshio::pmd::IK& tolua_ret = (meshio::pmd::IK&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::IK"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__IK__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__IK__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Morph__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::Morph",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Morph* value = ((meshio::pmd::Morph*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Morph& tolua_ret = (meshio::pmd::Morph&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Morph"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Morph& tolua_ret = (meshio::pmd::Morph&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Morph"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Morph___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Morph___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::Morph",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Morph tolua_value = *((meshio::pmd::Morph*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Morph"); + meshio::pmd::Morph& tolua_ret = (meshio::pmd::Morph&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Morph"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::BoneGroup",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::BoneGroup* value = ((meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::BoneGroup& tolua_ret = (meshio::pmd::BoneGroup&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::BoneGroup"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::BoneGroup& tolua_ret = (meshio::pmd::BoneGroup&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::BoneGroup"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::BoneGroup",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::BoneGroup tolua_value = *((meshio::pmd::BoneGroup*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::BoneGroup"); + meshio::pmd::BoneGroup& tolua_ret = (meshio::pmd::BoneGroup&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::BoneGroup"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector >* tolua_ret = (std::vector >*) Mtolua_new((std::vector >)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector >"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00_local +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector >* tolua_ret = (std::vector >*) Mtolua_new((std::vector >)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector >"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____size00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector >* self = (const std::vector >*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____push_back00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector >",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::pair",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); + std::pair* value = ((std::pair*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____back00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + std::pair& tolua_ret = (std::pair&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"std::pair"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____geti00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + std::pair& tolua_ret = (std::pair&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"std::pair"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____seti00 +static int tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"std::pair",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + std::pair tolua_value = *((std::pair*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector > */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator +static int tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator_gc\n"); + std::pair >::iterator, std::vector >::iterator> *range=(std::pair >::iterator, std::vector >::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair >::iterator, std::vector >::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator_internal(lua_State* tolua_S) +{ + std::pair >::iterator, std::vector >::iterator> *range=(std::pair >::iterator, std::vector >::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "std::pair "); + std::pair& tolua_ret = (std::pair&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"std::pair"); + + return 2; +} + +static int tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector >* self = (std::vector >*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair >::iterator, std::vector >::iterator>* range=(std::pair >::iterator, std::vector >::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair >::iterator, std::vector >::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair >::iterator, std::vector >::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::RigidBody",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::RigidBody* value = ((meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::RigidBody& tolua_ret = (meshio::pmd::RigidBody&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::RigidBody"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::RigidBody& tolua_ret = (meshio::pmd::RigidBody&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::RigidBody"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__RigidBody___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__RigidBody___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::RigidBody",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::RigidBody tolua_value = *((meshio::pmd::RigidBody*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::RigidBody"); + meshio::pmd::RigidBody& tolua_ret = (meshio::pmd::RigidBody&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::RigidBody"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00_local +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint__size00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint__push_back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::pmd::Constraint",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::pmd::Constraint* value = ((meshio::pmd::Constraint*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint__back00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::pmd::Constraint& tolua_ret = (meshio::pmd::Constraint&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Constraint"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint___geti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::pmd::Constraint& tolua_ret = (meshio::pmd::Constraint&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Constraint"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__pmd__Constraint___seti00 +static int tolua_lmeshio_std_vector_meshio__pmd__Constraint___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::pmd::Constraint",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::pmd::Constraint tolua_value = *((meshio::pmd::Constraint*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator +static int tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::pmd::Constraint"); + meshio::pmd::Constraint& tolua_ret = (meshio::pmd::Constraint&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::pmd::Constraint"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face__new00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face__new00_local +static int tolua_lmeshio_std_vector_meshio__mqo__Face__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face__size00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face__push_back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::mqo::Face",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::mqo::Face* value = ((meshio::mqo::Face*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face__back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::mqo::Face& tolua_ret = (meshio::mqo::Face&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Face"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face___geti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::mqo::Face& tolua_ret = (meshio::mqo::Face&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Face"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Face___seti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Face___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::mqo::Face",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::mqo::Face tolua_value = *((meshio::mqo::Face*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__mqo__Face__iterator +static int tolua_lmeshio_std__vector_meshio__mqo__Face__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__mqo__Face__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Face__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::mqo::Face"); + meshio::mqo::Face& tolua_ret = (meshio::mqo::Face&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Face"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Face__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Face__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material__new00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material__new00_local +static int tolua_lmeshio_std_vector_meshio__mqo__Material__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material__size00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material__push_back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::mqo::Material",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::mqo::Material* value = ((meshio::mqo::Material*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material__back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::mqo::Material& tolua_ret = (meshio::mqo::Material&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Material"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material___geti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::mqo::Material& tolua_ret = (meshio::mqo::Material&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Material"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Material___seti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Material___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::mqo::Material",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::mqo::Material tolua_value = *((meshio::mqo::Material*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__mqo__Material__iterator +static int tolua_lmeshio_std__vector_meshio__mqo__Material__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__mqo__Material__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Material__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::mqo::Material"); + meshio::mqo::Material& tolua_ret = (meshio::mqo::Material&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Material"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Material__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Material__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* method: new of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object__new00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object__new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object__new00_local +static int tolua_lmeshio_std_vector_meshio__mqo__Object__new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + + + { + std::vector* tolua_ret = (std::vector*) Mtolua_new((std::vector)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::vector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: size of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object__size00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object__size00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const std::vector* self = (const std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'size'", NULL); +#endif + { + unsigned int tolua_ret = (unsigned int) self->size(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'size'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: push_back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object__push_back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object__push_back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"meshio::mqo::Object",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + meshio::mqo::Object* value = ((meshio::mqo::Object*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'push_back'", NULL); +#endif + { + self->push_back(*value); + + } + + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'push_back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: back of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object__back00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object__back00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'back'", NULL); +#endif + { + meshio::mqo::Object& tolua_ret = (meshio::mqo::Object&) self->back(); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Object"); + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'back'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object___geti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + { + meshio::mqo::Object& tolua_ret = (meshio::mqo::Object&) self->operator[](index); + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Object"); + + } + + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator&[] of class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std_vector_meshio__mqo__Object___seti00 +static int tolua_lmeshio_std_vector_meshio__mqo__Object___seti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"meshio::mqo::Object",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); + int index = ((int) tolua_tonumber(tolua_S,2,0)); + meshio::mqo::Object tolua_value = *((meshio::mqo::Object*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator&[]'", NULL); +#endif + self->operator[](index) = tolua_value; + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.seti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* stl foreachi: class std::vector */ +#ifndef TOLUA_DISABLE_tolua_lmeshio_std__vector_meshio__mqo__Object__iterator +static int tolua_lmeshio_std__vector_meshio__mqo__Object__iterator_gc(lua_State* tolua_S) +{ + //printf("tolua_lmeshio_std__vector_meshio__mqo__Object__iterator_gc\n"); + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, 1); + range->~pair::iterator, std::vector::iterator>(); + return 0; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Object__iterator_internal(lua_State* tolua_S) +{ + std::pair::iterator, std::vector::iterator> *range=(std::pair::iterator, std::vector::iterator>*)lua_touserdata(tolua_S, lua_upvalueindex(1)); + if(range->first==range->second){ + return 0; + } + int index=lua_tonumber(tolua_S, lua_upvalueindex(2)); + tolua_pushnumber(tolua_S, index); + // update index + tolua_pushnumber(tolua_S, index+1); + lua_replace(tolua_S, lua_upvalueindex(2)); + + //tolua_pushusertype(tolua_S, &(*range->first++), "meshio::mqo::Object"); + meshio::mqo::Object& tolua_ret = (meshio::mqo::Object&) *range->first++; + tolua_pushusertype(tolua_S,(void*)&tolua_ret,"meshio::mqo::Object"); + + return 2; +} + +static int tolua_lmeshio_std__vector_meshio__mqo__Object__iterator(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"std::vector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + std::vector* self = (std::vector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'foreachi'", NULL); +#endif + { + std::pair::iterator, std::vector::iterator>* range=(std::pair::iterator, std::vector::iterator>*)lua_newuserdata(tolua_S, sizeof(std::pair::iterator, std::vector::iterator>)); + *range=std::make_pair(self->begin(), self->end()); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_setmetatable(tolua_S, -2); + lua_pushnumber(tolua_S, 0); + // gc + lua_pushcclosure(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Object__iterator_internal, 2); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'foreachi'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + + +/* get function: first of class std::pair */ +#ifndef TOLUA_DISABLE_tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_first +static int tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_first(lua_State* tolua_S) +{ + std::pair* self = (std::pair*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'first'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->first); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: first of class std::pair */ +#ifndef TOLUA_DISABLE_tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_first +static int tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_first(lua_State* tolua_S) +{ + std::pair* self = (std::pair*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'first'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->first = ((unsigned short) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: second of class std::pair */ +#ifndef TOLUA_DISABLE_tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_second +static int tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_second(lua_State* tolua_S) +{ + std::pair* self = (std::pair*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'second'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->second); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: second of class std::pair */ +#ifndef TOLUA_DISABLE_tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_second +static int tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_second(lua_State* tolua_S) +{ + std::pair* self = (std::pair*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'second'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->second = ((unsigned char) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* Open function */ +TOLUA_API int tolua_lmeshio_open (lua_State* tolua_S) +{ + tolua_open(tolua_S); + tolua_reg_types(tolua_S); + tolua_module(tolua_S,NULL,0); + tolua_beginmodule(tolua_S,NULL); + tolua_module(tolua_S,"meshio",0); + tolua_beginmodule(tolua_S,"meshio"); + tolua_module(tolua_S,"pmd",0); + tolua_beginmodule(tolua_S,"pmd"); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vertex","meshio::pmd::Vertex","",tolua_collect_meshio__pmd__Vertex); + #else + tolua_cclass(tolua_S,"Vertex","meshio::pmd::Vertex","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vertex"); + tolua_variable(tolua_S,"pos",tolua_get_meshio__pmd__Vertex_pos,tolua_set_meshio__pmd__Vertex_pos); + tolua_variable(tolua_S,"normal",tolua_get_meshio__pmd__Vertex_normal,tolua_set_meshio__pmd__Vertex_normal); + tolua_variable(tolua_S,"uv",tolua_get_meshio__pmd__Vertex_uv,tolua_set_meshio__pmd__Vertex_uv); + tolua_variable(tolua_S,"bone0",tolua_get_meshio__pmd__Vertex_unsigned_bone0,tolua_set_meshio__pmd__Vertex_unsigned_bone0); + tolua_variable(tolua_S,"bone1",tolua_get_meshio__pmd__Vertex_unsigned_bone1,tolua_set_meshio__pmd__Vertex_unsigned_bone1); + tolua_variable(tolua_S,"weight0",tolua_get_meshio__pmd__Vertex_unsigned_weight0,tolua_set_meshio__pmd__Vertex_unsigned_weight0); + tolua_variable(tolua_S,"edge_flag",tolua_get_meshio__pmd__Vertex_unsigned_edge_flag,tolua_set_meshio__pmd__Vertex_unsigned_edge_flag); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Material","meshio::pmd::Material","",tolua_collect_meshio__pmd__Material); + #else + tolua_cclass(tolua_S,"Material","meshio::pmd::Material","",NULL); + #endif + tolua_beginmodule(tolua_S,"Material"); + tolua_variable(tolua_S,"diffuse",tolua_get_meshio__pmd__Material_diffuse,tolua_set_meshio__pmd__Material_diffuse); + tolua_variable(tolua_S,"shinness",tolua_get_meshio__pmd__Material_shinness,tolua_set_meshio__pmd__Material_shinness); + tolua_variable(tolua_S,"specular",tolua_get_meshio__pmd__Material_specular,tolua_set_meshio__pmd__Material_specular); + tolua_variable(tolua_S,"ambient",tolua_get_meshio__pmd__Material_ambient,tolua_set_meshio__pmd__Material_ambient); + tolua_variable(tolua_S,"toon_index",tolua_get_meshio__pmd__Material_unsigned_toon_index,tolua_set_meshio__pmd__Material_unsigned_toon_index); + tolua_variable(tolua_S,"flag",tolua_get_meshio__pmd__Material_unsigned_flag,tolua_set_meshio__pmd__Material_unsigned_flag); + tolua_variable(tolua_S,"vertex_count",tolua_get_meshio__pmd__Material_unsigned_vertex_count,tolua_set_meshio__pmd__Material_unsigned_vertex_count); + tolua_variable(tolua_S,"texture",tolua_get_meshio__pmd__Material_texture,tolua_set_meshio__pmd__Material_texture); + tolua_endmodule(tolua_S); + tolua_constant(tolua_S,"BONE_ROTATE",meshio::pmd::BONE_ROTATE); + tolua_constant(tolua_S,"BONE_ROTATE_MOVE",meshio::pmd::BONE_ROTATE_MOVE); + tolua_constant(tolua_S,"BONE_IK",meshio::pmd::BONE_IK); + tolua_constant(tolua_S,"BONE_UNKNOWN",meshio::pmd::BONE_UNKNOWN); + tolua_constant(tolua_S,"BONE_IK_INFLUENCED",meshio::pmd::BONE_IK_INFLUENCED); + tolua_constant(tolua_S,"BONE_ROTATE_INFLUENCED",meshio::pmd::BONE_ROTATE_INFLUENCED); + tolua_constant(tolua_S,"BONE_IK_CONNECT",meshio::pmd::BONE_IK_CONNECT); + tolua_constant(tolua_S,"BONE_INVISIBLE",meshio::pmd::BONE_INVISIBLE); + tolua_constant(tolua_S,"BONE_TWIST",meshio::pmd::BONE_TWIST); + tolua_constant(tolua_S,"BONE_REVOLVE",meshio::pmd::BONE_REVOLVE); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Bone","meshio::pmd::Bone","",tolua_collect_meshio__pmd__Bone); + #else + tolua_cclass(tolua_S,"Bone","meshio::pmd::Bone","",NULL); + #endif + tolua_beginmodule(tolua_S,"Bone"); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__Bone_name,tolua_set_meshio__pmd__Bone_name); + tolua_variable(tolua_S,"parent_index",tolua_get_meshio__pmd__Bone_unsigned_parent_index,tolua_set_meshio__pmd__Bone_unsigned_parent_index); + tolua_variable(tolua_S,"tail_index",tolua_get_meshio__pmd__Bone_unsigned_tail_index,tolua_set_meshio__pmd__Bone_unsigned_tail_index); + tolua_variable(tolua_S,"type",tolua_get_meshio__pmd__Bone_type,tolua_set_meshio__pmd__Bone_type); + tolua_variable(tolua_S,"ik_index",tolua_get_meshio__pmd__Bone_unsigned_ik_index,tolua_set_meshio__pmd__Bone_unsigned_ik_index); + tolua_variable(tolua_S,"pos",tolua_get_meshio__pmd__Bone_pos,tolua_set_meshio__pmd__Bone_pos); + tolua_variable(tolua_S,"english_name",tolua_get_meshio__pmd__Bone_english_name,tolua_set_meshio__pmd__Bone_english_name); + tolua_variable(tolua_S,"parent",tolua_get_meshio__pmd__Bone_parent_ptr,tolua_set_meshio__pmd__Bone_parent_ptr); + tolua_variable(tolua_S,"tail",tolua_get_meshio__pmd__Bone_tail,tolua_set_meshio__pmd__Bone_tail); + tolua_variable(tolua_S,"children",tolua_get_meshio__pmd__Bone_children,tolua_set_meshio__pmd__Bone_children); + tolua_variable(tolua_S,"index",tolua_get_meshio__pmd__Bone_unsigned_index,tolua_set_meshio__pmd__Bone_unsigned_index); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_pmd_Bone_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_pmd_Bone_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_pmd_Bone_new00_local); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"IK","meshio::pmd::IK","",tolua_collect_meshio__pmd__IK); + #else + tolua_cclass(tolua_S,"IK","meshio::pmd::IK","",NULL); + #endif + tolua_beginmodule(tolua_S,"IK"); + tolua_variable(tolua_S,"index",tolua_get_meshio__pmd__IK_unsigned_index,tolua_set_meshio__pmd__IK_unsigned_index); + tolua_variable(tolua_S,"target",tolua_get_meshio__pmd__IK_unsigned_target,tolua_set_meshio__pmd__IK_unsigned_target); + tolua_variable(tolua_S,"length",tolua_get_meshio__pmd__IK_unsigned_length,tolua_set_meshio__pmd__IK_unsigned_length); + tolua_variable(tolua_S,"iterations",tolua_get_meshio__pmd__IK_unsigned_iterations,tolua_set_meshio__pmd__IK_unsigned_iterations); + tolua_variable(tolua_S,"weight",tolua_get_meshio__pmd__IK_weight,tolua_set_meshio__pmd__IK_weight); + tolua_variable(tolua_S,"children",tolua_get_meshio__pmd__IK_children,tolua_set_meshio__pmd__IK_children); + tolua_endmodule(tolua_S); + tolua_constant(tolua_S,"MORPH_BASE",meshio::pmd::MORPH_BASE); + tolua_constant(tolua_S,"MORPH_MAYU",meshio::pmd::MORPH_MAYU); + tolua_constant(tolua_S,"MORPH_ME",meshio::pmd::MORPH_ME); + tolua_constant(tolua_S,"MORPH_LIP",meshio::pmd::MORPH_LIP); + tolua_constant(tolua_S,"MORPH_OTHER",meshio::pmd::MORPH_OTHER); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Morph","meshio::pmd::Morph","",tolua_collect_meshio__pmd__Morph); + #else + tolua_cclass(tolua_S,"Morph","meshio::pmd::Morph","",NULL); + #endif + tolua_beginmodule(tolua_S,"Morph"); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__Morph_name,tolua_set_meshio__pmd__Morph_name); + tolua_variable(tolua_S,"vertex_count",tolua_get_meshio__pmd__Morph_unsigned_vertex_count,tolua_set_meshio__pmd__Morph_unsigned_vertex_count); + tolua_variable(tolua_S,"type",tolua_get_meshio__pmd__Morph_unsigned_type,tolua_set_meshio__pmd__Morph_unsigned_type); + tolua_variable(tolua_S,"indices",tolua_get_meshio__pmd__Morph_indices,tolua_set_meshio__pmd__Morph_indices); + tolua_variable(tolua_S,"pos_list",tolua_get_meshio__pmd__Morph_pos_list,tolua_set_meshio__pmd__Morph_pos_list); + tolua_variable(tolua_S,"english_name",tolua_get_meshio__pmd__Morph_english_name,tolua_set_meshio__pmd__Morph_english_name); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"BoneGroup","meshio::pmd::BoneGroup","",tolua_collect_meshio__pmd__BoneGroup); + #else + tolua_cclass(tolua_S,"BoneGroup","meshio::pmd::BoneGroup","",NULL); + #endif + tolua_beginmodule(tolua_S,"BoneGroup"); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__BoneGroup_name,tolua_set_meshio__pmd__BoneGroup_name); + tolua_variable(tolua_S,"english_name",tolua_get_meshio__pmd__BoneGroup_english_name,tolua_set_meshio__pmd__BoneGroup_english_name); + tolua_endmodule(tolua_S); + tolua_constant(tolua_S,"SHAPE_SPHERE",meshio::pmd::SHAPE_SPHERE); + tolua_constant(tolua_S,"SHAPE_BOX",meshio::pmd::SHAPE_BOX); + tolua_constant(tolua_S,"SHAPE_CAPSULE",meshio::pmd::SHAPE_CAPSULE); + tolua_constant(tolua_S,"RIGIDBODY_KINEMATICS",meshio::pmd::RIGIDBODY_KINEMATICS); + tolua_constant(tolua_S,"RIGIDBODY_PHYSICS",meshio::pmd::RIGIDBODY_PHYSICS); + tolua_constant(tolua_S,"RIGIDBODY_PHYSICS_WITH_BONE",meshio::pmd::RIGIDBODY_PHYSICS_WITH_BONE); + #ifdef __cplusplus + tolua_cclass(tolua_S,"RigidBody","meshio::pmd::RigidBody","",tolua_collect_meshio__pmd__RigidBody); + #else + tolua_cclass(tolua_S,"RigidBody","meshio::pmd::RigidBody","",NULL); + #endif + tolua_beginmodule(tolua_S,"RigidBody"); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__RigidBody_name,tolua_set_meshio__pmd__RigidBody_name); + tolua_variable(tolua_S,"boneIndex",tolua_get_meshio__pmd__RigidBody_unsigned_boneIndex,tolua_set_meshio__pmd__RigidBody_unsigned_boneIndex); + tolua_variable(tolua_S,"group",tolua_get_meshio__pmd__RigidBody_unsigned_group,tolua_set_meshio__pmd__RigidBody_unsigned_group); + tolua_variable(tolua_S,"target",tolua_get_meshio__pmd__RigidBody_unsigned_target,tolua_set_meshio__pmd__RigidBody_unsigned_target); + tolua_variable(tolua_S,"shapeType",tolua_get_meshio__pmd__RigidBody_shapeType,tolua_set_meshio__pmd__RigidBody_shapeType); + tolua_variable(tolua_S,"w",tolua_get_meshio__pmd__RigidBody_w,tolua_set_meshio__pmd__RigidBody_w); + tolua_variable(tolua_S,"h",tolua_get_meshio__pmd__RigidBody_h,tolua_set_meshio__pmd__RigidBody_h); + tolua_variable(tolua_S,"d",tolua_get_meshio__pmd__RigidBody_d,tolua_set_meshio__pmd__RigidBody_d); + tolua_variable(tolua_S,"position",tolua_get_meshio__pmd__RigidBody_position,tolua_set_meshio__pmd__RigidBody_position); + tolua_variable(tolua_S,"rotation",tolua_get_meshio__pmd__RigidBody_rotation,tolua_set_meshio__pmd__RigidBody_rotation); + tolua_variable(tolua_S,"weight",tolua_get_meshio__pmd__RigidBody_weight,tolua_set_meshio__pmd__RigidBody_weight); + tolua_variable(tolua_S,"linearDamping",tolua_get_meshio__pmd__RigidBody_linearDamping,tolua_set_meshio__pmd__RigidBody_linearDamping); + tolua_variable(tolua_S,"angularDamping",tolua_get_meshio__pmd__RigidBody_angularDamping,tolua_set_meshio__pmd__RigidBody_angularDamping); + tolua_variable(tolua_S,"restitution",tolua_get_meshio__pmd__RigidBody_restitution,tolua_set_meshio__pmd__RigidBody_restitution); + tolua_variable(tolua_S,"friction",tolua_get_meshio__pmd__RigidBody_friction,tolua_set_meshio__pmd__RigidBody_friction); + tolua_variable(tolua_S,"processType",tolua_get_meshio__pmd__RigidBody_processType,tolua_set_meshio__pmd__RigidBody_processType); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Constraint","meshio::pmd::Constraint","",tolua_collect_meshio__pmd__Constraint); + #else + tolua_cclass(tolua_S,"Constraint","meshio::pmd::Constraint","",NULL); + #endif + tolua_beginmodule(tolua_S,"Constraint"); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__Constraint_name,tolua_set_meshio__pmd__Constraint_name); + tolua_variable(tolua_S,"rigidA",tolua_get_meshio__pmd__Constraint_unsigned_rigidA,tolua_set_meshio__pmd__Constraint_unsigned_rigidA); + tolua_variable(tolua_S,"rigidB",tolua_get_meshio__pmd__Constraint_unsigned_rigidB,tolua_set_meshio__pmd__Constraint_unsigned_rigidB); + tolua_variable(tolua_S,"pos",tolua_get_meshio__pmd__Constraint_pos,tolua_set_meshio__pmd__Constraint_pos); + tolua_variable(tolua_S,"rot",tolua_get_meshio__pmd__Constraint_rot,tolua_set_meshio__pmd__Constraint_rot); + tolua_variable(tolua_S,"constraintPosMin",tolua_get_meshio__pmd__Constraint_constraintPosMin,tolua_set_meshio__pmd__Constraint_constraintPosMin); + tolua_variable(tolua_S,"constraintPosMax",tolua_get_meshio__pmd__Constraint_constraintPosMax,tolua_set_meshio__pmd__Constraint_constraintPosMax); + tolua_variable(tolua_S,"constraintRotMin",tolua_get_meshio__pmd__Constraint_constraintRotMin,tolua_set_meshio__pmd__Constraint_constraintRotMin); + tolua_variable(tolua_S,"constraintRotMax",tolua_get_meshio__pmd__Constraint_constraintRotMax,tolua_set_meshio__pmd__Constraint_constraintRotMax); + tolua_variable(tolua_S,"springPos",tolua_get_meshio__pmd__Constraint_springPos,tolua_set_meshio__pmd__Constraint_springPos); + tolua_variable(tolua_S,"springRot",tolua_get_meshio__pmd__Constraint_springRot,tolua_set_meshio__pmd__Constraint_springRot); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"IO","meshio::pmd::IO","",tolua_collect_meshio__pmd__IO); + #else + tolua_cclass(tolua_S,"IO","meshio::pmd::IO","",NULL); + #endif + tolua_beginmodule(tolua_S,"IO"); + tolua_variable(tolua_S,"version",tolua_get_meshio__pmd__IO_version,tolua_set_meshio__pmd__IO_version); + tolua_variable(tolua_S,"name",tolua_get_meshio__pmd__IO_name,tolua_set_meshio__pmd__IO_name); + tolua_variable(tolua_S,"comment",tolua_get_meshio__pmd__IO_comment,tolua_set_meshio__pmd__IO_comment); + tolua_variable(tolua_S,"vertices",tolua_get_meshio__pmd__IO_vertices,tolua_set_meshio__pmd__IO_vertices); + tolua_variable(tolua_S,"indices",tolua_get_meshio__pmd__IO_indices,tolua_set_meshio__pmd__IO_indices); + tolua_variable(tolua_S,"materials",tolua_get_meshio__pmd__IO_materials,tolua_set_meshio__pmd__IO_materials); + tolua_variable(tolua_S,"bones",tolua_get_meshio__pmd__IO_bones,tolua_set_meshio__pmd__IO_bones); + tolua_variable(tolua_S,"ik_list",tolua_get_meshio__pmd__IO_ik_list,tolua_set_meshio__pmd__IO_ik_list); + tolua_variable(tolua_S,"morph_list",tolua_get_meshio__pmd__IO_morph_list,tolua_set_meshio__pmd__IO_morph_list); + tolua_variable(tolua_S,"face_list",tolua_get_meshio__pmd__IO_face_list,tolua_set_meshio__pmd__IO_face_list); + tolua_variable(tolua_S,"bone_group_list",tolua_get_meshio__pmd__IO_bone_group_list,tolua_set_meshio__pmd__IO_bone_group_list); + tolua_variable(tolua_S,"bone_display_list",tolua_get_meshio__pmd__IO_bone_display_list,tolua_set_meshio__pmd__IO_bone_display_list); + tolua_variable(tolua_S,"toon_textures",tolua_get_meshio__pmd__IO_toon_textures,tolua_set_meshio__pmd__IO_toon_textures); + tolua_variable(tolua_S,"rigidbodies",tolua_get_meshio__pmd__IO_rigidbodies,tolua_set_meshio__pmd__IO_rigidbodies); + tolua_variable(tolua_S,"constraints",tolua_get_meshio__pmd__IO_constraints,tolua_set_meshio__pmd__IO_constraints); + tolua_variable(tolua_S,"english_name",tolua_get_meshio__pmd__IO_english_name,tolua_set_meshio__pmd__IO_english_name); + tolua_variable(tolua_S,"english_comment",tolua_get_meshio__pmd__IO_english_comment,tolua_set_meshio__pmd__IO_english_comment); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_pmd_IO_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_pmd_IO_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_pmd_IO_new00_local); + tolua_function(tolua_S,"read",tolua_lmeshio_meshio_pmd_IO_read00); + tolua_function(tolua_S,"write",tolua_lmeshio_meshio_pmd_IO_write00); + tolua_endmodule(tolua_S); + tolua_endmodule(tolua_S); + tolua_module(tolua_S,"mqo",0); + tolua_beginmodule(tolua_S,"mqo"); + tolua_cclass(tolua_S,"Scene","meshio::mqo::Scene","",NULL); + tolua_beginmodule(tolua_S,"Scene"); + tolua_variable(tolua_S,"pos",tolua_get_meshio__mqo__Scene_pos,tolua_set_meshio__mqo__Scene_pos); + tolua_variable(tolua_S,"lookat",tolua_get_meshio__mqo__Scene_lookat,tolua_set_meshio__mqo__Scene_lookat); + tolua_variable(tolua_S,"head",tolua_get_meshio__mqo__Scene_head,tolua_set_meshio__mqo__Scene_head); + tolua_variable(tolua_S,"pitch",tolua_get_meshio__mqo__Scene_pitch,tolua_set_meshio__mqo__Scene_pitch); + tolua_variable(tolua_S,"ortho",tolua_get_meshio__mqo__Scene_ortho,tolua_set_meshio__mqo__Scene_ortho); + tolua_variable(tolua_S,"zoom2",tolua_get_meshio__mqo__Scene_zoom2,tolua_set_meshio__mqo__Scene_zoom2); + tolua_variable(tolua_S,"ambient",tolua_get_meshio__mqo__Scene_ambient,tolua_set_meshio__mqo__Scene_ambient); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Material","meshio::mqo::Material","",tolua_collect_meshio__mqo__Material); + #else + tolua_cclass(tolua_S,"Material","meshio::mqo::Material","",NULL); + #endif + tolua_beginmodule(tolua_S,"Material"); + tolua_variable(tolua_S,"name",tolua_get_meshio__mqo__Material_name,tolua_set_meshio__mqo__Material_name); + tolua_variable(tolua_S,"shader",tolua_get_meshio__mqo__Material_shader,tolua_set_meshio__mqo__Material_shader); + tolua_variable(tolua_S,"color",tolua_get_meshio__mqo__Material_color,tolua_set_meshio__mqo__Material_color); + tolua_variable(tolua_S,"diffuse",tolua_get_meshio__mqo__Material_diffuse,tolua_set_meshio__mqo__Material_diffuse); + tolua_variable(tolua_S,"ambient",tolua_get_meshio__mqo__Material_ambient,tolua_set_meshio__mqo__Material_ambient); + tolua_variable(tolua_S,"emit",tolua_get_meshio__mqo__Material_emit,tolua_set_meshio__mqo__Material_emit); + tolua_variable(tolua_S,"specular",tolua_get_meshio__mqo__Material_specular,tolua_set_meshio__mqo__Material_specular); + tolua_variable(tolua_S,"power",tolua_get_meshio__mqo__Material_power,tolua_set_meshio__mqo__Material_power); + tolua_variable(tolua_S,"texture",tolua_get_meshio__mqo__Material_texture,tolua_set_meshio__mqo__Material_texture); + tolua_variable(tolua_S,"alphamap",tolua_get_meshio__mqo__Material_alphamap,tolua_set_meshio__mqo__Material_alphamap); + tolua_variable(tolua_S,"bumpmap",tolua_get_meshio__mqo__Material_bumpmap,tolua_set_meshio__mqo__Material_bumpmap); + tolua_variable(tolua_S,"vcol",tolua_get_meshio__mqo__Material_vcol,tolua_set_meshio__mqo__Material_vcol); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Face","meshio::mqo::Face","",tolua_collect_meshio__mqo__Face); + #else + tolua_cclass(tolua_S,"Face","meshio::mqo::Face","",NULL); + #endif + tolua_beginmodule(tolua_S,"Face"); + tolua_variable(tolua_S,"index_count",tolua_get_meshio__mqo__Face_unsigned_index_count,tolua_set_meshio__mqo__Face_unsigned_index_count); + tolua_array(tolua_S,"indices",tolua_get_lmeshio_meshio_mqo_Face_indices,tolua_set_lmeshio_meshio_mqo_Face_indices); + tolua_variable(tolua_S,"material_index",tolua_get_meshio__mqo__Face_unsigned_material_index,tolua_set_meshio__mqo__Face_unsigned_material_index); + tolua_array(tolua_S,"uv",tolua_get_lmeshio_meshio_mqo_Face_uv,tolua_set_lmeshio_meshio_mqo_Face_uv); + tolua_array(tolua_S,"color",tolua_get_lmeshio_meshio_mqo_Face_color,tolua_set_lmeshio_meshio_mqo_Face_color); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Object","meshio::mqo::Object","",tolua_collect_meshio__mqo__Object); + #else + tolua_cclass(tolua_S,"Object","meshio::mqo::Object","",NULL); + #endif + tolua_beginmodule(tolua_S,"Object"); + tolua_variable(tolua_S,"name",tolua_get_meshio__mqo__Object_name,tolua_set_meshio__mqo__Object_name); + tolua_variable(tolua_S,"depth",tolua_get_meshio__mqo__Object_depth,tolua_set_meshio__mqo__Object_depth); + tolua_variable(tolua_S,"folding",tolua_get_meshio__mqo__Object_folding,tolua_set_meshio__mqo__Object_folding); + tolua_variable(tolua_S,"scale",tolua_get_meshio__mqo__Object_scale,tolua_set_meshio__mqo__Object_scale); + tolua_variable(tolua_S,"rotation",tolua_get_meshio__mqo__Object_rotation,tolua_set_meshio__mqo__Object_rotation); + tolua_variable(tolua_S,"translation",tolua_get_meshio__mqo__Object_translation,tolua_set_meshio__mqo__Object_translation); + tolua_variable(tolua_S,"visible",tolua_get_meshio__mqo__Object_visible,tolua_set_meshio__mqo__Object_visible); + tolua_variable(tolua_S,"locking",tolua_get_meshio__mqo__Object_locking,tolua_set_meshio__mqo__Object_locking); + tolua_variable(tolua_S,"shading",tolua_get_meshio__mqo__Object_shading,tolua_set_meshio__mqo__Object_shading); + tolua_variable(tolua_S,"smoothing",tolua_get_meshio__mqo__Object_smoothing,tolua_set_meshio__mqo__Object_smoothing); + tolua_variable(tolua_S,"color",tolua_get_meshio__mqo__Object_color,tolua_set_meshio__mqo__Object_color); + tolua_variable(tolua_S,"color_type",tolua_get_meshio__mqo__Object_color_type,tolua_set_meshio__mqo__Object_color_type); + tolua_variable(tolua_S,"mirror",tolua_get_meshio__mqo__Object_mirror,tolua_set_meshio__mqo__Object_mirror); + tolua_variable(tolua_S,"vertices",tolua_get_meshio__mqo__Object_vertices,tolua_set_meshio__mqo__Object_vertices); + tolua_variable(tolua_S,"faces",tolua_get_meshio__mqo__Object_faces,tolua_set_meshio__mqo__Object_faces); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"IO","meshio::mqo::IO","",tolua_collect_meshio__mqo__IO); + #else + tolua_cclass(tolua_S,"IO","meshio::mqo::IO","",NULL); + #endif + tolua_beginmodule(tolua_S,"IO"); + tolua_variable(tolua_S,"scene",tolua_get_meshio__mqo__IO_scene,tolua_set_meshio__mqo__IO_scene); + tolua_variable(tolua_S,"materials",tolua_get_meshio__mqo__IO_materials,tolua_set_meshio__mqo__IO_materials); + tolua_variable(tolua_S,"objects",tolua_get_meshio__mqo__IO_objects,tolua_set_meshio__mqo__IO_objects); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_mqo_IO_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_mqo_IO_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_mqo_IO_new00_local); + tolua_function(tolua_S,"read",tolua_lmeshio_meshio_mqo_IO_read00); + tolua_function(tolua_S,"write",tolua_lmeshio_meshio_mqo_IO_write00); + tolua_endmodule(tolua_S); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vector2","meshio::Vector2","",tolua_collect_meshio__Vector2); + #else + tolua_cclass(tolua_S,"Vector2","meshio::Vector2","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vector2"); + tolua_variable(tolua_S,"x",tolua_get_meshio__Vector2_x,tolua_set_meshio__Vector2_x); + tolua_variable(tolua_S,"y",tolua_get_meshio__Vector2_y,tolua_set_meshio__Vector2_y); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_Vector2_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_Vector2_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_Vector2_new00_local); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vector3","meshio::Vector3","",tolua_collect_meshio__Vector3); + #else + tolua_cclass(tolua_S,"Vector3","meshio::Vector3","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vector3"); + tolua_variable(tolua_S,"x",tolua_get_meshio__Vector3_x,tolua_set_meshio__Vector3_x); + tolua_variable(tolua_S,"y",tolua_get_meshio__Vector3_y,tolua_set_meshio__Vector3_y); + tolua_variable(tolua_S,"z",tolua_get_meshio__Vector3_z,tolua_set_meshio__Vector3_z); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_Vector3_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_Vector3_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_Vector3_new00_local); + tolua_function(tolua_S,".eq",tolua_lmeshio_meshio_Vector3__eq00); + tolua_function(tolua_S,".add",tolua_lmeshio_meshio_Vector3__add00); + tolua_function(tolua_S,".sub",tolua_lmeshio_meshio_Vector3__sub00); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vector4","meshio::Vector4","",tolua_collect_meshio__Vector4); + #else + tolua_cclass(tolua_S,"Vector4","meshio::Vector4","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vector4"); + tolua_variable(tolua_S,"x",tolua_get_meshio__Vector4_x,tolua_set_meshio__Vector4_x); + tolua_variable(tolua_S,"y",tolua_get_meshio__Vector4_y,tolua_set_meshio__Vector4_y); + tolua_variable(tolua_S,"z",tolua_get_meshio__Vector4_z,tolua_set_meshio__Vector4_z); + tolua_variable(tolua_S,"w",tolua_get_meshio__Vector4_w,tolua_set_meshio__Vector4_w); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_Vector4_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_Vector4_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_Vector4_new00_local); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Quaternion","meshio::Quaternion","",tolua_collect_meshio__Quaternion); + #else + tolua_cclass(tolua_S,"Quaternion","meshio::Quaternion","",NULL); + #endif + tolua_beginmodule(tolua_S,"Quaternion"); + tolua_variable(tolua_S,"x",tolua_get_meshio__Quaternion_x,tolua_set_meshio__Quaternion_x); + tolua_variable(tolua_S,"y",tolua_get_meshio__Quaternion_y,tolua_set_meshio__Quaternion_y); + tolua_variable(tolua_S,"z",tolua_get_meshio__Quaternion_z,tolua_set_meshio__Quaternion_z); + tolua_variable(tolua_S,"w",tolua_get_meshio__Quaternion_w,tolua_set_meshio__Quaternion_w); + tolua_function(tolua_S,"new",tolua_lmeshio_meshio_Quaternion_new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_meshio_Quaternion_new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_meshio_Quaternion_new00_local); + tolua_function(tolua_S,"dot",tolua_lmeshio_meshio_Quaternion_dot00); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"fRGBA","meshio::fRGBA","",tolua_collect_meshio__fRGBA); + #else + tolua_cclass(tolua_S,"fRGBA","meshio::fRGBA","",NULL); + #endif + tolua_beginmodule(tolua_S,"fRGBA"); + tolua_variable(tolua_S,"r",tolua_get_meshio__fRGBA_r,tolua_set_meshio__fRGBA_r); + tolua_variable(tolua_S,"g",tolua_get_meshio__fRGBA_g,tolua_set_meshio__fRGBA_g); + tolua_variable(tolua_S,"b",tolua_get_meshio__fRGBA_b,tolua_set_meshio__fRGBA_b); + tolua_variable(tolua_S,"a",tolua_get_meshio__fRGBA_a,tolua_set_meshio__fRGBA_a); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"fixed_string_20_","meshio::fixed_string<20>","",NULL); + tolua_beginmodule(tolua_S,"fixed_string_20_"); + tolua_function(tolua_S,"str",tolua_lmeshio_meshio_fixed_string_20__str00); + tolua_function(tolua_S,"assign",tolua_lmeshio_meshio_fixed_string_20__assign00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"fixed_string_50_","meshio::fixed_string<50>","",NULL); + tolua_beginmodule(tolua_S,"fixed_string_50_"); + tolua_function(tolua_S,"str",tolua_lmeshio_meshio_fixed_string_50__str00); + tolua_function(tolua_S,"assign",tolua_lmeshio_meshio_fixed_string_50__assign00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"fixed_string_100_","meshio::fixed_string<100>","",NULL); + tolua_beginmodule(tolua_S,"fixed_string_100_"); + tolua_function(tolua_S,"str",tolua_lmeshio_meshio_fixed_string_100__str00); + tolua_function(tolua_S,"assign",tolua_lmeshio_meshio_fixed_string_100__assign00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"fixed_string_256_","meshio::fixed_string<256>","",NULL); + tolua_beginmodule(tolua_S,"fixed_string_256_"); + tolua_function(tolua_S,"str",tolua_lmeshio_meshio_fixed_string_256__str00); + tolua_function(tolua_S,"assign",tolua_lmeshio_meshio_fixed_string_256__assign00); + tolua_endmodule(tolua_S); + tolua_endmodule(tolua_S); + tolua_module(tolua_S,"std",0); + tolua_beginmodule(tolua_S,"std"); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Bone__","std::vector","",tolua_collect_std__vector_meshio__pmd__Bone__); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Bone__","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Bone__"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Bone___new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Bone___new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Bone___new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Bone___size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Bone___push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Bone___back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Bone____geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Bone____seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Bone___iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_unsigned_short_","std::vector","",tolua_collect_std__vector_unsigned_short_); + #else + tolua_cclass(tolua_S,"vector_unsigned_short_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_unsigned_short_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_unsigned_short__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_unsigned_short__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_unsigned_short__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_unsigned_short__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_unsigned_short__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_unsigned_short__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_unsigned_short___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_unsigned_short___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_unsigned_short__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_unsigned_short__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_unsigned_int_","std::vector","",tolua_collect_std__vector_unsigned_int_); + #else + tolua_cclass(tolua_S,"vector_unsigned_int_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_unsigned_int_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_unsigned_int__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_unsigned_int__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_unsigned_int__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_unsigned_int__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_unsigned_int__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_unsigned_int__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_unsigned_int___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_unsigned_int___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_unsigned_int__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_unsigned_int__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__Vector3_","std::vector","",tolua_collect_std__vector_meshio__Vector3_); + #else + tolua_cclass(tolua_S,"vector_meshio__Vector3_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__Vector3_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__Vector3__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__Vector3__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__Vector3__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__Vector3__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__Vector3__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__Vector3__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__Vector3___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__Vector3___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__Vector3__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__Vector3__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Vertex_","std::vector","",tolua_collect_std__vector_meshio__pmd__Vertex_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Vertex_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Vertex_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Vertex__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Vertex__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Vertex__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Vertex__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Vertex___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Vertex___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Vertex__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Material_","std::vector","",tolua_collect_std__vector_meshio__pmd__Material_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Material_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Material_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Material__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Material__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Material__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Material__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Material__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Material__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Material___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Material___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Material__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Material__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Bone_","std::vector","",tolua_collect_std__vector_meshio__pmd__Bone_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Bone_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Bone_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Bone__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Bone__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Bone__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Bone__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Bone__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Bone__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Bone___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Bone___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Bone__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__IK_","std::vector","",tolua_collect_std__vector_meshio__pmd__IK_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__IK_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__IK_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__IK__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__IK__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__IK__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__IK__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__IK__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__IK__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__IK___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__IK___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__IK__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__IK__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Morph_","std::vector","",tolua_collect_std__vector_meshio__pmd__Morph_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Morph_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Morph_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Morph__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Morph__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Morph__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Morph__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Morph__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Morph__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Morph___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Morph___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Morph__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__BoneGroup_","std::vector","",tolua_collect_std__vector_meshio__pmd__BoneGroup_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__BoneGroup_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__BoneGroup_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__BoneGroup___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__BoneGroup__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_std__pair_unsigned_short_unsigned_char___","std::vector >","",tolua_collect_std__vector_std__pair_unsigned_short_unsigned_char___); + #else + tolua_cclass(tolua_S,"vector_std__pair_unsigned_short_unsigned_char___","std::vector >","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_std__pair_unsigned_short_unsigned_char___"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char____back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_std__pair_unsigned_short_unsigned_char_____seti00); + luaL_getmetatable(tolua_S, "std::pair >::iterator, std::vector >::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_std__pair_unsigned_short_unsigned_char____iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__RigidBody_","std::vector","",tolua_collect_std__vector_meshio__pmd__RigidBody_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__RigidBody_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__RigidBody_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__RigidBody__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__RigidBody___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__RigidBody___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__RigidBody__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__pmd__Constraint_","std::vector","",tolua_collect_std__vector_meshio__pmd__Constraint_); + #else + tolua_cclass(tolua_S,"vector_meshio__pmd__Constraint_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__pmd__Constraint_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__pmd__Constraint__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__pmd__Constraint__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__pmd__Constraint__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__pmd__Constraint__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__pmd__Constraint___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__pmd__Constraint___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__pmd__Constraint__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__mqo__Face_","std::vector","",tolua_collect_std__vector_meshio__mqo__Face_); + #else + tolua_cclass(tolua_S,"vector_meshio__mqo__Face_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__mqo__Face_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__mqo__Face__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__mqo__Face__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__mqo__Face__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__mqo__Face__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__mqo__Face__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__mqo__Face__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__mqo__Face___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__mqo__Face___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Face__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__mqo__Face__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__mqo__Material_","std::vector","",tolua_collect_std__vector_meshio__mqo__Material_); + #else + tolua_cclass(tolua_S,"vector_meshio__mqo__Material_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__mqo__Material_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__mqo__Material__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__mqo__Material__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__mqo__Material__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__mqo__Material__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__mqo__Material__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__mqo__Material__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__mqo__Material___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__mqo__Material___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Material__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__mqo__Material__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"vector_meshio__mqo__Object_","std::vector","",tolua_collect_std__vector_meshio__mqo__Object_); + #else + tolua_cclass(tolua_S,"vector_meshio__mqo__Object_","std::vector","",NULL); + #endif + tolua_beginmodule(tolua_S,"vector_meshio__mqo__Object_"); + tolua_function(tolua_S,"new",tolua_lmeshio_std_vector_meshio__mqo__Object__new00); + tolua_function(tolua_S,"new_local",tolua_lmeshio_std_vector_meshio__mqo__Object__new00_local); + tolua_function(tolua_S,".call",tolua_lmeshio_std_vector_meshio__mqo__Object__new00_local); + tolua_function(tolua_S,"size",tolua_lmeshio_std_vector_meshio__mqo__Object__size00); + tolua_function(tolua_S,"push_back",tolua_lmeshio_std_vector_meshio__mqo__Object__push_back00); + tolua_function(tolua_S,"back",tolua_lmeshio_std_vector_meshio__mqo__Object__back00); + tolua_function(tolua_S,".geti",tolua_lmeshio_std_vector_meshio__mqo__Object___geti00); + tolua_function(tolua_S,".seti",tolua_lmeshio_std_vector_meshio__mqo__Object___seti00); + luaL_getmetatable(tolua_S, "std::pair::iterator, std::vector::iterator>"); + lua_pushstring(tolua_S, "__gc"); + lua_pushcfunction(tolua_S, tolua_lmeshio_std__vector_meshio__mqo__Object__iterator_gc); + lua_settable(tolua_S, -3); + lua_pop(tolua_S, 1); + tolua_function(tolua_S,"foreachi",tolua_lmeshio_std__vector_meshio__mqo__Object__iterator); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"pair_unsigned_short_unsigned_char_","std::pair","",tolua_collect_std__pair_unsigned_short_unsigned_char_); + #else + tolua_cclass(tolua_S,"pair_unsigned_short_unsigned_char_","std::pair","",NULL); + #endif + tolua_beginmodule(tolua_S,"pair_unsigned_short_unsigned_char_"); + tolua_variable(tolua_S,"first",tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_first,tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_first); + tolua_variable(tolua_S,"second",tolua_get_std__pair_unsigned_short_unsigned_char__unsigned_second,tolua_set_std__pair_unsigned_short_unsigned_char__unsigned_second); + tolua_endmodule(tolua_S); + tolua_endmodule(tolua_S); + tolua_endmodule(tolua_S); + return 1; +} + +#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 +#ifdef __cplusplus +extern "C" { +#endif + + TOLUA_API int luaopen_lmeshio (lua_State* tolua_S) { + return tolua_lmeshio_open(tolua_S); +}; + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/lua/lmeshio_bind.h b/lua/lmeshio_bind.h new file mode 100755 index 0000000..8429071 --- /dev/null +++ b/lua/lmeshio_bind.h @@ -0,0 +1,8 @@ +/* +** Lua binding: lmeshio +** Generated automatically by tolua++-1.0.93(lua) on Sun May 01 00:10:16 2011. +*/ + +/* Exported function */ +TOLUA_API int tolua_lmeshio_open(lua_State* tolua_S); + diff --git a/lua/lmeshio_static.make b/lua/lmeshio_static.make new file mode 100755 index 0000000..c8fe6c7 --- /dev/null +++ b/lua/lmeshio_static.make @@ -0,0 +1,140 @@ +# GNU Make project makefile autogenerated by Premake +ifndef config + config=debug +endif + +ifndef verbose + SILENT = @ +endif + +ifndef CC + CC = gcc +endif + +ifndef CXX + CXX = g++ +endif + +ifndef AR + AR = ar +endif + +ifeq ($(config),debug) + OBJDIR = obj/Debug + TARGETDIR = ../debug + TARGET = $(TARGETDIR)/liblmeshio_static.a + DEFINES += -DDEBUG + INCLUDES += -I../src + CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) + CFLAGS += $(CPPFLAGS) $(ARCH) -g -std=c++0x + CXXFLAGS += $(CFLAGS) + LDFLAGS += -L../debug + LIBS += -ltolua++ -llua -lmeshio + RESFLAGS += $(DEFINES) $(INCLUDES) + LDDEPS += + LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS) + define PREBUILDCMDS + @echo Running pre-build commands + make -f tolua.make + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +ifeq ($(config),release) + OBJDIR = obj/Release + TARGETDIR = ../release + TARGET = $(TARGETDIR)/liblmeshio_static.a + DEFINES += -DNDEBUG + INCLUDES += -I../src + CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES) + CFLAGS += $(CPPFLAGS) $(ARCH) -O2 -std=c++0x + CXXFLAGS += $(CFLAGS) + LDFLAGS += -s -L../release + LIBS += -ltolua++ -llua -lmeshio + RESFLAGS += $(DEFINES) $(INCLUDES) + LDDEPS += + LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS) + define PREBUILDCMDS + @echo Running pre-build commands + make -f tolua.make + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +OBJECTS := \ + $(OBJDIR)/lmeshio_bind.o \ + $(OBJDIR)/lmeshio.o \ + +RESOURCES := \ + +SHELLTYPE := msdos +ifeq (,$(ComSpec)$(COMSPEC)) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + SHELLTYPE := posix +endif + +.PHONY: clean prebuild prelink + +all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET) + @: + +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) + @echo Linking lmeshio_static + $(SILENT) $(LINKCMD) + $(POSTBUILDCMDS) + +$(TARGETDIR): + @echo Creating $(TARGETDIR) +ifeq (posix,$(SHELLTYPE)) + $(SILENT) mkdir -p $(TARGETDIR) +else + $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) +endif + +$(OBJDIR): + @echo Creating $(OBJDIR) +ifeq (posix,$(SHELLTYPE)) + $(SILENT) mkdir -p $(OBJDIR) +else + $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) +endif + +clean: + @echo Cleaning lmeshio_static +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) + $(SILENT) rm -rf $(OBJDIR) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) +endif + +prebuild: + $(PREBUILDCMDS) + +prelink: + $(PRELINKCMDS) + +ifneq (,$(PCH)) +$(GCH): $(PCH) + @echo $(notdir $<) + -$(SILENT) cp $< $(OBJDIR) + $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<" +endif + +$(OBJDIR)/lmeshio_bind.o: lmeshio_bind.cpp + @echo $(notdir $<) + $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<" +$(OBJDIR)/lmeshio.o: lmeshio.cpp + @echo $(notdir $<) + $(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) diff --git a/lua/premake4.lua b/lua/premake4.lua new file mode 100755 index 0000000..075fa53 --- /dev/null +++ b/lua/premake4.lua @@ -0,0 +1,67 @@ +newoption { + --[[ usage: premake4 --static gmake ]]-- + trigger = "static", + description = "build static library" +} + +solution "lmeshio" + +configurations { "Debug", "Release" } + +if _OPTIONS["static"] then + kind "StaticLib" + libdirs { + } + links { + "tolua++", "lua", + "meshio", + } + project "lmeshio_static" +else + kind "SharedLib" + defines { + --"TOLUA_API='__declspec(dllexport)'", + } + libdirs { + "/x86_64-w64-mingw32/local/bin", + } + links { + "tolua++", "lua51", + "meshio", + } + project "lmeshio" +end + +language "C++" +files { + "lmeshio_bind.cpp", +} +prebuildcommands { + "make -f tolua.make", +} +buildoptions { + "-std=c++0x", +} +defines { +} +includedirs { + "../src", +} +linkoptions { +} + +configuration "Debug" +do + defines { "DEBUG" } + flags { "Symbols" } + targetdir "../debug" + libdirs { "../debug" } +end +configuration "Release" +do + defines { "NDEBUG" } + flags { "Optimize" } + targetdir "../release" + libdirs { "../release" } +end + diff --git a/lua/tolua.make b/lua/tolua.make new file mode 100755 index 0000000..77785d6 --- /dev/null +++ b/lua/tolua.make @@ -0,0 +1,11 @@ +TOLUA=$(USERPROFILE)/work/retolua/retolua +#TOLUA=tolua++ + +all: lmeshio_bind.cpp + +lmeshio_bind.cpp: lmeshio.pkg + $(TOLUA) -n lmeshio -o $@ -H lmeshio_bind.h $< + +clean: + rm -f lmeshio_bind.cpp lmeshio_bind.h + -- 2.11.0