/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.11
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */

#define SWIGLUA
#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
#define SWIG_LUA_MODULE_GLOBAL


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      register size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * luarun.swg
 *
 * This file contains the runtime support for Lua modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

#include "lua.h"
#include "lauxlib.h"
#include <stdlib.h>  /* for malloc */
#include <assert.h>  /* for a few sanity tests */

/* -----------------------------------------------------------------------------
 * Lua flavors
 * ----------------------------------------------------------------------------- */

#define SWIG_LUA_FLAVOR_LUA 1
#define SWIG_LUA_FLAVOR_ELUA 2
#define SWIG_LUA_FLAVOR_ELUAC 3

#if !defined(SWIG_LUA_TARGET)
# error SWIG_LUA_TARGET not defined
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
#  define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
#else /* SWIG_LUA_FLAVOR_LUA */
#  define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
#  define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
#endif

#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
#  define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
#  define LSTRVAL LRO_STRVAL
#endif

/* -----------------------------------------------------------------------------
 * compatibility defines
 * ----------------------------------------------------------------------------- */

/* History of Lua C API length functions:  In Lua 5.0 (and before?)
   there was "lua_strlen".  In Lua 5.1, this was renamed "lua_objlen",
   but a compatibility define of "lua_strlen" was added.  In Lua 5.2,
   this function was again renamed, to "lua_rawlen" (to emphasize that
   it doesn't call the "__len" metamethod), and the compatibility
   define of lua_strlen was removed.  All SWIG uses have been updated
   to "lua_rawlen", and we add our own defines of that here for older
   versions of Lua.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
# define lua_rawlen lua_strlen
#elif LUA_VERSION_NUM == 501
# define lua_rawlen lua_objlen
#endif


/* lua_pushglobaltable is the recommended "future-proof" way to get
   the global table for Lua 5.2 and later.  Here we define
   lua_pushglobaltable ourselves for Lua versions before 5.2.  */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
#endif


/* --------------------------------------------------------------------------
 * Helper functions for error handling
 * -------------------------------------------------------------------------- */

/* Push the string STR on the Lua stack, like lua_pushstring, but
   prefixed with the the location of the innermost Lua call-point
   (as formated by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pusherrstring (lua_State *L, const char *str)
{
  luaL_where (L, 1);
  lua_pushstring (L, str);
  lua_concat (L, 2);
}

/* Push a formatted string generated from FMT and following args on
   the Lua stack, like lua_pushfstring, but prefixed with the the
   location of the innermost Lua call-point (as formated by luaL_where).  */
SWIGRUNTIME void
SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
{
  va_list argp;
  va_start(argp, fmt);
  luaL_where(L, 1);
  lua_pushvfstring(L, fmt, argp);
  va_end(argp);
  lua_concat(L, 2);
}


/* -----------------------------------------------------------------------------
 * global swig types
 * ----------------------------------------------------------------------------- */
/* Constant table */
#define SWIG_LUA_INT     1
#define SWIG_LUA_FLOAT   2
#define SWIG_LUA_STRING  3
#define SWIG_LUA_POINTER 4
#define SWIG_LUA_BINARY  5
#define SWIG_LUA_CHAR    6

/* Structure for variable linking table */
typedef struct {
  const char *name;
  lua_CFunction get;
  lua_CFunction set;
} swig_lua_var_info;

/* Constant information structure */
typedef struct {
    int type;
    char *name;
    long lvalue;
    double dvalue;
    void   *pvalue;
    swig_type_info **ptype;
} swig_lua_const_info;

typedef struct {
  const char     *name;
  lua_CFunction   method;
} swig_lua_method;

typedef struct {
  const char     *name;
  lua_CFunction   getmethod;
  lua_CFunction   setmethod;
} swig_lua_attribute;

// Can be used to create namespaces. Currently used to
// wrap class static methods/variables/constants
typedef struct {
  const char            *name;
  swig_lua_method       *ns_methods;
  swig_lua_attribute    *ns_attributes;
  swig_lua_const_info   *ns_constants;
} swig_lua_namespace;

typedef struct swig_lua_class {
  const char    *name;
  swig_type_info   **type;
  lua_CFunction  constructor;
  void    (*destructor)(void *);
  swig_lua_method   *methods;
  swig_lua_attribute     *attributes;
  swig_lua_namespace    cls_static;
  struct swig_lua_class **bases;
  const char **base_names;
} swig_lua_class;

/* this is the struct for wrapping all pointers in SwigLua
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  void        *ptr;
} swig_lua_userdata;

/* this is the struct for wrapping arbitrary packed binary data
(currently it is only used for member function pointers)
the data ordering is similar to swig_lua_userdata, but it is currently not possible
to tell the two structures apart within SWIG, other than by looking at the type
*/
typedef struct {
  swig_type_info   *type;
  int     own;  /* 1 if owned & must be destroyed */
  char data[1];       /* arbitary amount of data */    
} swig_lua_rawdata;

/* Common SWIG API */
#define SWIG_NewPointerObj(L, ptr, type, owner)       SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
#define SWIG_ConvertPtr(L,idx, ptr, type, flags)    SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname)  SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(L, idx, ptr, sz, ty)       SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
#define SWIG_NewMemberObj(L, ptr, sz, type)      SWIG_Lua_NewPackedObj(L, ptr, sz, type)

/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*

/* Contract support */
#define SWIG_contract_assert(expr, msg)  \
  if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else


/* helper #defines */
#define SWIG_fail {goto fail;}
#define SWIG_fail_arg(func_name,argnum,type) \
  {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
  goto fail;}
#define SWIG_fail_ptr(func_name,argnum,type) \
  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
#define SWIG_check_num_args(func_name,a,b) \
  if (lua_gettop(L)<a || lua_gettop(L)>b) \
  {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
  goto fail;}


#define SWIG_Lua_get_table(L,n) \
  (lua_pushstring(L, n), lua_rawget(L,-2))

#define SWIG_Lua_add_function(L,n,f) \
  (lua_pushstring(L, n), \
      lua_pushcfunction(L, f), \
      lua_rawset(L,-3))

/* special helper for allowing 'nil' for usertypes */
#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))

#ifdef __cplusplus
/* Special helper for member function pointers 
it gets the address, casts it, then dereferences it */
//#define SWIG_mem_fn_as_voidptr(a)  (*((char**)&(a)))
#endif

/* storing/access of swig_module_info */
SWIGRUNTIME swig_module_info *
SWIG_Lua_GetModule(lua_State* L) {
  swig_module_info *ret = 0;
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_rawget(L,LUA_REGISTRYINDEX);
  if (lua_islightuserdata(L,-1))
    ret=(swig_module_info*)lua_touserdata(L,-1);
  lua_pop(L,1);  /* tidy */
  return ret;
}

SWIGRUNTIME void
SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
  /* add this all into the Lua registry: */
  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
  lua_pushlightuserdata(L,(void*)module);
  lua_rawset(L,LUA_REGISTRYINDEX);
}

/* -----------------------------------------------------------------------------
 * global variable support code: modules
 * ----------------------------------------------------------------------------- */

/* this function is called when trying to set an immutable.
default action is to print an error.
This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
{
/*  there should be 1 param passed in: the new value */
#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
  lua_pop(L,1);  /* remove it */
  luaL_error(L,"This variable is immutable");
#endif
    return 0;   /* should not return anything */
}

/* the module.get method used for getting linked data */
SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  printf("SWIG_Lua_module_get %p(%s) '%s'\n",
   lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
   lua_tostring(L,2));
*/
  /* get the metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  assert(lua_isrotable(L,1)); /* just in case */
#else
  assert(lua_istable(L,1)); /* default Lua action */
#endif
  lua_getmetatable(L,1);  /* get the metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  assert(lua_isrotable(L,-1));  /* just in case */
#else
  assert(lua_istable(L,-1));
#endif
  SWIG_Lua_get_table(L,".get");  /* get the .get table */
  lua_remove(L,3);  /* remove metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  if (lua_isrotable(L,-1))
#else
  if (lua_istable(L,-1))
#endif
  {
    /* look for the key in the .get table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,3);  /* remove .get */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_call(L,0,1);
      return 1;
    }
    lua_pop(L,1);  /* remove the top */
  }
  lua_pop(L,1);  /* remove the .get */
  lua_pushnil(L);  /* return a nil */
  return 1;
}

/* the module.set method used for setting linked data */
SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
*/
  /* get the metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  assert(lua_isrotable(L,1));  /* just in case */
#else
  assert(lua_istable(L,1)); /* default Lua action */
#endif
  lua_getmetatable(L,1);  /* get the metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  assert(lua_isrotable(L,-1));  /* just in case */
#else
  assert(lua_istable(L,-1));
#endif
  SWIG_Lua_get_table(L,".set");  /* get the .set table */
  lua_remove(L,4);  /* remove metatable */
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
  if (lua_isrotable(L,-1))
#else
  if (lua_istable(L,-1))
#endif
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    lua_remove(L,4);  /* remove .set */
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) 
    else {
      return 0; // Exits stoically if an invalid key is initialized.
    }
#endif
  }
  lua_settop(L,3);  /* reset back to start */
  /* we now have the table, key & new value, so just set directly */
  lua_rawset(L,1);  /* add direct */
  return 0;
}

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
/* registering a module in lua. Pushes the module table on the stack. */
SWIGINTERN void  SWIG_Lua_module_begin(lua_State* L,const char* name)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushstring(L,name);
  lua_newtable(L);   /* the table */
  /* add meta table */
  lua_newtable(L);    /* the meta table */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
  lua_pushstring(L,".get");
  lua_newtable(L);    /* the .get table */
  lua_rawset(L,-3);  /* add .get into metatable */
  lua_pushstring(L,".set");
  lua_newtable(L);    /* the .set table */
  lua_rawset(L,-3);  /* add .set into metatable */
  lua_setmetatable(L,-2);  /* sets meta table in module */
#ifdef SWIG_LUA_MODULE_GLOBAL
  /* If requested, install the module directly into the global namespace. */
  lua_rawset(L,-3);        /* add module into parent */
  SWIG_Lua_get_table(L,name);   /* get the table back out */
#else
  /* Do not install the module table as global name. The stack top has
     the module table with the name below. We pop the top and replace
     the name with it. */
  lua_replace(L,-2);
#endif
}

/* ending the register */
SWIGINTERN void  SWIG_Lua_module_end(lua_State* L)
{
  lua_pop(L,1);       /* tidy stack (remove module) */
}

/* adding a linked variable to the module */
SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  lua_getmetatable(L,-1);  /* get the metatable */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* should be a table: */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)  /* if there is a set fn */
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* should be a table: */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
  lua_pop(L,1);       /* tidy stack (remove meta) */
}
#endif

/* adding a function module */
SWIGINTERN void  SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
{
  SWIG_Lua_add_function(L,name,fn);
}

/* -----------------------------------------------------------------------------
 * global variable support code: namespaces
 * ----------------------------------------------------------------------------- */

SWIGINTERN int SWIG_Lua_namespace_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_istable(L,-2));  /* just in case */
  lua_getmetatable(L,-2);
  assert(lua_istable(L,-1));
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));
  /* look for the key in the .get table */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_call(L,0,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  return 0;
}

SWIGINTERN int SWIG_Lua_namespace_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
*/

  assert(lua_istable(L,1));
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,1,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  return 0;
}

SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration
SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration

/* helper function - register namespace methods and attributes into namespace */
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns)
{
  int i = 0;
  assert(lua_istable(L,-1));
  /* There must be table at the top of the stack */
  SWIG_Lua_InstallConstants(L, ns->ns_constants);

  lua_getmetatable(L,-1);

  /* add fns */
  for(i=0;ns->ns_attributes[i].name;i++){
    SWIG_Lua_add_class_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod);
  }

  /* add methods to the metatable */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;ns->ns_methods[i].name;i++){
    SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].method);
  }
  lua_pop(L,1);

  /* clear stack - remove metatble */
  lua_pop(L,1);

}

/* helper function. creates namespace table and add it to module table */
SWIGINTERN int SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns)
{
  assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */
  lua_checkstack(L,5);
  lua_pushstring(L, ns->name);
  lua_newtable(L); /* namespace itself */
  lua_newtable(L); /* metatable for namespace */

  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  lua_rawset(L,-3);

  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set);

  lua_setmetatable(L,-2); /* set metatable */
  lua_rawset(L,-3); /* add namespace to module table */
}
/* -----------------------------------------------------------------------------
 * global variable support code: classes
 * ----------------------------------------------------------------------------- */

/* the class.get method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_get(lua_State* L)
{
/*  there should be 2 params passed in
  (1) userdata (not the meta table)
  (2) string name of the attribute
*/
  assert(lua_isuserdata(L,-2));  /* just in case */
  lua_getmetatable(L,-2);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  /* look for the key in the .get table */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);
  lua_remove(L,-2); /* stack tidy, remove .get table */
  if (lua_iscfunction(L,-1))
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_call(L,1,1);  /* 1 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* ok, so try the .fn table */
  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  lua_pushvalue(L,2);  /* key */
  lua_rawget(L,-2);  /* look for the fn */
  lua_remove(L,-2); /* stack tidy, remove .fn table */
  if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
  {  /* found it so return the fn & let lua call it */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  lua_pop(L,1);  /* remove whatever was there */
  /* NEW: looks for the __getitem() fn
  this is a user provided get fn */
  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_call(L,2,1);  /* 2 value in (userdata),1 out (result) */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;  /* sorry not known */
}

/* the class.set method, performs the lookup of class attributes */
SWIGINTERN int  SWIG_Lua_class_set(lua_State* L)
{
/*  there should be 3 params passed in
  (1) table (not the meta table)
  (2) string name of the attribute
  (3) any for the new value
printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
      lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
      lua_tostring(L,2),
      lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/

  assert(lua_isuserdata(L,1));  /* just in case */
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */

  SWIG_Lua_get_table(L,".set"); /* find the .set table */
  if (lua_istable(L,-1))
  {
    /* look for the key in the .set table */
    lua_pushvalue(L,2);  /* key */
    lua_rawget(L,-2);
    if (lua_iscfunction(L,-1))
    {  /* found it so call the fn & return its value */
      lua_pushvalue(L,1);  /* userdata */
      lua_pushvalue(L,3);  /* value */
      lua_call(L,2,0);
      return 0;
    }
    lua_pop(L,1);  /* remove the value */
  }
  lua_pop(L,1);  /* remove the value .set table */
  /* NEW: looks for the __setitem() fn
  this is a user provided set fn */
  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
  if (lua_iscfunction(L,-1))  /* if its there */
  {  /* found it so call the fn & return its value */
    lua_pushvalue(L,1);  /* the userdata */
    lua_pushvalue(L,2);  /* the parameter */
    lua_pushvalue(L,3);  /* the value */
    lua_call(L,3,0);  /* 3 values in ,0 out */
    lua_remove(L,-2); /* stack tidy, remove metatable */
    return 1;
  }
  return 0;
}

/* the class.destruct method called by the interpreter */
SWIGINTERN int  SWIG_Lua_class_destruct(lua_State* L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata* usr;
  swig_lua_class* clss;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  /* if must be destroyed & has a destructor */
  if (usr->own) /* if must be destroyed */
  {
    clss=(swig_lua_class*)usr->type->clientdata;  /* get the class */
    if (clss && clss->destructor)  /* there is a destroy fn */
    {
      clss->destructor(usr->ptr);  /* bye bye */
    }
  }
  return 0;
}

/* the class.__tostring method called by the interpreter and print */
SWIGINTERN int  SWIG_Lua_class_tostring(lua_State* L)
{
/*  there should be 1 param passed in
  (1) userdata (not the metatable) */
  assert(lua_isuserdata(L,1));  /* just in case */
  unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
  lua_getmetatable(L,1);    /* get the meta table */
  assert(lua_istable(L,-1));  /* just in case */
  
  lua_getfield(L, -1, ".type");
  const char* className = lua_tostring(L, -1);
  
  char output[256];
  sprintf(output, "<%s userdata: %lX>", className, userData);
  
  lua_pushstring(L, (const char*)output);
  return 1;
}

/* to manually disown some userdata */
SWIGINTERN int  SWIG_Lua_class_disown(lua_State* L)
{
/*  there should be 1 params passed in
  (1) userdata (not the meta table) */
  swig_lua_userdata* usr;
  assert(lua_isuserdata(L,-1));  /* just in case */
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
  
  usr->own = 0; /* clear our ownership */
  return 0;
}

/* Constructor proxy. Used when class name entry in module is not class constructor,
but special table instead. */
SWIGINTERN int SWIG_Lua_constructor_proxy(lua_State* L)
{
  /* unlimited number of parameters
     First one is our proxy table and we should remove it
     Other we should pass to real constructor
   */
   assert(lua_istable(L,1));
   lua_pushstring(L,".constructor");
   lua_rawget(L,1);
   assert(!lua_isnil(L,-1));
   lua_replace(L,1); /* replace our table with real constructor */
   lua_call(L,lua_gettop(L)-1,1);
   return 1;
}

/* gets the swig class registry (or creates it) */
SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State* L)
{
  /* add this all into the swig registry: */
  lua_pushstring(L,"SWIG");
  lua_rawget(L,LUA_REGISTRYINDEX);  /* get the registry */
  if (!lua_istable(L,-1))  /* not there */
  {  /* must be first time, so add it */
    lua_pop(L,1);  /* remove the result */
    lua_pushstring(L,"SWIG");
    lua_newtable(L);
    lua_rawset(L,LUA_REGISTRYINDEX);
    /* then get it */
    lua_pushstring(L,"SWIG");
    lua_rawget(L,LUA_REGISTRYINDEX);
  }
}

/* helper fn to get the classes metatable from the register */
SWIGINTERN void  SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
{
  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,cname);  /* get the name */
  lua_rawget(L,-2);    /* get it */
  lua_remove(L,-2);    /* tidy up (remove registry) */
}

/* helper add a variable to a registered class */
SWIGINTERN void  SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
{
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_get_table(L,".get"); /* find the .get table */
  assert(lua_istable(L,-1));  /* just in case */
  SWIG_Lua_add_function(L,name,getFn);
  lua_pop(L,1);       /* tidy stack (remove table) */
  if (setFn)
  {
    SWIG_Lua_get_table(L,".set"); /* find the .set table */
    assert(lua_istable(L,-1));  /* just in case */
    SWIG_Lua_add_function(L,name,setFn);
    lua_pop(L,1);       /* tidy stack (remove table) */
  }
}

/* helper to recursively add class static details (static attributes, operations and constants) */
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State* L, swig_lua_class* clss)
{
  int i = 0;
  /* The class namespace table must be on the top of the stack */
  assert(lua_istable(L,-1));
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_static_details(L,clss->bases[i]);
  }

  SWIG_Lua_add_namespace_details(L, &clss->cls_static);
}

/* helper to recursively add class details (attributes & operations) */
SWIGINTERN void  SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
{
  int i;
  /* call all the base classes first: we can then override these later: */
  for(i=0;clss->bases[i];i++)
  {
    SWIG_Lua_add_class_details(L,clss->bases[i]);
  }
  /* add fns */
  for(i=0;clss->attributes[i].name;i++){
    SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
  }
  /* add methods to the metatable */
  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
  assert(lua_istable(L,-1));  /* just in case */
  for(i=0;clss->methods[i].name;i++){
    SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
  }
  lua_pop(L,1);       /* tidy stack (remove table) */
  /*   add operator overloads
    these look ANY method which start with "__" and assume they
    are operator overloads & add them to the metatable
    (this might mess up is someone defines a method __gc (the destructor)*/
  for(i=0;clss->methods[i].name;i++){
    if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
      SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
    }
  }
}

/* set up the base classes pointers.
Each class structure has a list of pointers to the base class structures.
This function fills them.
It cannot be done at compile time, as this will not work with hireachies
spread over more than one swig file. 
Therefore it must be done at runtime, querying the SWIG type system.
*/
SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
{
  int i=0;
  swig_module_info* module=SWIG_GetModule(L);
  for(i=0;clss->base_names[i];i++)
  {
    if (clss->bases[i]==0) /* not found yet */
    {
      /* lookup and cache the base class */
      swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
      if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
    }
  }
}

/* Register class static methods,attributes etc as well as constructor proxy */
SWIGINTERN void SWIG_Lua_class_register_static(lua_State* L, swig_lua_class* clss)
{
  lua_checkstack(L,5); /* just in case */
  assert(lua_istable(L,-1));  /* just in case */
  assert(strcmp(clss->name, clss->cls_static.name) == 0); /* in class those 2 must be equal */

  SWIG_Lua_namespace_register(L,&clss->cls_static);

  SWIG_Lua_get_table(L,clss->name); // Get namespace table back
  assert(lua_istable(L,-1)); /* just in case */

  /*  add its constructor to module with the name of the class
  so you can do MyClass(...) as well as new_MyClass(...)
  BUT only if a constructor is defined
  (this overcomes the problem of pure virtual classes without constructors)*/
  if (clss->constructor)
  {
    SWIG_Lua_add_function(L,".constructor", clss->constructor);
    lua_getmetatable(L,-1);
    assert(lua_istable(L,-1)); /* just in case */
    SWIG_Lua_add_function(L,"__call", SWIG_Lua_constructor_proxy);
    lua_pop(L,1);
  }

  assert(lua_istable(L,-1)); /* just in case */
  SWIG_Lua_add_class_static_details(L, clss);

  /* clear stack */
  lua_pop(L,1);
}

/* performs the entire class registration process */
SWIGINTERN void  SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
{
  SWIG_Lua_class_register_static(L,clss);

  SWIG_Lua_get_class_registry(L);  /* get the registry */
  lua_pushstring(L,clss->name);  /* get the name */
  lua_newtable(L);    /* create the metatable */
  /* add string of class name called ".type" */
  lua_pushstring(L,".type");
  lua_pushstring(L,clss->name);
  lua_rawset(L,-3);
  /* add a table called ".get" */
  lua_pushstring(L,".get");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".set" */
  lua_pushstring(L,".set");
  lua_newtable(L);
  lua_rawset(L,-3);
  /* add a table called ".fn" */
  lua_pushstring(L,".fn");
  lua_newtable(L);
  /* add manual disown method */
  SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
  lua_rawset(L,-3);
  /* add accessor fns for using the .get,.set&.fn */
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
  /* add tostring method for better output */
  SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
  /* add it */
  lua_rawset(L,-3);  /* metatable into registry */
  lua_pop(L,1);      /* tidy stack (remove registry) */

  SWIG_Lua_get_class_metatable(L,clss->name);
  SWIG_Lua_add_class_details(L,clss);  /* recursive adding of details (atts & ops) */
  lua_pop(L,1);      /* tidy stack (remove class metatable) */
}

/* -----------------------------------------------------------------------------
 * Class/structure conversion fns
 * ----------------------------------------------------------------------------- */

/* helper to add metatable to new lua object */
SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
{
  if (type->clientdata)  /* there is clientdata: so add the metatable */
  {
    SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
    if (lua_istable(L,-1))
    {
      lua_setmetatable(L,-2);
    }
    else
    {
      lua_pop(L,1);
    }
  }
}

/* pushes a new object into the lua stack */
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
{
  swig_lua_userdata* usr;
  if (!ptr){
    lua_pushnil(L);
    return;
  }
  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata));  /* get data */
  usr->ptr=ptr;  /* set the ptr */
  usr->type=type;
  usr->own=own;
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
#endif
}

/* takes a object from the lua stack & converts it into an object of the correct type
 (if possible) */
SWIGRUNTIME int  SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
{
  swig_lua_userdata* usr;
  swig_cast_info *cast;
  if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;}    /* special case: lua nil => NULL pointer */
  usr=(swig_lua_userdata*)lua_touserdata(L,index);  /* get data */
  if (usr)
  {
    if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
    {
        usr->own=0;
    }
    if (!type)            /* special cast void*, no casting fn */
    {
      *ptr=usr->ptr;
      return SWIG_OK; /* ok */
    }
    cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
    if (cast)
    {
      int newmemory = 0;
      *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
      return SWIG_OK;  /* ok */
    }
  }
  return SWIG_ERROR;  /* error */
}

SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
       int argnum,const char* func_name){
  void* result;
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
    luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
		func_name,(type && type->str)?type->str:"void*",argnum);
  }
  return result;
}

/* pushes a packed userdata. user for member fn pointers only */
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  assert(ptr); /* not acceptable to pass in a NULL value */
  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size);  /* alloc data */
  raw->type=type;
  raw->own=0;
  memcpy(raw->data,ptr,size); /* copy the data */
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
}
    
/* converts a packed userdata. user for member fn pointers only */
SWIGRUNTIME int  SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
{
  swig_lua_rawdata* raw;
  raw=(swig_lua_rawdata*)lua_touserdata(L,index);  /* get data */
  if (!raw) return SWIG_ERROR;  /* error */
  if (type==0 || type==raw->type) /* void* or identical type */
  {
    memcpy(ptr,raw->data,size); /* copy it */
    return SWIG_OK; /* ok */
  }
  return SWIG_ERROR;  /* error */
}

/* a function to get the typestring of a piece of data */
SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
{
  swig_lua_userdata* usr;
  if (lua_isuserdata(L,tp))
  {
    usr=(swig_lua_userdata*)lua_touserdata(L,tp);  /* get data */
    if (usr && usr->type && usr->type->str)
      return usr->type->str;
    return "userdata (unknown type)";
  }
  return lua_typename(L,lua_type(L,tp));
}

/* lua callable function to get the userdata's type */
SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
{
  lua_pushstring(L,SWIG_Lua_typename(L,1));
  return 1;
}

/* lua callable function to compare userdata's value
the issue is that two userdata may point to the same thing
but to lua, they are different objects */
SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
{
  int result;
  swig_lua_userdata *usr1,*usr2;
  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2))  /* just in case */
    return 0;  /* nil reply */
  usr1=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
  usr2=(swig_lua_userdata*)lua_touserdata(L,2);  /* get data */
  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
  result=(usr1->ptr==usr2->ptr);
   lua_pushboolean(L,result);
  return 1;
}

/* -----------------------------------------------------------------------------
 * global variable support code: class/struct typemap functions
 * ----------------------------------------------------------------------------- */

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
/* Install Constants */
SWIGINTERN void
SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
  int i;
  for (i = 0; constants[i].type; i++) {
    switch(constants[i].type) {
    case SWIG_LUA_INT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_FLOAT:
      lua_pushstring(L,constants[i].name);
      lua_pushnumber(L,(lua_Number)constants[i].dvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_CHAR:
      lua_pushstring(L,constants[i].name);
      lua_pushfstring(L,"%c",(char)constants[i].lvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_STRING:
      lua_pushstring(L,constants[i].name);
      lua_pushstring(L,(char *) constants[i].pvalue);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_POINTER:
      lua_pushstring(L,constants[i].name);
      SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
      lua_rawset(L,-3);
      break;
    case SWIG_LUA_BINARY:
      lua_pushstring(L,constants[i].name);
      SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
      lua_rawset(L,-3);
      break;
    default:
      break;
    }
  }
}
#endif

/* -----------------------------------------------------------------------------
 * executing lua code from within the wrapper
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
#endif
/* Executes a C string in Lua which is a really simple way of calling lua from C
Unfortunately lua keeps changing its APIs, so we need a conditional compile
In lua 5.0.X its lua_dostring()
In lua 5.1.X its luaL_dostring()
*/
SWIGINTERN int 
SWIG_Lua_dostring(lua_State *L, const char* str) {
  int ok,top;
  if (str==0 || str[0]==0) return 0; /* nothing to do */
  top=lua_gettop(L); /* save stack */
#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
  ok=luaL_dostring(L,str);	/* looks like this is lua 5.1.X or later, good */
#else
  ok=lua_dostring(L,str);	/* might be lua 5.0.x, using lua_dostring */
#endif
  if (ok!=0) {
    SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
  }
  lua_settop(L,top); /* restore the stack */
  return ok;
}    

#ifdef __cplusplus
}
#endif

/* ------------------------------ end luarun.swg  ------------------------------ */


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_Accelerometer swig_types[0]
#define SWIGTYPE_p_Actor swig_types[1]
#define SWIGTYPE_p_AngelSampleHandle swig_types[2]
#define SWIGTYPE_p_AngelSoundHandle swig_types[3]
#define SWIGTYPE_p_Camera swig_types[4]
#define SWIGTYPE_p_Color swig_types[5]
#define SWIGTYPE_p_CompoundLog swig_types[6]
#define SWIGTYPE_p_Console swig_types[7]
#define SWIGTYPE_p_ConsoleLog swig_types[8]
#define SWIGTYPE_p_Controller swig_types[9]
#define SWIGTYPE_p_ControllerInput swig_types[10]
#define SWIGTYPE_p_ControllerManager swig_types[11]
#define SWIGTYPE_p_DeveloperLog swig_types[12]
#define SWIGTYPE_p_FileLog swig_types[13]
#define SWIGTYPE_p_FullScreenActor swig_types[14]
#define SWIGTYPE_p_GLint swig_types[15]
#define SWIGTYPE_p_GestureData swig_types[16]
#define SWIGTYPE_p_GridActor swig_types[17]
#define SWIGTYPE_p_HUDActor swig_types[18]
#define SWIGTYPE_p_MathUtil swig_types[19]
#define SWIGTYPE_p_Message swig_types[20]
#define SWIGTYPE_p_MessageListener swig_types[21]
#define SWIGTYPE_p_MouseListener swig_types[22]
#define SWIGTYPE_p_ParticleActor swig_types[23]
#define SWIGTYPE_p_PhysicsActor swig_types[24]
#define SWIGTYPE_p_Preferences swig_types[25]
#define SWIGTYPE_p_Renderable swig_types[26]
#define SWIGTYPE_p_SoundDevice swig_types[27]
#define SWIGTYPE_p_Switchboard swig_types[28]
#define SWIGTYPE_p_SystemLog swig_types[29]
#define SWIGTYPE_p_TagCollection swig_types[30]
#define SWIGTYPE_p_TextActor swig_types[31]
#define SWIGTYPE_p_Touch swig_types[32]
#define SWIGTYPE_p_TouchListener swig_types[33]
#define SWIGTYPE_p_Tuning swig_types[34]
#define SWIGTYPE_p_TypedMessageT_Vec2i_t swig_types[35]
#define SWIGTYPE_p_TypedMessageT_Vec2ui_t swig_types[36]
#define SWIGTYPE_p_TypedMessageT_Vec3i_t swig_types[37]
#define SWIGTYPE_p_TypedMessageT_Vec3ui_t swig_types[38]
#define SWIGTYPE_p_TypedMessageT_Vector2_t swig_types[39]
#define SWIGTYPE_p_TypedMessageT_Vector3_t swig_types[40]
#define SWIGTYPE_p_TypedMessageT_float_t swig_types[41]
#define SWIGTYPE_p_TypedMessageT_int_t swig_types[42]
#define SWIGTYPE_p_TypedMessageT_std__string_t swig_types[43]
#define SWIGTYPE_p_Vec2i swig_types[44]
#define SWIGTYPE_p_Vec2ui swig_types[45]
#define SWIGTYPE_p_Vec3i swig_types[46]
#define SWIGTYPE_p_Vec3ui swig_types[47]
#define SWIGTYPE_p_Vector2 swig_types[48]
#define SWIGTYPE_p_Vector2List swig_types[49]
#define SWIGTYPE_p_Vector3 swig_types[50]
#define SWIGTYPE_p_World swig_types[51]
#define SWIGTYPE_p_std__setT_Actor_p_t swig_types[52]
#define SWIGTYPE_p_std__setT_MessageListener_p_t swig_types[53]
#define SWIGTYPE_p_std__setT_std__string_t swig_types[54]
#define SWIGTYPE_p_std__string swig_types[55]
#define SWIGTYPE_p_std__vectorT_Actor_p_t swig_types[56]
#define SWIGTYPE_p_std__vectorT_Touch_p_t swig_types[57]
#define SWIGTYPE_p_std__vectorT_Vec3ui_t swig_types[58]
#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[59]
#define SWIGTYPE_p_void swig_types[60]
static swig_type_info *swig_types[62];
static swig_module_info swig_module = {swig_types, 61, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_name      "angel"
#define SWIG_init      luaopen_angel
#define SWIG_init_user luaopen_angel_user

#define SWIG_LUACODE   luaopen_angel_luacode

namespace swig {
typedef struct{} LANGUAGE_OBJ;
}


#define SWIGVERSION 0x020011 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 


#include <string>


SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
  int ret = lua_isstring(L, idx);
  if (!ret)
   ret = lua_isnil(L, idx);
  return ret;
}


#include "../../Infrastructure/Vector2.h"
#include "../../Infrastructure/Vector3.h"
#include "../../Infrastructure/VecStructs.h"


#include "../../Infrastructure/Color.h"


#include "../../Messaging/Switchboard.h"
#include "../../Messaging/Message.h"


#include "../../Infrastructure/Renderable.h"


#include "../../Infrastructure/World.h"


#include "../../Infrastructure/Log.h"


#include "../../Infrastructure/TuningVariable.h"


#include "../../Infrastructure/Preferences.h"


#include "../../Infrastructure/SoundDevice.h"


#include "../../Scripting/LuaConsole.h"


#include "../../Input/Controller.h"


#include "../../Input/MouseInput.h"


#include "../../Input/MultiTouch.h"


#include "../../Actors/Actor.h"
#include "../../Infrastructure/TagCollection.h"


#include "../../Infrastructure/Camera.h"


#include "../../Actors/PhysicsActor.h"


#include "../../Actors/ParticleActor.h"


#include "../../Actors/TextActor.h"


#include "../../Actors/GridActor.h"
#include "../../Actors/FullScreenActor.h"
#include "../../Actors/HUDActor.h"


#include "../../Infrastructure/Textures.h"


//#include "../../../ClientGame/<INCLUDE_HEADER.H>"

#ifdef __cplusplus
extern "C" {
#endif
static int _wrap_new_string__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  std::string *result = 0 ;
  
  SWIG_check_num_args("std::string::string",0,0)
  result = (std::string *)new std::string();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_string__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  char *arg1 = (char *) 0 ;
  std::string *result = 0 ;
  
  SWIG_check_num_args("std::string::string",1,1)
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("std::string::string",1,"char const *");
  arg1 = (char *)lua_tostring(L, 1);
  result = (std::string *)new std::string((char const *)arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__string,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_string(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_string__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = SWIG_lua_isnilstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_string__SWIG_1(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_string'\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::string::string()\n"
    "    std::string::string(char const *)\n");
  lua_error(L);return 0;
}


static int _wrap_string_size(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::string::size",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::size",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_size",1,SWIGTYPE_p_std__string);
  }
  
  result = (unsigned int)((std::string const *)arg1)->size();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_length(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("std::string::length",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::length",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_length",1,SWIGTYPE_p_std__string);
  }
  
  result = (unsigned int)((std::string const *)arg1)->length();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_empty(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  bool result;
  
  SWIG_check_num_args("std::string::empty",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::empty",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_empty",1,SWIGTYPE_p_std__string);
  }
  
  result = (bool)((std::string const *)arg1)->empty();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_c_str(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("std::string::c_str",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::c_str",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_c_str",1,SWIGTYPE_p_std__string);
  }
  
  result = (char *)((std::string const *)arg1)->c_str();
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_data(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *result = 0 ;
  
  SWIG_check_num_args("std::string::data",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::data",1,"std::string const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_data",1,SWIGTYPE_p_std__string);
  }
  
  result = (char *)((std::string const *)arg1)->data();
  lua_pushstring(L,(const char *)result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_string_assign(lua_State* L) {
  int SWIG_arg = 0;
  std::string *arg1 = (std::string *) 0 ;
  char *arg2 = (char *) 0 ;
  
  SWIG_check_num_args("std::string::assign",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("std::string::assign",1,"std::string *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("std::string::assign",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_std__string,0))){
    SWIG_fail_ptr("string_assign",1,SWIGTYPE_p_std__string);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  (arg1)->assign((char const *)arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_string(void *obj) {
std::string *arg1 = (std::string *) obj;
delete arg1;
}
static swig_lua_method swig_std_string_methods[] = {
    {"size", _wrap_string_size}, 
    {"length", _wrap_string_length}, 
    {"empty", _wrap_string_empty}, 
    {"c_str", _wrap_string_c_str}, 
    {"data", _wrap_string_data}, 
    {"assign", _wrap_string_assign}, 
    {0,0}
};
static swig_lua_attribute swig_std_string_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_std_string_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_std_string_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_std_string_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_std_string_bases[] = {0};
static const char *swig_std_string_base_names[] = {0};
static swig_lua_class _wrap_class_std_string = { "string", &SWIGTYPE_p_std__string,_wrap_new_string, swig_delete_string, swig_std_string_methods, swig_std_string_attributes, { "string", swig_std_string_cls_methods, swig_std_string_cls_attributes, swig_std_string_cls_constants }, swig_std_string_bases, swig_std_string_base_names };

static int _wrap_Vec2i_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = (Vec2i *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Vec2i::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2i::X",1,"Vec2i *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2i::X",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Vec2i_X_set",1,SWIGTYPE_p_Vec2i);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2i_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = (Vec2i *) 0 ;
  int result;
  
  SWIG_check_num_args("Vec2i::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2i::X",1,"Vec2i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Vec2i_X_get",1,SWIGTYPE_p_Vec2i);
  }
  
  result = (int) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2i_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = (Vec2i *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Vec2i::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2i::Y",1,"Vec2i *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2i::Y",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Vec2i_Y_set",1,SWIGTYPE_p_Vec2i);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2i_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = (Vec2i *) 0 ;
  int result;
  
  SWIG_check_num_args("Vec2i::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2i::Y",1,"Vec2i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Vec2i_Y_get",1,SWIGTYPE_p_Vec2i);
  }
  
  result = (int) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2i__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  Vec2i *result = 0 ;
  
  SWIG_check_num_args("Vec2i::Vec2i",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vec2i::Vec2i",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2i::Vec2i",2,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  result = (Vec2i *)new Vec2i(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2i,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2i__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *result = 0 ;
  
  SWIG_check_num_args("Vec2i::Vec2i",0,0)
  result = (Vec2i *)new Vec2i();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2i,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2i(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vec2i__SWIG_1(L);
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_Vec2i__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec2i'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vec2i::Vec2i(int,int)\n"
    "    Vec2i::Vec2i()\n");
  lua_error(L);return 0;
}


static int _wrap_Vec2i___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = (Vec2i *) 0 ;
  Vec2i *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vec2i::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2i::operator ==",1,"Vec2i const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Vec2i___eq",1,SWIGTYPE_p_Vec2i);
  }
  
  {
    // const Vec2i& conversion
    Vec2i *vecPtr;
    Vec2i vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (bool)((Vec2i const *)arg1)->operator ==((Vec2i const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec2i(void *obj) {
Vec2i *arg1 = (Vec2i *) obj;
delete arg1;
}
static swig_lua_method swig_Vec2i_methods[] = {
    {"__eq", _wrap_Vec2i___eq}, 
    {0,0}
};
static swig_lua_attribute swig_Vec2i_attributes[] = {
    { "X", _wrap_Vec2i_X_get, _wrap_Vec2i_X_set},
    { "Y", _wrap_Vec2i_Y_get, _wrap_Vec2i_Y_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vec2i_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Vec2i_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Vec2i_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vec2i_bases[] = {0};
static const char *swig_Vec2i_base_names[] = {0};
static swig_lua_class _wrap_class_Vec2i = { "Vec2i", &SWIGTYPE_p_Vec2i,_wrap_new_Vec2i, swig_delete_Vec2i, swig_Vec2i_methods, swig_Vec2i_attributes, { "Vec2i", swig_Vec2i_cls_methods, swig_Vec2i_cls_attributes, swig_Vec2i_cls_constants }, swig_Vec2i_bases, swig_Vec2i_base_names };

static int _wrap_Vec2ui_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *arg1 = (Vec2ui *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Vec2ui::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2ui::X",1,"Vec2ui *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2ui::X",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2ui,0))){
    SWIG_fail_ptr("Vec2ui_X_set",1,SWIGTYPE_p_Vec2ui);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2ui_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *arg1 = (Vec2ui *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Vec2ui::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2ui::X",1,"Vec2ui *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2ui,0))){
    SWIG_fail_ptr("Vec2ui_X_get",1,SWIGTYPE_p_Vec2ui);
  }
  
  result = (unsigned int) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2ui_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *arg1 = (Vec2ui *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Vec2ui::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2ui::Y",1,"Vec2ui *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2ui::Y",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2ui,0))){
    SWIG_fail_ptr("Vec2ui_Y_set",1,SWIGTYPE_p_Vec2ui);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec2ui_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *arg1 = (Vec2ui *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Vec2ui::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2ui::Y",1,"Vec2ui *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2ui,0))){
    SWIG_fail_ptr("Vec2ui_Y_get",1,SWIGTYPE_p_Vec2ui);
  }
  
  result = (unsigned int) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2ui__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  unsigned int arg2 ;
  Vec2ui *result = 0 ;
  
  SWIG_check_num_args("Vec2ui::Vec2ui",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vec2ui::Vec2ui",1,"unsigned int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec2ui::Vec2ui",2,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  result = (Vec2ui *)new Vec2ui(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2ui,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2ui__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *result = 0 ;
  
  SWIG_check_num_args("Vec2ui::Vec2ui",0,0)
  result = (Vec2ui *)new Vec2ui();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2ui,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2ui(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vec2ui__SWIG_1(L);
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_Vec2ui__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec2ui'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vec2ui::Vec2ui(unsigned int,unsigned int)\n"
    "    Vec2ui::Vec2ui()\n");
  lua_error(L);return 0;
}


static int _wrap_Vec2ui___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vec2ui *arg1 = (Vec2ui *) 0 ;
  Vec2ui *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vec2ui::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec2ui::operator ==",1,"Vec2ui const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec2ui,0))){
    SWIG_fail_ptr("Vec2ui___eq",1,SWIGTYPE_p_Vec2ui);
  }
  
  {
    // cosnt Vec2ui& conversion
    Vec2ui *vecPtr;
    Vec2ui vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2ui,0)))
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (bool)((Vec2ui const *)arg1)->operator ==((Vec2ui const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec2ui(void *obj) {
Vec2ui *arg1 = (Vec2ui *) obj;
delete arg1;
}
static swig_lua_method swig_Vec2ui_methods[] = {
    {"__eq", _wrap_Vec2ui___eq}, 
    {0,0}
};
static swig_lua_attribute swig_Vec2ui_attributes[] = {
    { "X", _wrap_Vec2ui_X_get, _wrap_Vec2ui_X_set},
    { "Y", _wrap_Vec2ui_Y_get, _wrap_Vec2ui_Y_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vec2ui_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Vec2ui_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Vec2ui_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vec2ui_bases[] = {0};
static const char *swig_Vec2ui_base_names[] = {0};
static swig_lua_class _wrap_class_Vec2ui = { "Vec2ui", &SWIGTYPE_p_Vec2ui,_wrap_new_Vec2ui, swig_delete_Vec2ui, swig_Vec2ui_methods, swig_Vec2ui_attributes, { "Vec2ui", swig_Vec2ui_cls_methods, swig_Vec2ui_cls_attributes, swig_Vec2ui_cls_constants }, swig_Vec2ui_bases, swig_Vec2ui_base_names };

static int _wrap_Vec3i_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Vec3i::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::X",1,"Vec3i *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3i::X",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_X_set",1,SWIGTYPE_p_Vec3i);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3i_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int result;
  
  SWIG_check_num_args("Vec3i::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::X",1,"Vec3i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_X_get",1,SWIGTYPE_p_Vec3i);
  }
  
  result = (int) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3i_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Vec3i::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::Y",1,"Vec3i *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3i::Y",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_Y_set",1,SWIGTYPE_p_Vec3i);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3i_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int result;
  
  SWIG_check_num_args("Vec3i::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::Y",1,"Vec3i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_Y_get",1,SWIGTYPE_p_Vec3i);
  }
  
  result = (int) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3i_Z_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Vec3i::Z",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::Z",1,"Vec3i *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3i::Z",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_Z_set",1,SWIGTYPE_p_Vec3i);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Z = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3i_Z_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  int result;
  
  SWIG_check_num_args("Vec3i::Z",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::Z",1,"Vec3i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i_Z_get",1,SWIGTYPE_p_Vec3i);
  }
  
  result = (int) ((arg1)->Z);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3i__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  Vec3i *result = 0 ;
  
  SWIG_check_num_args("Vec3i::Vec3i",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vec3i::Vec3i",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3i::Vec3i",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Vec3i::Vec3i",3,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  result = (Vec3i *)new Vec3i(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec3i,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3i__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *result = 0 ;
  
  SWIG_check_num_args("Vec3i::Vec3i",0,0)
  result = (Vec3i *)new Vec3i();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec3i,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3i(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vec3i__SWIG_1(L);
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_Vec3i__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec3i'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vec3i::Vec3i(int,int,int)\n"
    "    Vec3i::Vec3i()\n");
  lua_error(L);return 0;
}


static int _wrap_Vec3i___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vec3i *arg1 = (Vec3i *) 0 ;
  Vec3i *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vec3i::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3i::operator ==",1,"Vec3i const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3i,0))){
    SWIG_fail_ptr("Vec3i___eq",1,SWIGTYPE_p_Vec3i);
  }
  
  {
    // const Vec3i& conversion
    Vec3i *vecPtr;
    Vec3i vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3i,0)))
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (bool)((Vec3i const *)arg1)->operator ==((Vec3i const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec3i(void *obj) {
Vec3i *arg1 = (Vec3i *) obj;
delete arg1;
}
static swig_lua_method swig_Vec3i_methods[] = {
    {"__eq", _wrap_Vec3i___eq}, 
    {0,0}
};
static swig_lua_attribute swig_Vec3i_attributes[] = {
    { "X", _wrap_Vec3i_X_get, _wrap_Vec3i_X_set},
    { "Y", _wrap_Vec3i_Y_get, _wrap_Vec3i_Y_set},
    { "Z", _wrap_Vec3i_Z_get, _wrap_Vec3i_Z_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vec3i_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Vec3i_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Vec3i_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vec3i_bases[] = {0};
static const char *swig_Vec3i_base_names[] = {0};
static swig_lua_class _wrap_class_Vec3i = { "Vec3i", &SWIGTYPE_p_Vec3i,_wrap_new_Vec3i, swig_delete_Vec3i, swig_Vec3i_methods, swig_Vec3i_attributes, { "Vec3i", swig_Vec3i_cls_methods, swig_Vec3i_cls_attributes, swig_Vec3i_cls_constants }, swig_Vec3i_bases, swig_Vec3i_base_names };

static int _wrap_Vec3ui_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Vec3ui::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::X",1,"Vec3ui *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3ui::X",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_X_set",1,SWIGTYPE_p_Vec3ui);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3ui_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Vec3ui::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::X",1,"Vec3ui *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_X_get",1,SWIGTYPE_p_Vec3ui);
  }
  
  result = (unsigned int) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3ui_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Vec3ui::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::Y",1,"Vec3ui *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3ui::Y",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_Y_set",1,SWIGTYPE_p_Vec3ui);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3ui_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Vec3ui::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::Y",1,"Vec3ui *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_Y_get",1,SWIGTYPE_p_Vec3ui);
  }
  
  result = (unsigned int) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3ui_Z_set(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Vec3ui::Z",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::Z",1,"Vec3ui *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3ui::Z",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_Z_set",1,SWIGTYPE_p_Vec3ui);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Z = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vec3ui_Z_get(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Vec3ui::Z",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::Z",1,"Vec3ui *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui_Z_get",1,SWIGTYPE_p_Vec3ui);
  }
  
  result = (unsigned int) ((arg1)->Z);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3ui__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  unsigned int arg1 ;
  unsigned int arg2 ;
  unsigned int arg3 ;
  Vec3ui *result = 0 ;
  
  SWIG_check_num_args("Vec3ui::Vec3ui",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vec3ui::Vec3ui",1,"unsigned int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vec3ui::Vec3ui",2,"unsigned int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Vec3ui::Vec3ui",3,"unsigned int");
  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
  arg1 = (unsigned int)lua_tonumber(L, 1);
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  SWIG_contract_assert((lua_tonumber(L,3)>=0),"number must not be negative")
  arg3 = (unsigned int)lua_tonumber(L, 3);
  result = (Vec3ui *)new Vec3ui(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec3ui,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3ui__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *result = 0 ;
  
  SWIG_check_num_args("Vec3ui::Vec3ui",0,0)
  result = (Vec3ui *)new Vec3ui();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec3ui,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3ui(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vec3ui__SWIG_1(L);
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_Vec3ui__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec3ui'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vec3ui::Vec3ui(unsigned int,unsigned int,unsigned int)\n"
    "    Vec3ui::Vec3ui()\n");
  lua_error(L);return 0;
}


static int _wrap_Vec3ui___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vec3ui *arg1 = (Vec3ui *) 0 ;
  Vec3ui *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vec3ui::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vec3ui::operator ==",1,"Vec3ui const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vec3ui,0))){
    SWIG_fail_ptr("Vec3ui___eq",1,SWIGTYPE_p_Vec3ui);
  }
  
  {
    // const Vec3ui& conversion
    Vec3ui *vecPtr;
    Vec3ui vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3ui,0)))
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      unsigned int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (bool)((Vec3ui const *)arg1)->operator ==((Vec3ui const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec3ui(void *obj) {
Vec3ui *arg1 = (Vec3ui *) obj;
delete arg1;
}
static swig_lua_method swig_Vec3ui_methods[] = {
    {"__eq", _wrap_Vec3ui___eq}, 
    {0,0}
};
static swig_lua_attribute swig_Vec3ui_attributes[] = {
    { "X", _wrap_Vec3ui_X_get, _wrap_Vec3ui_X_set},
    { "Y", _wrap_Vec3ui_Y_get, _wrap_Vec3ui_Y_set},
    { "Z", _wrap_Vec3ui_Z_get, _wrap_Vec3ui_Z_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vec3ui_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Vec3ui_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Vec3ui_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vec3ui_bases[] = {0};
static const char *swig_Vec3ui_base_names[] = {0};
static swig_lua_class _wrap_class_Vec3ui = { "Vec3ui", &SWIGTYPE_p_Vec3ui,_wrap_new_Vec3ui, swig_delete_Vec3ui, swig_Vec3ui_methods, swig_Vec3ui_attributes, { "Vec3ui", swig_Vec3ui_cls_methods, swig_Vec3ui_cls_attributes, swig_Vec3ui_cls_constants }, swig_Vec3ui_bases, swig_Vec3ui_base_names };

static int _wrap_Vector2_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Vector2::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::X",1,"Vector2 *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::X",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_X_set",1,SWIGTYPE_p_Vector2);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::X",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_X_get",1,SWIGTYPE_p_Vector2);
  }
  
  result = (float) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Vector2::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::Y",1,"Vector2 *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::Y",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_Y_set",1,SWIGTYPE_p_Vector2);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::Y",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_Y_get",1,SWIGTYPE_p_Vector2);
  }
  
  result = (float) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Zero_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  
  SWIG_check_num_args("Vector2::Zero",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::Zero",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_Zero_set",1,SWIGTYPE_p_Vector2);
  }
  
  Vector2::Zero = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Zero_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::Zero",0,0)
  result = (Vector2 *)&Vector2::Zero;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_One_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  
  SWIG_check_num_args("Vector2::One",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::One",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_One_set",1,SWIGTYPE_p_Vector2);
  }
  
  Vector2::One = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_One_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::One",0,0)
  result = (Vector2 *)&Vector2::One;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_UnitX_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  
  SWIG_check_num_args("Vector2::UnitX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::UnitX",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_UnitX_set",1,SWIGTYPE_p_Vector2);
  }
  
  Vector2::UnitX = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_UnitX_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::UnitX",0,0)
  result = (Vector2 *)&Vector2::UnitX;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_UnitY_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  
  SWIG_check_num_args("Vector2::UnitY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::UnitY",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_UnitY_set",1,SWIGTYPE_p_Vector2);
  }
  
  Vector2::UnitY = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_UnitY_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::UnitY",0,0)
  result = (Vector2 *)&Vector2::UnitY;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::Vector2",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vector2::Vector2",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::Vector2",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (Vector2 *)new Vector2(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::Vector2",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vector2::Vector2",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (Vector2 *)new Vector2(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Vector2::Vector2",0,0)
  result = (Vector2 *)new Vector2();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vector2__SWIG_2(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_Vector2__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_Vector2__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vector2'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vector2::Vector2(float,float)\n"
    "    Vector2::Vector2(float)\n"
    "    Vector2::Vector2()\n");
  lua_error(L);return 0;
}


static int _wrap_Vector2_Length(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::Length",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::Length",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_Length",1,SWIGTYPE_p_Vector2);
  }
  
  result = (float)(arg1)->Length();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_LengthSquared(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::LengthSquared",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::LengthSquared",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_LengthSquared",1,SWIGTYPE_p_Vector2);
  }
  
  result = (float)(arg1)->LengthSquared();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Distance(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::Distance",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (float)Vector2::Distance((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_DistanceSquared(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::DistanceSquared",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (float)Vector2::DistanceSquared((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Dot(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector2::Dot",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (float)Vector2::Dot((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Normalize(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  
  SWIG_check_num_args("Vector2::Normalize",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::Normalize",1,"Vector2 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2_Normalize",1,SWIGTYPE_p_Vector2);
  }
  
  (arg1)->Normalize();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Reflect(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Reflect",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = Vector2::Reflect((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Min(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Min",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = Vector2::Min((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Max(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Max",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = Vector2::Max((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Clamp(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Clamp",3,3)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  result = Vector2::Clamp((Vector2 const &)*arg1,(Vector2 const &)*arg2,(Vector2 const &)*arg3);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Lerp(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Lerp",3,3)
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Vector2::Lerp",3,"float");
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  result = Vector2::Lerp((Vector2 const &)*arg1,(Vector2 const &)*arg2,arg3);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Negate(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Negate",1,1)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  result = Vector2::Negate((Vector2 const &)*arg1);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2_Rotate(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  float arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::Rotate",2,2)
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::Rotate",2,"float");
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  arg2 = (float)lua_tonumber(L, 2);
  result = Vector2::Rotate((Vector2 const &)*arg1,arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  Vector2 *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vector2::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator ==",1,"Vector2 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___eq",1,SWIGTYPE_p_Vector2);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (bool)((Vector2 const *)arg1)->operator ==((Vector2 const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___unm(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::operator -",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator -",1,"Vector2 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___unm",1,SWIGTYPE_p_Vector2);
  }
  
  result = ((Vector2 const *)arg1)->operator -();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___sub(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::operator -",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator -",1,"Vector2 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___sub",1,SWIGTYPE_p_Vector2);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = ((Vector2 const *)arg1)->operator -((Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___add(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::operator +",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator +",1,"Vector2 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___add",1,SWIGTYPE_p_Vector2);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = ((Vector2 const *)arg1)->operator +((Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___div(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::operator /",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator /",1,"Vector2 const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::operator /",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___div",1,SWIGTYPE_p_Vector2);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Vector2 const *)arg1)->operator /(arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector2___mul(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = (Vector2 *) 0 ;
  float arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("Vector2::operator *",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector2::operator *",1,"Vector2 const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector2::operator *",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Vector2___mul",1,SWIGTYPE_p_Vector2);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Vector2 const *)arg1)->operator *(arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vector2(void *obj) {
Vector2 *arg1 = (Vector2 *) obj;
delete arg1;
}
static swig_lua_method swig_Vector2_methods[] = {
    {"Length", _wrap_Vector2_Length}, 
    {"LengthSquared", _wrap_Vector2_LengthSquared}, 
    {"Normalize", _wrap_Vector2_Normalize}, 
    {"__eq", _wrap_Vector2___eq}, 
    {"__unm", _wrap_Vector2___unm}, 
    {"__sub", _wrap_Vector2___sub}, 
    {"__add", _wrap_Vector2___add}, 
    {"__div", _wrap_Vector2___div}, 
    {"__mul", _wrap_Vector2___mul}, 
    {0,0}
};
static swig_lua_attribute swig_Vector2_attributes[] = {
    { "X", _wrap_Vector2_X_get, _wrap_Vector2_X_set},
    { "Y", _wrap_Vector2_Y_get, _wrap_Vector2_Y_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vector2_cls_attributes[] = {
    { "Zero", _wrap_Vector2_Zero_get, _wrap_Vector2_Zero_set},
    { "One", _wrap_Vector2_One_get, _wrap_Vector2_One_set},
    { "UnitX", _wrap_Vector2_UnitX_get, _wrap_Vector2_UnitX_set},
    { "UnitY", _wrap_Vector2_UnitY_get, _wrap_Vector2_UnitY_set},
    {0,0,0}
};
static swig_lua_method swig_Vector2_cls_methods[] = {
    {"Distance", _wrap_Vector2_Distance}, 
    {"DistanceSquared", _wrap_Vector2_DistanceSquared}, 
    {"Dot", _wrap_Vector2_Dot}, 
    {"Reflect", _wrap_Vector2_Reflect}, 
    {"Min", _wrap_Vector2_Min}, 
    {"Max", _wrap_Vector2_Max}, 
    {"Clamp", _wrap_Vector2_Clamp}, 
    {"Lerp", _wrap_Vector2_Lerp}, 
    {"Negate", _wrap_Vector2_Negate}, 
    {"Rotate", _wrap_Vector2_Rotate}, 
    {0,0}
};
static swig_lua_const_info swig_Vector2_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vector2_bases[] = {0};
static const char *swig_Vector2_base_names[] = {0};
static swig_lua_class _wrap_class_Vector2 = { "Vector2", &SWIGTYPE_p_Vector2,_wrap_new_Vector2, swig_delete_Vector2, swig_Vector2_methods, swig_Vector2_attributes, { "Vector2", swig_Vector2_cls_methods, swig_Vector2_cls_attributes, swig_Vector2_cls_constants }, swig_Vector2_bases, swig_Vector2_base_names };

static int _wrap_Vector3_X_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Vector3::X",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::X",1,"Vector3 *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::X",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_X_set",1,SWIGTYPE_p_Vector3);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->X = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_X_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::X",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::X",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_X_get",1,SWIGTYPE_p_Vector3);
  }
  
  result = (float) ((arg1)->X);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Y_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Vector3::Y",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Y",1,"Vector3 *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::Y",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Y_set",1,SWIGTYPE_p_Vector3);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->Y = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Y_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::Y",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Y",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Y_get",1,SWIGTYPE_p_Vector3);
  }
  
  result = (float) ((arg1)->Y);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Z_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Vector3::Z",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Z",1,"Vector3 *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::Z",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Z_set",1,SWIGTYPE_p_Vector3);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->Z = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Z_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::Z",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Z",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Z_get",1,SWIGTYPE_p_Vector3);
  }
  
  result = (float) ((arg1)->Z);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Zero_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::Zero",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Zero",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Zero_set",1,SWIGTYPE_p_Vector3);
  }
  
  Vector3::Zero = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Zero_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::Zero",0,0)
  result = (Vector3 *)&Vector3::Zero;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_One_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::One",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::One",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_One_set",1,SWIGTYPE_p_Vector3);
  }
  
  Vector3::One = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_One_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::One",0,0)
  result = (Vector3 *)&Vector3::One;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitX_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::UnitX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::UnitX",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_UnitX_set",1,SWIGTYPE_p_Vector3);
  }
  
  Vector3::UnitX = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitX_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::UnitX",0,0)
  result = (Vector3 *)&Vector3::UnitX;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitY_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::UnitY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::UnitY",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_UnitY_set",1,SWIGTYPE_p_Vector3);
  }
  
  Vector3::UnitY = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitY_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::UnitY",0,0)
  result = (Vector3 *)&Vector3::UnitY;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitZ_set(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::UnitZ",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::UnitZ",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_UnitZ_set",1,SWIGTYPE_p_Vector3);
  }
  
  Vector3::UnitZ = *arg1;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_UnitZ_get(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::UnitZ",0,0)
  result = (Vector3 *)&Vector3::UnitZ;
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::Vector3",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vector3::Vector3",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::Vector3",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Vector3::Vector3",3,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (Vector3 *)new Vector3(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::Vector3",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Vector3::Vector3",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (Vector3 *)new Vector3(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Vector3::Vector3",0,0)
  result = (Vector3 *)new Vector3();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Vector3__SWIG_2(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_Vector3__SWIG_1(L);
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_Vector3__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vector3'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Vector3::Vector3(float,float,float)\n"
    "    Vector3::Vector3(float)\n"
    "    Vector3::Vector3()\n");
  lua_error(L);return 0;
}


static int _wrap_Vector3_Length(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::Length",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Length",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Length",1,SWIGTYPE_p_Vector3);
  }
  
  result = (float)(arg1)->Length();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_LengthSquared(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::LengthSquared",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::LengthSquared",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_LengthSquared",1,SWIGTYPE_p_Vector3);
  }
  
  result = (float)(arg1)->LengthSquared();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Distance(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::Distance",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (float)Vector3::Distance((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_DistanceSquared(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::DistanceSquared",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (float)Vector3::DistanceSquared((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Dot(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("Vector3::Dot",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (float)Vector3::Dot((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Normalize(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  
  SWIG_check_num_args("Vector3::Normalize",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::Normalize",1,"Vector3 *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3_Normalize",1,SWIGTYPE_p_Vector3);
  }
  
  (arg1)->Normalize();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Reflect(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Reflect",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = Vector3::Reflect((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Min(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Min",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = Vector3::Min((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Max(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Max",2,2)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = Vector3::Max((Vector3 const &)*arg1,(Vector3 const &)*arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Clamp(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 *arg3 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Clamp",3,3)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 3);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg3 = &vec;
    }
  }
  result = Vector3::Clamp((Vector3 const &)*arg1,(Vector3 const &)*arg2,(Vector3 const &)*arg3);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Lerp(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 *arg2 = 0 ;
  float arg3 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Lerp",3,3)
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Vector3::Lerp",3,"float");
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  result = Vector3::Lerp((Vector3 const &)*arg1,(Vector3 const &)*arg2,arg3);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3_Negate(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::Negate",1,1)
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg1 = &vec;
    }
  }
  result = Vector3::Negate((Vector3 const &)*arg1);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___eq(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  Vector3 *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Vector3::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator ==",1,"Vector3 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___eq",1,SWIGTYPE_p_Vector3);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = (bool)((Vector3 const *)arg1)->operator ==((Vector3 const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___unm(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::operator -",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator -",1,"Vector3 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___unm",1,SWIGTYPE_p_Vector3);
  }
  
  result = ((Vector3 const *)arg1)->operator -();
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___sub(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::operator -",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator -",1,"Vector3 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___sub",1,SWIGTYPE_p_Vector3);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = ((Vector3 const *)arg1)->operator -((Vector3 const &)*arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___add(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  Vector3 *arg2 = 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::operator +",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator +",1,"Vector3 const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___add",1,SWIGTYPE_p_Vector3);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  result = ((Vector3 const *)arg1)->operator +((Vector3 const &)*arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___div(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float arg2 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::operator /",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator /",1,"Vector3 const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::operator /",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___div",1,SWIGTYPE_p_Vector3);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Vector3 const *)arg1)->operator /(arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Vector3___mul(lua_State* L) {
  int SWIG_arg = 0;
  Vector3 *arg1 = (Vector3 *) 0 ;
  float arg2 ;
  Vector3 result;
  
  SWIG_check_num_args("Vector3::operator *",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Vector3::operator *",1,"Vector3 const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Vector3::operator *",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Vector3,0))){
    SWIG_fail_ptr("Vector3___mul",1,SWIGTYPE_p_Vector3);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Vector3 const *)arg1)->operator *(arg2);
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vector3(void *obj) {
Vector3 *arg1 = (Vector3 *) obj;
delete arg1;
}
static swig_lua_method swig_Vector3_methods[] = {
    {"Length", _wrap_Vector3_Length}, 
    {"LengthSquared", _wrap_Vector3_LengthSquared}, 
    {"Normalize", _wrap_Vector3_Normalize}, 
    {"__eq", _wrap_Vector3___eq}, 
    {"__unm", _wrap_Vector3___unm}, 
    {"__sub", _wrap_Vector3___sub}, 
    {"__add", _wrap_Vector3___add}, 
    {"__div", _wrap_Vector3___div}, 
    {"__mul", _wrap_Vector3___mul}, 
    {0,0}
};
static swig_lua_attribute swig_Vector3_attributes[] = {
    { "X", _wrap_Vector3_X_get, _wrap_Vector3_X_set},
    { "Y", _wrap_Vector3_Y_get, _wrap_Vector3_Y_set},
    { "Z", _wrap_Vector3_Z_get, _wrap_Vector3_Z_set},
    {0,0,0}
};
static swig_lua_attribute swig_Vector3_cls_attributes[] = {
    { "Zero", _wrap_Vector3_Zero_get, _wrap_Vector3_Zero_set},
    { "One", _wrap_Vector3_One_get, _wrap_Vector3_One_set},
    { "UnitX", _wrap_Vector3_UnitX_get, _wrap_Vector3_UnitX_set},
    { "UnitY", _wrap_Vector3_UnitY_get, _wrap_Vector3_UnitY_set},
    { "UnitZ", _wrap_Vector3_UnitZ_get, _wrap_Vector3_UnitZ_set},
    {0,0,0}
};
static swig_lua_method swig_Vector3_cls_methods[] = {
    {"Distance", _wrap_Vector3_Distance}, 
    {"DistanceSquared", _wrap_Vector3_DistanceSquared}, 
    {"Dot", _wrap_Vector3_Dot}, 
    {"Reflect", _wrap_Vector3_Reflect}, 
    {"Min", _wrap_Vector3_Min}, 
    {"Max", _wrap_Vector3_Max}, 
    {"Clamp", _wrap_Vector3_Clamp}, 
    {"Lerp", _wrap_Vector3_Lerp}, 
    {"Negate", _wrap_Vector3_Negate}, 
    {0,0}
};
static swig_lua_const_info swig_Vector3_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Vector3_bases[] = {0};
static const char *swig_Vector3_base_names[] = {0};
static swig_lua_class _wrap_class_Vector3 = { "Vector3", &SWIGTYPE_p_Vector3,_wrap_new_Vector3, swig_delete_Vector3, swig_Vector3_methods, swig_Vector3_attributes, { "Vector3", swig_Vector3_cls_methods, swig_Vector3_cls_attributes, swig_Vector3_cls_constants }, swig_Vector3_bases, swig_Vector3_base_names };

static int _wrap_Color_R_set(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Color::R",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::R",1,"Color *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::R",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_R_set",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->R = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_R_get(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float result;
  
  SWIG_check_num_args("Color::R",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::R",1,"Color *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_R_get",1,SWIGTYPE_p_Color);
  }
  
  result = (float) ((arg1)->R);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_G_set(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Color::G",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::G",1,"Color *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::G",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_G_set",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->G = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_G_get(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float result;
  
  SWIG_check_num_args("Color::G",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::G",1,"Color *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_G_get",1,SWIGTYPE_p_Color);
  }
  
  result = (float) ((arg1)->G);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_B_set(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Color::B",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::B",1,"Color *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::B",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_B_set",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->B = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_B_get(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float result;
  
  SWIG_check_num_args("Color::B",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::B",1,"Color *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_B_get",1,SWIGTYPE_p_Color);
  }
  
  result = (float) ((arg1)->B);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_A_set(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Color::A",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::A",1,"Color *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::A",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_A_set",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->A = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_A_get(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float result;
  
  SWIG_check_num_args("Color::A",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::A",1,"Color *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color_A_get",1,SWIGTYPE_p_Color);
  }
  
  result = (float) ((arg1)->A);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Color__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Color *result = 0 ;
  
  SWIG_check_num_args("Color::Color",0,0)
  result = (Color *)new Color();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Color__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  bool arg5 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("Color::Color",5,5)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::Color",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::Color",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::Color",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Color::Color",4,"float");
  if(!lua_isboolean(L,5)) SWIG_fail_arg("Color::Color",5,"bool");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (lua_toboolean(L, 5)!=0);
  result = (Color *)new Color(arg1,arg2,arg3,arg4,arg5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Color__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("Color::Color",4,4)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::Color",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::Color",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::Color",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Color::Color",4,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  result = (Color *)new Color(arg1,arg2,arg3,arg4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Color__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("Color::Color",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::Color",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::Color",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::Color",3,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (Color *)new Color(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Color(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_Color__SWIG_0(L);
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_Color__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_new_Color__SWIG_2(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isboolean(L,argv[4]);
            }
            if (_v) {
              return _wrap_new_Color__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Color'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Color::Color()\n"
    "    Color::Color(float,float,float,float,bool)\n"
    "    Color::Color(float,float,float,float)\n"
    "    Color::Color(float,float,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Color_FromInts__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  bool arg5 ;
  Color result;
  
  SWIG_check_num_args("Color::FromInts",5,5)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::FromInts",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::FromInts",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::FromInts",3,"int");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Color::FromInts",4,"int");
  if(!lua_isboolean(L,5)) SWIG_fail_arg("Color::FromInts",5,"bool");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  arg5 = (lua_toboolean(L, 5)!=0);
  result = Color::FromInts(arg1,arg2,arg3,arg4,arg5);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_FromInts__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  Color result;
  
  SWIG_check_num_args("Color::FromInts",4,4)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::FromInts",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::FromInts",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::FromInts",3,"int");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Color::FromInts",4,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  result = Color::FromInts(arg1,arg2,arg3,arg4);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_FromInts__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  Color result;
  
  SWIG_check_num_args("Color::FromInts",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("Color::FromInts",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::FromInts",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Color::FromInts",3,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  result = Color::FromInts(arg1,arg2,arg3);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color_FromInts(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Color_FromInts__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Color_FromInts__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isboolean(L,argv[4]);
            }
            if (_v) {
              return _wrap_Color_FromInts__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Color_FromInts'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Color::FromInts(int,int,int,int,bool)\n"
    "    Color::FromInts(int,int,int,int)\n"
    "    Color::FromInts(int,int,int)\n");
  lua_error(L);return 0;
}


static int _wrap_Color_FromHexString(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  Color result;
  
  SWIG_check_num_args("Color::FromHexString",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Color::FromHexString",1,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  result = Color::FromHexString(arg1);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color___eq(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  Color *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("Color::operator ==",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::operator ==",1,"Color const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color___eq",1,SWIGTYPE_p_Color);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  result = (bool)((Color const *)arg1)->operator ==((Color const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color___sub(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  Color *arg2 = 0 ;
  Color result;
  
  SWIG_check_num_args("Color::operator -",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::operator -",1,"Color const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color___sub",1,SWIGTYPE_p_Color);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  result = ((Color const *)arg1)->operator -((Color const &)*arg2);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color___add(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  Color *arg2 = 0 ;
  Color result;
  
  SWIG_check_num_args("Color::operator +",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::operator +",1,"Color const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color___add",1,SWIGTYPE_p_Color);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  result = ((Color const *)arg1)->operator +((Color const &)*arg2);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color___div(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  Color result;
  
  SWIG_check_num_args("Color::operator /",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::operator /",1,"Color const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::operator /",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color___div",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Color const *)arg1)->operator /(arg2);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Color___mul(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = (Color *) 0 ;
  float arg2 ;
  Color result;
  
  SWIG_check_num_args("Color::operator *",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Color::operator *",1,"Color const *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Color::operator *",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Color,0))){
    SWIG_fail_ptr("Color___mul",1,SWIGTYPE_p_Color);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = ((Color const *)arg1)->operator *(arg2);
  {
    Color * resultptr = new Color((const Color &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Color,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Color(void *obj) {
Color *arg1 = (Color *) obj;
delete arg1;
}
static swig_lua_method swig_Color_methods[] = {
    {"__eq", _wrap_Color___eq}, 
    {"__sub", _wrap_Color___sub}, 
    {"__add", _wrap_Color___add}, 
    {"__div", _wrap_Color___div}, 
    {"__mul", _wrap_Color___mul}, 
    {0,0}
};
static swig_lua_attribute swig_Color_attributes[] = {
    { "R", _wrap_Color_R_get, _wrap_Color_R_set},
    { "G", _wrap_Color_G_get, _wrap_Color_G_set},
    { "B", _wrap_Color_B_get, _wrap_Color_B_set},
    { "A", _wrap_Color_A_get, _wrap_Color_A_set},
    {0,0,0}
};
static swig_lua_attribute swig_Color_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Color_cls_methods[] = {
    {"FromInts", _wrap_Color_FromInts}, 
    {"FromHexString", _wrap_Color_FromHexString}, 
    {0,0}
};
static swig_lua_const_info swig_Color_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Color_bases[] = {0};
static const char *swig_Color_base_names[] = {0};
static swig_lua_class _wrap_class_Color = { "Color", &SWIGTYPE_p_Color,_wrap_new_Color, swig_delete_Color, swig_Color_methods, swig_Color_attributes, { "Color", swig_Color_cls_methods, swig_Color_cls_attributes, swig_Color_cls_constants }, swig_Color_bases, swig_Color_base_names };

static int _wrap_new_Message__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  MessageListener *arg2 = (MessageListener *) 0 ;
  Message *result = 0 ;
  
  SWIG_check_num_args("Message::Message",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Message::Message",1,"String");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Message::Message",2,"MessageListener *");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Message",2,SWIGTYPE_p_MessageListener);
  }
  
  result = (Message *)new Message(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Message,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Message__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  Message *result = 0 ;
  
  SWIG_check_num_args("Message::Message",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Message::Message",1,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  result = (Message *)new Message(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Message,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Message(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_Message__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_new_Message__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Message'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Message::Message(String,MessageListener *)\n"
    "    Message::Message(String)\n");
  lua_error(L);return 0;
}


static int _wrap_Message_GetMessageName(lua_State* L) {
  int SWIG_arg = 0;
  Message *arg1 = (Message *) 0 ;
  String result;
  
  SWIG_check_num_args("Message::GetMessageName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Message::GetMessageName",1,"Message *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Message,0))){
    SWIG_fail_ptr("Message_GetMessageName",1,SWIGTYPE_p_Message);
  }
  
  result = (arg1)->GetMessageName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Message_GetSender(lua_State* L) {
  int SWIG_arg = 0;
  Message *arg1 = (Message *) 0 ;
  MessageListener *result = 0 ;
  
  SWIG_check_num_args("Message::GetSender",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Message::GetSender",1,"Message *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Message,0))){
    SWIG_fail_ptr("Message_GetSender",1,SWIGTYPE_p_Message);
  }
  
  result = (MessageListener *)(arg1)->GetSender();
  {
    int dcast = 0;
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      TextActor *dobj = dynamic_cast<TextActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_TextActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      FullScreenActor *dobj = dynamic_cast<FullScreenActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_FullScreenActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Camera *dobj = dynamic_cast<Camera *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Camera, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      HUDActor *dobj = dynamic_cast<HUDActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_HUDActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      PhysicsActor *dobj = dynamic_cast<PhysicsActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_PhysicsActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      ParticleActor *dobj = dynamic_cast<ParticleActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_ParticleActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Actor *dobj = dynamic_cast<Actor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Actor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*//*@SWIG@*/
    if (!dcast) {
      SWIG_NewPointerObj(L, result, SWIGTYPE_p_MessageListener, 0); SWIG_arg++;
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Message(void *obj) {
Message *arg1 = (Message *) obj;
delete arg1;
}
static swig_lua_method swig_Message_methods[] = {
    {"GetMessageName", _wrap_Message_GetMessageName}, 
    {"GetSender", _wrap_Message_GetSender}, 
    {0,0}
};
static swig_lua_attribute swig_Message_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Message_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Message_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Message_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Message_bases[] = {0};
static const char *swig_Message_base_names[] = {0};
static swig_lua_class _wrap_class_Message = { "Message", &SWIGTYPE_p_Message,_wrap_new_Message, swig_delete_Message, swig_Message_methods, swig_Message_attributes, { "Message", swig_Message_cls_methods, swig_Message_cls_attributes, swig_Message_cls_constants }, swig_Message_bases, swig_Message_base_names };

static int _wrap_new_FloatMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  float arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< float > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< float >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< float >::TypedMessage",1,"String const &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TypedMessage< float >::TypedMessage",2,"float");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< float >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  arg2 = (float)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_FloatMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< float > *)new TypedMessage< float >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_FloatMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  float arg2 ;
  String temp1 ;
  TypedMessage< float > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< float >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< float >::TypedMessage",1,"String const &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TypedMessage< float >::TypedMessage",2,"float");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  arg2 = (float)lua_tonumber(L, 2);
  result = (TypedMessage< float > *)new TypedMessage< float >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_float_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_FloatMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_FloatMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_FloatMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_FloatMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< float >::TypedMessage(String const &,float,MessageListener *)\n"
    "    TypedMessage< float >::TypedMessage(String const &,float)\n");
  lua_error(L);return 0;
}


static int _wrap_FloatMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< float > *arg1 = (TypedMessage< float > *) 0 ;
  float result;
  
  SWIG_check_num_args("TypedMessage< float >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< float >::GetValue",1,"TypedMessage< float > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_float_t,0))){
    SWIG_fail_ptr("FloatMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_float_t);
  }
  
  result = (float)(arg1)->GetValue();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_FloatMessage(void *obj) {
TypedMessage< float > *arg1 = (TypedMessage< float > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_float_Sg__methods[] = {
    {"GetValue", _wrap_FloatMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_float_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_float_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_float_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_float_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_float_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_float_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_float_Sg_ = { "FloatMessage", &SWIGTYPE_p_TypedMessageT_float_t,_wrap_new_FloatMessage, swig_delete_FloatMessage, swig_TypedMessage_Sl_float_Sg__methods, swig_TypedMessage_Sl_float_Sg__attributes, { "FloatMessage", swig_TypedMessage_Sl_float_Sg__cls_methods, swig_TypedMessage_Sl_float_Sg__cls_attributes, swig_TypedMessage_Sl_float_Sg__cls_constants }, swig_TypedMessage_Sl_float_Sg__bases, swig_TypedMessage_Sl_float_Sg__base_names };

static int _wrap_new_IntMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  int arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< int > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< int >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< int >::TypedMessage",1,"String const &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TypedMessage< int >::TypedMessage",2,"int");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< int >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  arg2 = (int)lua_tonumber(L, 2);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_IntMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< int > *)new TypedMessage< int >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IntMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  int arg2 ;
  String temp1 ;
  TypedMessage< int > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< int >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< int >::TypedMessage",1,"String const &");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TypedMessage< int >::TypedMessage",2,"int");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  arg2 = (int)lua_tonumber(L, 2);
  result = (TypedMessage< int > *)new TypedMessage< int >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_int_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_IntMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_IntMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_IntMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_IntMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< int >::TypedMessage(String const &,int,MessageListener *)\n"
    "    TypedMessage< int >::TypedMessage(String const &,int)\n");
  lua_error(L);return 0;
}


static int _wrap_IntMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< int > *arg1 = (TypedMessage< int > *) 0 ;
  int result;
  
  SWIG_check_num_args("TypedMessage< int >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< int >::GetValue",1,"TypedMessage< int > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_int_t,0))){
    SWIG_fail_ptr("IntMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_int_t);
  }
  
  result = (int)(arg1)->GetValue();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_IntMessage(void *obj) {
TypedMessage< int > *arg1 = (TypedMessage< int > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_int_Sg__methods[] = {
    {"GetValue", _wrap_IntMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_int_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_int_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_int_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_int_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_int_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_int_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_int_Sg_ = { "IntMessage", &SWIGTYPE_p_TypedMessageT_int_t,_wrap_new_IntMessage, swig_delete_IntMessage, swig_TypedMessage_Sl_int_Sg__methods, swig_TypedMessage_Sl_int_Sg__attributes, { "IntMessage", swig_TypedMessage_Sl_int_Sg__cls_methods, swig_TypedMessage_Sl_int_Sg__cls_attributes, swig_TypedMessage_Sl_int_Sg__cls_constants }, swig_TypedMessage_Sl_int_Sg__bases, swig_TypedMessage_Sl_int_Sg__base_names };

static int _wrap_new_StringMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  std::string arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< String > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< String >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< String >::TypedMessage",1,"String const &");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TypedMessage< String >::TypedMessage",2,"std::string");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< String >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_StringMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< String > *)new TypedMessage< String >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_std__string_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_StringMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  std::string arg2 ;
  String temp1 ;
  TypedMessage< String > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< String >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< String >::TypedMessage",1,"String const &");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TypedMessage< String >::TypedMessage",2,"std::string");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (TypedMessage< String > *)new TypedMessage< String >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_std__string_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_StringMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_StringMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_StringMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_StringMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< String >::TypedMessage(String const &,std::string,MessageListener *)\n"
    "    TypedMessage< String >::TypedMessage(String const &,std::string)\n");
  lua_error(L);return 0;
}


static int _wrap_StringMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< String > *arg1 = (TypedMessage< String > *) 0 ;
  std::string result;
  
  SWIG_check_num_args("TypedMessage< String >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< String >::GetValue",1,"TypedMessage< String > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_std__string_t,0))){
    SWIG_fail_ptr("StringMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_std__string_t);
  }
  
  result = (arg1)->GetValue();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_StringMessage(void *obj) {
TypedMessage< String > *arg1 = (TypedMessage< String > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_String_Sg__methods[] = {
    {"GetValue", _wrap_StringMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_String_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_String_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_String_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_String_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_String_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_String_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_String_Sg_ = { "StringMessage", &SWIGTYPE_p_TypedMessageT_std__string_t,_wrap_new_StringMessage, swig_delete_StringMessage, swig_TypedMessage_Sl_String_Sg__methods, swig_TypedMessage_Sl_String_Sg__attributes, { "StringMessage", swig_TypedMessage_Sl_String_Sg__cls_methods, swig_TypedMessage_Sl_String_Sg__cls_attributes, swig_TypedMessage_Sl_String_Sg__cls_constants }, swig_TypedMessage_Sl_String_Sg__bases, swig_TypedMessage_Sl_String_Sg__base_names };

static int _wrap_new_Vector2Message__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vector2 arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vector2 > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vector2 >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vector2 >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vector2 >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vector2 conversion
    Vector2 *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vector2(x, y);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vector2Message",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vector2 > *)new TypedMessage< Vector2 >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vector2_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2Message__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vector2 arg2 ;
  String temp1 ;
  TypedMessage< Vector2 > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vector2 >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vector2 >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vector2 conversion
    Vector2 *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vector2(x, y);
    }
  }
  result = (TypedMessage< Vector2 > *)new TypedMessage< Vector2 >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vector2_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector2Message(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vector2Message__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vector2Message__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vector2Message'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vector2 >::TypedMessage(String const &,Vector2,MessageListener *)\n"
    "    TypedMessage< Vector2 >::TypedMessage(String const &,Vector2)\n");
  lua_error(L);return 0;
}


static int _wrap_Vector2Message_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vector2 > *arg1 = (TypedMessage< Vector2 > *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("TypedMessage< Vector2 >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vector2 >::GetValue",1,"TypedMessage< Vector2 > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vector2_t,0))){
    SWIG_fail_ptr("Vector2Message_GetValue",1,SWIGTYPE_p_TypedMessageT_Vector2_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vector2Message(void *obj) {
TypedMessage< Vector2 > *arg1 = (TypedMessage< Vector2 > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vector2_Sg__methods[] = {
    {"GetValue", _wrap_Vector2Message_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vector2_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vector2_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vector2_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vector2_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vector2_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vector2_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vector2_Sg_ = { "Vector2Message", &SWIGTYPE_p_TypedMessageT_Vector2_t,_wrap_new_Vector2Message, swig_delete_Vector2Message, swig_TypedMessage_Sl_Vector2_Sg__methods, swig_TypedMessage_Sl_Vector2_Sg__attributes, { "Vector2Message", swig_TypedMessage_Sl_Vector2_Sg__cls_methods, swig_TypedMessage_Sl_Vector2_Sg__cls_attributes, swig_TypedMessage_Sl_Vector2_Sg__cls_constants }, swig_TypedMessage_Sl_Vector2_Sg__bases, swig_TypedMessage_Sl_Vector2_Sg__base_names };

static int _wrap_new_Vector3Message__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vector3 arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vector3 > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vector3 >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vector3 >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vector3 >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vector3 conversion
    Vector3 *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vector3(x, y, z);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vector3Message",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vector3 > *)new TypedMessage< Vector3 >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vector3_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3Message__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vector3 arg2 ;
  String temp1 ;
  TypedMessage< Vector3 > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vector3 >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vector3 >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vector3 conversion
    Vector3 *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vector3(x, y, z);
    }
  }
  result = (TypedMessage< Vector3 > *)new TypedMessage< Vector3 >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vector3_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vector3Message(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vector3Message__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vector3Message__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vector3Message'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vector3 >::TypedMessage(String const &,Vector3,MessageListener *)\n"
    "    TypedMessage< Vector3 >::TypedMessage(String const &,Vector3)\n");
  lua_error(L);return 0;
}


static int _wrap_Vector3Message_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vector3 > *arg1 = (TypedMessage< Vector3 > *) 0 ;
  Vector3 result;
  
  SWIG_check_num_args("TypedMessage< Vector3 >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vector3 >::GetValue",1,"TypedMessage< Vector3 > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vector3_t,0))){
    SWIG_fail_ptr("Vector3Message_GetValue",1,SWIGTYPE_p_TypedMessageT_Vector3_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vector3Message(void *obj) {
TypedMessage< Vector3 > *arg1 = (TypedMessage< Vector3 > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vector3_Sg__methods[] = {
    {"GetValue", _wrap_Vector3Message_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vector3_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vector3_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vector3_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vector3_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vector3_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vector3_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vector3_Sg_ = { "Vector3Message", &SWIGTYPE_p_TypedMessageT_Vector3_t,_wrap_new_Vector3Message, swig_delete_Vector3Message, swig_TypedMessage_Sl_Vector3_Sg__methods, swig_TypedMessage_Sl_Vector3_Sg__attributes, { "Vector3Message", swig_TypedMessage_Sl_Vector3_Sg__cls_methods, swig_TypedMessage_Sl_Vector3_Sg__cls_attributes, swig_TypedMessage_Sl_Vector3_Sg__cls_constants }, swig_TypedMessage_Sl_Vector3_Sg__bases, swig_TypedMessage_Sl_Vector3_Sg__base_names };

static int _wrap_new_Vec2iMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec2i arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vec2i > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec2i >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec2i >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vec2i >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec2i conversion
    Vec2i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2i(x, y);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vec2iMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vec2i > *)new TypedMessage< Vec2i >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec2i_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2iMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec2i arg2 ;
  String temp1 ;
  TypedMessage< Vec2i > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec2i >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec2i >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec2i conversion
    Vec2i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2i(x, y);
    }
  }
  result = (TypedMessage< Vec2i > *)new TypedMessage< Vec2i >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec2i_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2iMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec2i / const Vec2i& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec2i);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vec2iMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec2i / const Vec2i& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec2i);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vec2iMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec2iMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vec2i >::TypedMessage(String const &,Vec2i,MessageListener *)\n"
    "    TypedMessage< Vec2i >::TypedMessage(String const &,Vec2i)\n");
  lua_error(L);return 0;
}


static int _wrap_Vec2iMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vec2i > *arg1 = (TypedMessage< Vec2i > *) 0 ;
  Vec2i result;
  
  SWIG_check_num_args("TypedMessage< Vec2i >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vec2i >::GetValue",1,"TypedMessage< Vec2i > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vec2i_t,0))){
    SWIG_fail_ptr("Vec2iMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_Vec2i_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vec2i * resultptr = new Vec2i((const Vec2i &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec2i,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec2iMessage(void *obj) {
TypedMessage< Vec2i > *arg1 = (TypedMessage< Vec2i > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vec2i_Sg__methods[] = {
    {"GetValue", _wrap_Vec2iMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec2i_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec2i_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vec2i_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vec2i_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vec2i_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vec2i_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vec2i_Sg_ = { "Vec2iMessage", &SWIGTYPE_p_TypedMessageT_Vec2i_t,_wrap_new_Vec2iMessage, swig_delete_Vec2iMessage, swig_TypedMessage_Sl_Vec2i_Sg__methods, swig_TypedMessage_Sl_Vec2i_Sg__attributes, { "Vec2iMessage", swig_TypedMessage_Sl_Vec2i_Sg__cls_methods, swig_TypedMessage_Sl_Vec2i_Sg__cls_attributes, swig_TypedMessage_Sl_Vec2i_Sg__cls_constants }, swig_TypedMessage_Sl_Vec2i_Sg__bases, swig_TypedMessage_Sl_Vec2i_Sg__base_names };

static int _wrap_new_Vec2uiMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec2ui arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vec2ui > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec2ui >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec2ui >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vec2ui >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec2ui conversion
    Vec2ui *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2ui,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2ui(x, y);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vec2uiMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vec2ui > *)new TypedMessage< Vec2ui >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec2ui_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2uiMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec2ui arg2 ;
  String temp1 ;
  TypedMessage< Vec2ui > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec2ui >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec2ui >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec2ui conversion
    Vec2ui *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2ui,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2ui(x, y);
    }
  }
  result = (TypedMessage< Vec2ui > *)new TypedMessage< Vec2ui >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec2ui_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec2uiMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec2ui / const Vec2ui& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec2ui);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain non-negative integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            int x  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            int y  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && (x >= 0) && (y >= 0));
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vec2uiMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec2ui / const Vec2ui& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec2ui);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain non-negative integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            int x  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            int y  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && (x >= 0) && (y >= 0));
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vec2uiMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec2uiMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vec2ui >::TypedMessage(String const &,Vec2ui,MessageListener *)\n"
    "    TypedMessage< Vec2ui >::TypedMessage(String const &,Vec2ui)\n");
  lua_error(L);return 0;
}


static int _wrap_Vec2uiMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vec2ui > *arg1 = (TypedMessage< Vec2ui > *) 0 ;
  Vec2ui result;
  
  SWIG_check_num_args("TypedMessage< Vec2ui >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vec2ui >::GetValue",1,"TypedMessage< Vec2ui > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vec2ui_t,0))){
    SWIG_fail_ptr("Vec2uiMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_Vec2ui_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vec2ui * resultptr = new Vec2ui((const Vec2ui &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec2ui,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec2uiMessage(void *obj) {
TypedMessage< Vec2ui > *arg1 = (TypedMessage< Vec2ui > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vec2ui_Sg__methods[] = {
    {"GetValue", _wrap_Vec2uiMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec2ui_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec2ui_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vec2ui_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vec2ui_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vec2ui_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vec2ui_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vec2ui_Sg_ = { "Vec2uiMessage", &SWIGTYPE_p_TypedMessageT_Vec2ui_t,_wrap_new_Vec2uiMessage, swig_delete_Vec2uiMessage, swig_TypedMessage_Sl_Vec2ui_Sg__methods, swig_TypedMessage_Sl_Vec2ui_Sg__attributes, { "Vec2uiMessage", swig_TypedMessage_Sl_Vec2ui_Sg__cls_methods, swig_TypedMessage_Sl_Vec2ui_Sg__cls_attributes, swig_TypedMessage_Sl_Vec2ui_Sg__cls_constants }, swig_TypedMessage_Sl_Vec2ui_Sg__bases, swig_TypedMessage_Sl_Vec2ui_Sg__base_names };

static int _wrap_new_Vec3iMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec3i arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vec3i > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec3i >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec3i >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vec3i >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec3i conversion
    Vec3i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec3i(x, y, z);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vec3iMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vec3i > *)new TypedMessage< Vec3i >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec3i_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3iMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec3i arg2 ;
  String temp1 ;
  TypedMessage< Vec3i > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec3i >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec3i >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec3i conversion
    Vec3i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec3i(x, y, z);
    }
  }
  result = (TypedMessage< Vec3i > *)new TypedMessage< Vec3i >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec3i_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3iMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec3i / const Vec3i& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec3i);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vec3iMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec3i / const Vec3i& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec3i);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vec3iMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec3iMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vec3i >::TypedMessage(String const &,Vec3i,MessageListener *)\n"
    "    TypedMessage< Vec3i >::TypedMessage(String const &,Vec3i)\n");
  lua_error(L);return 0;
}


static int _wrap_Vec3iMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vec3i > *arg1 = (TypedMessage< Vec3i > *) 0 ;
  Vec3i result;
  
  SWIG_check_num_args("TypedMessage< Vec3i >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vec3i >::GetValue",1,"TypedMessage< Vec3i > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vec3i_t,0))){
    SWIG_fail_ptr("Vec3iMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_Vec3i_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vec3i * resultptr = new Vec3i((const Vec3i &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec3i,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec3iMessage(void *obj) {
TypedMessage< Vec3i > *arg1 = (TypedMessage< Vec3i > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vec3i_Sg__methods[] = {
    {"GetValue", _wrap_Vec3iMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec3i_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec3i_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vec3i_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vec3i_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vec3i_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vec3i_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vec3i_Sg_ = { "Vec3iMessage", &SWIGTYPE_p_TypedMessageT_Vec3i_t,_wrap_new_Vec3iMessage, swig_delete_Vec3iMessage, swig_TypedMessage_Sl_Vec3i_Sg__methods, swig_TypedMessage_Sl_Vec3i_Sg__attributes, { "Vec3iMessage", swig_TypedMessage_Sl_Vec3i_Sg__cls_methods, swig_TypedMessage_Sl_Vec3i_Sg__cls_attributes, swig_TypedMessage_Sl_Vec3i_Sg__cls_constants }, swig_TypedMessage_Sl_Vec3i_Sg__bases, swig_TypedMessage_Sl_Vec3i_Sg__base_names };

static int _wrap_new_Vec3uiMessage__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec3ui arg2 ;
  MessageListener *arg3 = (MessageListener *) 0 ;
  String temp1 ;
  TypedMessage< Vec3ui > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec3ui >::TypedMessage",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec3ui >::TypedMessage",1,"String const &");
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("TypedMessage< Vec3ui >::TypedMessage",3,"MessageListener *");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec3ui conversion
    Vec3ui *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3ui,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      unsigned int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec3ui(x, y, z);
    }
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("new_Vec3uiMessage",3,SWIGTYPE_p_MessageListener);
  }
  
  result = (TypedMessage< Vec3ui > *)new TypedMessage< Vec3ui >((String const &)*arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec3ui_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3uiMessage__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  Vec3ui arg2 ;
  String temp1 ;
  TypedMessage< Vec3ui > *result = 0 ;
  
  SWIG_check_num_args("TypedMessage< Vec3ui >::TypedMessage",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TypedMessage< Vec3ui >::TypedMessage",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  {
    // Vec3ui conversion
    Vec3ui *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec3ui,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      unsigned int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      unsigned int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      unsigned int z = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec3ui(x, y, z);
    }
  }
  result = (TypedMessage< Vec3ui > *)new TypedMessage< Vec3ui >((String const &)*arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TypedMessageT_Vec3ui_t,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Vec3uiMessage(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec3ui / const Vec3ui typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec3ui);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain non-negative integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            int x  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            int y  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            int z  = lua_tointeger(L, -1);
            lua_pop	(L, 1);
            _v = (v1 && v2 && v3 && (x >= 0) && (y >= 0) && (z >= 0));
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_new_Vec3uiMessage__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        // Vec3ui / const Vec3ui typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec3ui);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain non-negative integers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            int x  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            int y  = lua_tointeger(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            int z  = lua_tointeger(L, -1);
            lua_pop	(L, 1);
            _v = (v1 && v2 && v3 && (x >= 0) && (y >= 0) && (z >= 0));
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          void *ptr;
          if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_MessageListener, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_new_Vec3uiMessage__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_Vec3uiMessage'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TypedMessage< Vec3ui >::TypedMessage(String const &,Vec3ui,MessageListener *)\n"
    "    TypedMessage< Vec3ui >::TypedMessage(String const &,Vec3ui)\n");
  lua_error(L);return 0;
}


static int _wrap_Vec3uiMessage_GetValue(lua_State* L) {
  int SWIG_arg = 0;
  TypedMessage< Vec3ui > *arg1 = (TypedMessage< Vec3ui > *) 0 ;
  Vec3ui result;
  
  SWIG_check_num_args("TypedMessage< Vec3ui >::GetValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TypedMessage< Vec3ui >::GetValue",1,"TypedMessage< Vec3ui > *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TypedMessageT_Vec3ui_t,0))){
    SWIG_fail_ptr("Vec3uiMessage_GetValue",1,SWIGTYPE_p_TypedMessageT_Vec3ui_t);
  }
  
  result = (arg1)->GetValue();
  {
    Vec3ui * resultptr = new Vec3ui((const Vec3ui &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec3ui,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Vec3uiMessage(void *obj) {
TypedMessage< Vec3ui > *arg1 = (TypedMessage< Vec3ui > *) obj;
delete arg1;
}
static swig_lua_method swig_TypedMessage_Sl_Vec3ui_Sg__methods[] = {
    {"GetValue", _wrap_Vec3uiMessage_GetValue}, 
    {0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec3ui_Sg__attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TypedMessage_Sl_Vec3ui_Sg__cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TypedMessage_Sl_Vec3ui_Sg__cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TypedMessage_Sl_Vec3ui_Sg__cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TypedMessage_Sl_Vec3ui_Sg__bases[] = {0,0};
static const char *swig_TypedMessage_Sl_Vec3ui_Sg__base_names[] = {"Message *",0};
static swig_lua_class _wrap_class_TypedMessage_Sl_Vec3ui_Sg_ = { "Vec3uiMessage", &SWIGTYPE_p_TypedMessageT_Vec3ui_t,_wrap_new_Vec3uiMessage, swig_delete_Vec3uiMessage, swig_TypedMessage_Sl_Vec3ui_Sg__methods, swig_TypedMessage_Sl_Vec3ui_Sg__attributes, { "Vec3uiMessage", swig_TypedMessage_Sl_Vec3ui_Sg__cls_methods, swig_TypedMessage_Sl_Vec3ui_Sg__cls_attributes, swig_TypedMessage_Sl_Vec3ui_Sg__cls_constants }, swig_TypedMessage_Sl_Vec3ui_Sg__bases, swig_TypedMessage_Sl_Vec3ui_Sg__base_names };

static void swig_delete_MessageListener(void *obj) {
MessageListener *arg1 = (MessageListener *) obj;
delete arg1;
}
static swig_lua_method swig_MessageListener_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_MessageListener_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_MessageListener_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_MessageListener_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_MessageListener_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_MessageListener_bases[] = {0};
static const char *swig_MessageListener_base_names[] = {0};
static swig_lua_class _wrap_class_MessageListener = { "MessageListener", &SWIGTYPE_p_MessageListener,0, swig_delete_MessageListener, swig_MessageListener_methods, swig_MessageListener_attributes, { "MessageListener", swig_MessageListener_cls_methods, swig_MessageListener_cls_attributes, swig_MessageListener_cls_constants }, swig_MessageListener_bases, swig_MessageListener_base_names };

static int _wrap_Switchboard_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *result = 0 ;
  
  SWIG_check_num_args("Switchboard::GetInstance",0,0)
  result = (Switchboard *) &Switchboard::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Switchboard,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_Broadcast(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  Message *arg2 = (Message *) 0 ;
  
  SWIG_check_num_args("Switchboard::Broadcast",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::Broadcast",1,"Switchboard *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Switchboard::Broadcast",2,"Message *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_Broadcast",1,SWIGTYPE_p_Switchboard);
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Message,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Switchboard_Broadcast",2,SWIGTYPE_p_Message);
  }
  
  (arg1)->Broadcast(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_DeferredBroadcast(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  Message *arg2 = (Message *) 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Switchboard::DeferredBroadcast",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::DeferredBroadcast",1,"Switchboard *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Switchboard::DeferredBroadcast",2,"Message *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Switchboard::DeferredBroadcast",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_DeferredBroadcast",1,SWIGTYPE_p_Switchboard);
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Message,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Switchboard_DeferredBroadcast",2,SWIGTYPE_p_Message);
  }
  
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->DeferredBroadcast(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_SubscribeTo(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  MessageListener *arg2 = (MessageListener *) 0 ;
  String arg3 ;
  bool result;
  
  SWIG_check_num_args("Switchboard::SubscribeTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::SubscribeTo",1,"Switchboard *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Switchboard::SubscribeTo",2,"MessageListener *");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Switchboard::SubscribeTo",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_SubscribeTo",1,SWIGTYPE_p_Switchboard);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("Switchboard_SubscribeTo",2,SWIGTYPE_p_MessageListener);
  }
  
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  result = (bool)(arg1)->SubscribeTo(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_UnsubscribeFrom(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  MessageListener *arg2 = (MessageListener *) 0 ;
  String arg3 ;
  bool result;
  
  SWIG_check_num_args("Switchboard::UnsubscribeFrom",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::UnsubscribeFrom",1,"Switchboard *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Switchboard::UnsubscribeFrom",2,"MessageListener *");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Switchboard::UnsubscribeFrom",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_UnsubscribeFrom",1,SWIGTYPE_p_Switchboard);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("Switchboard_UnsubscribeFrom",2,SWIGTYPE_p_MessageListener);
  }
  
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  result = (bool)(arg1)->UnsubscribeFrom(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_GetSubscribersTo(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  String arg2 ;
  SwigValueWrapper< std::set< MessageListener * > > result;
  
  SWIG_check_num_args("Switchboard::GetSubscribersTo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::GetSubscribersTo",1,"Switchboard *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Switchboard::GetSubscribersTo",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_GetSubscribersTo",1,SWIGTYPE_p_Switchboard);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (arg1)->GetSubscribersTo(arg2);
  {
    std::set< MessageListener * > * resultptr = new std::set< MessageListener * >((const std::set< MessageListener * > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__setT_MessageListener_p_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Switchboard_GetSubscriptionsFor(lua_State* L) {
  int SWIG_arg = 0;
  Switchboard *arg1 = (Switchboard *) 0 ;
  MessageListener *arg2 = (MessageListener *) 0 ;
  SwigValueWrapper< std::set< std::string > > result;
  
  SWIG_check_num_args("Switchboard::GetSubscriptionsFor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Switchboard::GetSubscriptionsFor",1,"Switchboard *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Switchboard::GetSubscriptionsFor",2,"MessageListener *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Switchboard,0))){
    SWIG_fail_ptr("Switchboard_GetSubscriptionsFor",1,SWIGTYPE_p_Switchboard);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_MessageListener,0))){
    SWIG_fail_ptr("Switchboard_GetSubscriptionsFor",2,SWIGTYPE_p_MessageListener);
  }
  
  result = (arg1)->GetSubscriptionsFor(arg2);
  
  {
    lua_newtable(L);
    
    std::set<String>::iterator it = (&result)->begin();
    int setCounter = 1;
    while (it != (&result)->end())
    {
      lua_pushnumber(L, setCounter++);
      lua_pushstring(L, (*it).c_str()); 
      lua_settable(L, -3);
      
      it++;
    }
    
    SWIG_arg += 1; 
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Switchboard(void *obj) {
Switchboard *arg1 = (Switchboard *) obj;
delete arg1;
}
static swig_lua_method swig_Switchboard_methods[] = {
    {"Broadcast", _wrap_Switchboard_Broadcast}, 
    {"DeferredBroadcast", _wrap_Switchboard_DeferredBroadcast}, 
    {"SubscribeTo", _wrap_Switchboard_SubscribeTo}, 
    {"UnsubscribeFrom", _wrap_Switchboard_UnsubscribeFrom}, 
    {"GetSubscribersTo", _wrap_Switchboard_GetSubscribersTo}, 
    {"GetSubscriptionsFor", _wrap_Switchboard_GetSubscriptionsFor}, 
    {0,0}
};
static swig_lua_attribute swig_Switchboard_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Switchboard_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Switchboard_cls_methods[] = {
    {"GetInstance", _wrap_Switchboard_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_Switchboard_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Switchboard_bases[] = {0};
static const char *swig_Switchboard_base_names[] = {0};
static swig_lua_class _wrap_class_Switchboard = { "Switchboard", &SWIGTYPE_p_Switchboard,0, swig_delete_Switchboard, swig_Switchboard_methods, swig_Switchboard_attributes, { "Switchboard", swig_Switchboard_cls_methods, swig_Switchboard_cls_attributes, swig_Switchboard_cls_constants }, swig_Switchboard_bases, swig_Switchboard_base_names };

static int _wrap_Renderable_Destroy(lua_State* L) {
  int SWIG_arg = 0;
  Renderable *arg1 = (Renderable *) 0 ;
  
  SWIG_check_num_args("Renderable::Destroy",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Renderable::Destroy",1,"Renderable *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("Renderable_Destroy",1,SWIGTYPE_p_Renderable);
  }
  
  (arg1)->Destroy();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Renderable_IsDestroyed(lua_State* L) {
  int SWIG_arg = 0;
  Renderable *arg1 = (Renderable *) 0 ;
  bool result;
  
  SWIG_check_num_args("Renderable::IsDestroyed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Renderable::IsDestroyed",1,"Renderable *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("Renderable_IsDestroyed",1,SWIGTYPE_p_Renderable);
  }
  
  result = (bool)(arg1)->IsDestroyed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Renderable_GetLayer(lua_State* L) {
  int SWIG_arg = 0;
  Renderable *arg1 = (Renderable *) 0 ;
  int result;
  
  SWIG_check_num_args("Renderable::GetLayer",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Renderable::GetLayer",1,"Renderable *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("Renderable_GetLayer",1,SWIGTYPE_p_Renderable);
  }
  
  result = (int)(arg1)->GetLayer();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Renderable(void *obj) {
Renderable *arg1 = (Renderable *) obj;
delete arg1;
}
static swig_lua_method swig_Renderable_methods[] = {
    {"Destroy", _wrap_Renderable_Destroy}, 
    {"IsDestroyed", _wrap_Renderable_IsDestroyed}, 
    {"GetLayer", _wrap_Renderable_GetLayer}, 
    {0,0}
};
static swig_lua_attribute swig_Renderable_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Renderable_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Renderable_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Renderable_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Renderable_bases[] = {0};
static const char *swig_Renderable_base_names[] = {0};
static swig_lua_class _wrap_class_Renderable = { "Renderable", &SWIGTYPE_p_Renderable,0, swig_delete_Renderable, swig_Renderable_methods, swig_Renderable_attributes, { "Renderable", swig_Renderable_cls_methods, swig_Renderable_cls_attributes, swig_Renderable_cls_constants }, swig_Renderable_bases, swig_Renderable_base_names };

static int _wrap_MathUtil_E_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::E",0,0)
  result = (float)(float)MathUtil::E;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_Log10E_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::Log10E",0,0)
  result = (float)(float)MathUtil::Log10E;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_Log2E_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::Log2E",0,0)
  result = (float)(float)MathUtil::Log2E;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_Pi_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::Pi",0,0)
  result = (float)(float)MathUtil::Pi;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_PiOver2_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::PiOver2",0,0)
  result = (float)(float)MathUtil::PiOver2;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_PiOver4_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::PiOver4",0,0)
  result = (float)(float)MathUtil::PiOver4;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_TwoPi_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::TwoPi",0,0)
  result = (float)(float)MathUtil::TwoPi;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_MaxFloat_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::MaxFloat",0,0)
  result = (float)(float)MathUtil::MaxFloat;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_MinFloat_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::MinFloat",0,0)
  result = (float)(float)MathUtil::MinFloat;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_Epsilon_get(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::Epsilon",0,0)
  result = (float)(float)MathUtil::Epsilon;
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_ToDegrees(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float result;
  
  SWIG_check_num_args("MathUtil::ToDegrees",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::ToDegrees",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (float)MathUtil::ToDegrees(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_ToRadians(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float result;
  
  SWIG_check_num_args("MathUtil::ToRadians",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::ToRadians",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (float)MathUtil::ToRadians(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_VectorFromAngle(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::VectorFromAngle",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::VectorFromAngle",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = MathUtil::VectorFromAngle(arg1);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_AngleFromVector(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  float result;
  
  SWIG_check_num_args("MathUtil::AngleFromVector",1,1)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  result = (float)MathUtil::AngleFromVector((Vector2 const &)*arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_AngleFromVectors(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("MathUtil::AngleFromVectors",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (float)MathUtil::AngleFromVectors((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RoundToInt(lua_State* L) {
  int SWIG_arg = 0;
  double arg1 ;
  int result;
  
  SWIG_check_num_args("MathUtil::RoundToInt",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RoundToInt",1,"double");
  arg1 = (double)lua_tonumber(L, 1);
  result = (int)MathUtil::RoundToInt(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomInt(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int result;
  
  SWIG_check_num_args("MathUtil::RandomInt",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomInt",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  result = (int)MathUtil::RandomInt(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomIntInRange(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int result;
  
  SWIG_check_num_args("MathUtil::RandomIntInRange",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomIntInRange",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::RandomIntInRange",2,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  result = (int)MathUtil::RandomIntInRange(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomIntWithError(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  int result;
  
  SWIG_check_num_args("MathUtil::RandomIntWithError",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomIntWithError",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::RandomIntWithError",2,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  result = (int)MathUtil::RandomIntWithError(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomFloat__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float result;
  
  SWIG_check_num_args("MathUtil::RandomFloat",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomFloat",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (float)MathUtil::RandomFloat(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomFloat__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  float result;
  
  SWIG_check_num_args("MathUtil::RandomFloat",0,0)
  result = (float)MathUtil::RandomFloat();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomFloat(lua_State* L) {
  int argc;
  int argv[2]={
    1,2
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_MathUtil_RandomFloat__SWIG_1(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      return _wrap_MathUtil_RandomFloat__SWIG_0(L);
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_RandomFloat'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::RandomFloat(float)\n"
    "    MathUtil::RandomFloat()\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_RandomFloatInRange(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float result;
  
  SWIG_check_num_args("MathUtil::RandomFloatInRange",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomFloatInRange",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::RandomFloatInRange",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (float)MathUtil::RandomFloatInRange(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomFloatWithError(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float result;
  
  SWIG_check_num_args("MathUtil::RandomFloatWithError",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomFloatWithError",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::RandomFloatWithError",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (float)MathUtil::RandomFloatWithError(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomBool(lua_State* L) {
  int SWIG_arg = 0;
  bool result;
  
  SWIG_check_num_args("MathUtil::RandomBool",0,0)
  result = (bool)MathUtil::RandomBool();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomVector__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::RandomVector",0,0)
  result = MathUtil::RandomVector();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomVector__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::RandomVector",1,1)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  result = MathUtil::RandomVector((Vector2 const &)*arg1);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomVector__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::RandomVector",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = MathUtil::RandomVector((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomVector(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_MathUtil_RandomVector__SWIG_0(L);
  }
  if (argc == 1) {
    int _v;
    {
      // Vector2 / const Vector2& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      return _wrap_MathUtil_RandomVector__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      // Vector2 / const Vector2& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_MathUtil_RandomVector__SWIG_2(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_RandomVector'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::RandomVector()\n"
    "    MathUtil::RandomVector(Vector2 const &)\n"
    "    MathUtil::RandomVector(Vector2 const &,Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_RandomPointField__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  float arg4 ;
  Vector2List result;
  
  SWIG_check_num_args("MathUtil::RandomPointField",4,4)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomPointField",1,"int");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("MathUtil::RandomPointField",4,"float");
  arg1 = (int)lua_tonumber(L, 1);
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  arg4 = (float)lua_tonumber(L, 4);
  result = MathUtil::RandomPointField(arg1,(Vector2 const &)*arg2,(Vector2 const &)*arg3,arg4);
  {
    Vector2List * resultptr = new Vector2List((const Vector2List &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2List,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomPointField__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  Vector2List result;
  
  SWIG_check_num_args("MathUtil::RandomPointField",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::RandomPointField",1,"int");
  arg1 = (int)lua_tonumber(L, 1);
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  result = MathUtil::RandomPointField(arg1,(Vector2 const &)*arg2,(Vector2 const &)*arg3);
  {
    Vector2List * resultptr = new Vector2List((const Vector2List &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2List,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_RandomPointField(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          return _wrap_MathUtil_RandomPointField__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_MathUtil_RandomPointField__SWIG_0(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_RandomPointField'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::RandomPointField(int,Vector2 const &,Vector2 const &,float)\n"
    "    MathUtil::RandomPointField(int,Vector2 const &,Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_FuzzyEquals__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("MathUtil::FuzzyEquals",3,3)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::FuzzyEquals",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::FuzzyEquals",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("MathUtil::FuzzyEquals",3,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)MathUtil::FuzzyEquals(arg1,arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_FuzzyEquals__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  bool result;
  
  SWIG_check_num_args("MathUtil::FuzzyEquals",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::FuzzyEquals",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::FuzzyEquals",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (bool)MathUtil::FuzzyEquals(arg1,arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_FuzzyEquals__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool result;
  
  SWIG_check_num_args("MathUtil::FuzzyEquals",3,3)
  if(!lua_isnumber(L,3)) SWIG_fail_arg("MathUtil::FuzzyEquals",3,"float");
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  result = (bool)MathUtil::FuzzyEquals((Vector2 const &)*arg1,(Vector2 const &)*arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_FuzzyEquals__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("MathUtil::FuzzyEquals",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (bool)MathUtil::FuzzyEquals((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_FuzzyEquals(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      // Vector2 / const Vector2& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_MathUtil_FuzzyEquals__SWIG_3(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_MathUtil_FuzzyEquals__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      // Vector2 / const Vector2& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_MathUtil_FuzzyEquals__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_MathUtil_FuzzyEquals__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_FuzzyEquals'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::FuzzyEquals(float,float,float)\n"
    "    MathUtil::FuzzyEquals(float,float)\n"
    "    MathUtil::FuzzyEquals(Vector2 const &,Vector2 const &,float)\n"
    "    MathUtil::FuzzyEquals(Vector2 const &,Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_ScreenToWorld__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  int arg1 ;
  int arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::ScreenToWorld",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::ScreenToWorld",1,"int");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::ScreenToWorld",2,"int");
  arg1 = (int)lua_tonumber(L, 1);
  arg2 = (int)lua_tonumber(L, 2);
  result = MathUtil::ScreenToWorld(arg1,arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_ScreenToWorld__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vec2i *arg1 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::ScreenToWorld",1,1)
  {
    // const Vec2i& conversion
    Vec2i *vecPtr;
    Vec2i vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  result = MathUtil::ScreenToWorld((Vec2i const &)*arg1);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_ScreenToWorld(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      // Vec2i / const Vec2i& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vec2i);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain integers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      return _wrap_MathUtil_ScreenToWorld__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_MathUtil_ScreenToWorld__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_ScreenToWorld'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::ScreenToWorld(int,int)\n"
    "    MathUtil::ScreenToWorld(Vec2i const &)\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_WorldToScreen__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::WorldToScreen",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::WorldToScreen",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::WorldToScreen",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = MathUtil::WorldToScreen(arg1,arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_WorldToScreen__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::WorldToScreen",1,1)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  result = MathUtil::WorldToScreen((Vector2 const &)*arg1);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_WorldToScreen(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      // Vector2 / const Vector2& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 2))
        {
          // verify that at least the first two elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      return _wrap_MathUtil_WorldToScreen__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isnumber(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_MathUtil_WorldToScreen__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'MathUtil_WorldToScreen'\n"
    "  Possible C/C++ prototypes are:\n"
    "    MathUtil::WorldToScreen(float,float)\n"
    "    MathUtil::WorldToScreen(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_MathUtil_GetWorldDimensions(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 result;
  
  SWIG_check_num_args("MathUtil::GetWorldDimensions",0,0)
  result = MathUtil::GetWorldDimensions();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_PixelsToWorldUnits(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float result;
  
  SWIG_check_num_args("MathUtil::PixelsToWorldUnits",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::PixelsToWorldUnits",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (float)MathUtil::PixelsToWorldUnits(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_WorldUnitsToPixels(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float result;
  
  SWIG_check_num_args("MathUtil::WorldUnitsToPixels",1,1)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::WorldUnitsToPixels",1,"float");
  arg1 = (float)lua_tonumber(L, 1);
  result = (float)MathUtil::WorldUnitsToPixels(arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_DeltaAngle(lua_State* L) {
  int SWIG_arg = 0;
  float arg1 ;
  float arg2 ;
  float result;
  
  SWIG_check_num_args("MathUtil::DeltaAngle",2,2)
  if(!lua_isnumber(L,1)) SWIG_fail_arg("MathUtil::DeltaAngle",1,"float");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("MathUtil::DeltaAngle",2,"float");
  arg1 = (float)lua_tonumber(L, 1);
  arg2 = (float)lua_tonumber(L, 2);
  result = (float)MathUtil::DeltaAngle(arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MathUtil_VectorDeltaAngle(lua_State* L) {
  int SWIG_arg = 0;
  Vector2 *arg1 = 0 ;
  Vector2 *arg2 = 0 ;
  float result;
  
  SWIG_check_num_args("MathUtil::VectorDeltaAngle",2,2)
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg1 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg1 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (float)MathUtil::VectorDeltaAngle((Vector2 const &)*arg1,(Vector2 const &)*arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_MathUtil(lua_State* L) {
  int SWIG_arg = 0;
  MathUtil *result = 0 ;
  
  SWIG_check_num_args("MathUtil::MathUtil",0,0)
  result = (MathUtil *)new MathUtil();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_MathUtil,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_MathUtil(void *obj) {
MathUtil *arg1 = (MathUtil *) obj;
delete arg1;
}
static swig_lua_method swig_MathUtil_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_MathUtil_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_MathUtil_cls_attributes[] = {
    { "E", _wrap_MathUtil_E_get, SWIG_Lua_set_immutable},
    { "Log10E", _wrap_MathUtil_Log10E_get, SWIG_Lua_set_immutable},
    { "Log2E", _wrap_MathUtil_Log2E_get, SWIG_Lua_set_immutable},
    { "Pi", _wrap_MathUtil_Pi_get, SWIG_Lua_set_immutable},
    { "PiOver2", _wrap_MathUtil_PiOver2_get, SWIG_Lua_set_immutable},
    { "PiOver4", _wrap_MathUtil_PiOver4_get, SWIG_Lua_set_immutable},
    { "TwoPi", _wrap_MathUtil_TwoPi_get, SWIG_Lua_set_immutable},
    { "MaxFloat", _wrap_MathUtil_MaxFloat_get, SWIG_Lua_set_immutable},
    { "MinFloat", _wrap_MathUtil_MinFloat_get, SWIG_Lua_set_immutable},
    { "Epsilon", _wrap_MathUtil_Epsilon_get, SWIG_Lua_set_immutable},
    {0,0,0}
};
static swig_lua_method swig_MathUtil_cls_methods[] = {
    {"ToDegrees", _wrap_MathUtil_ToDegrees}, 
    {"ToRadians", _wrap_MathUtil_ToRadians}, 
    {"VectorFromAngle", _wrap_MathUtil_VectorFromAngle}, 
    {"AngleFromVector", _wrap_MathUtil_AngleFromVector}, 
    {"AngleFromVectors", _wrap_MathUtil_AngleFromVectors}, 
    {"RoundToInt", _wrap_MathUtil_RoundToInt}, 
    {"RandomInt", _wrap_MathUtil_RandomInt}, 
    {"RandomIntInRange", _wrap_MathUtil_RandomIntInRange}, 
    {"RandomIntWithError", _wrap_MathUtil_RandomIntWithError}, 
    {"RandomFloat", _wrap_MathUtil_RandomFloat}, 
    {"RandomFloatInRange", _wrap_MathUtil_RandomFloatInRange}, 
    {"RandomFloatWithError", _wrap_MathUtil_RandomFloatWithError}, 
    {"RandomBool", _wrap_MathUtil_RandomBool}, 
    {"RandomVector", _wrap_MathUtil_RandomVector}, 
    {"RandomPointField", _wrap_MathUtil_RandomPointField}, 
    {"FuzzyEquals", _wrap_MathUtil_FuzzyEquals}, 
    {"ScreenToWorld", _wrap_MathUtil_ScreenToWorld}, 
    {"WorldToScreen", _wrap_MathUtil_WorldToScreen}, 
    {"GetWorldDimensions", _wrap_MathUtil_GetWorldDimensions}, 
    {"PixelsToWorldUnits", _wrap_MathUtil_PixelsToWorldUnits}, 
    {"WorldUnitsToPixels", _wrap_MathUtil_WorldUnitsToPixels}, 
    {"DeltaAngle", _wrap_MathUtil_DeltaAngle}, 
    {"VectorDeltaAngle", _wrap_MathUtil_VectorDeltaAngle}, 
    {0,0}
};
static swig_lua_const_info swig_MathUtil_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_MathUtil_bases[] = {0};
static const char *swig_MathUtil_base_names[] = {0};
static swig_lua_class _wrap_class_MathUtil = { "MathUtil", &SWIGTYPE_p_MathUtil,_wrap_new_MathUtil, swig_delete_MathUtil, swig_MathUtil_methods, swig_MathUtil_attributes, { "MathUtil", swig_MathUtil_cls_methods, swig_MathUtil_cls_attributes, swig_MathUtil_cls_constants }, swig_MathUtil_bases, swig_MathUtil_base_names };

static int _wrap_World_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  World *result = 0 ;
  
  SWIG_check_num_args("World::GetInstance",0,0)
  result = (World *) &World::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_World,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_GetVideoModes(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  SwigValueWrapper< std::vector< Vec3ui > > result;
  
  SWIG_check_num_args("World::GetVideoModes",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::GetVideoModes",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_GetVideoModes",1,SWIGTYPE_p_World);
  }
  
  result = (arg1)->GetVideoModes();
  {
    std::vector< Vec3ui > * resultptr = new std::vector< Vec3ui >((const std::vector< Vec3ui > &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_std__vectorT_Vec3ui_t,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_AdjustWindow(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  int arg2 ;
  int arg3 ;
  String *arg4 = 0 ;
  String temp4 ;
  
  SWIG_check_num_args("World::AdjustWindow",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::AdjustWindow",1,"World *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("World::AdjustWindow",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("World::AdjustWindow",3,"int");
  if(!lua_isstring(L,4)) SWIG_fail_arg("World::AdjustWindow",4,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_AdjustWindow",1,SWIGTYPE_p_World);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  temp4.assign(lua_tostring(L,4),lua_rawlen(L,4)); arg4=&temp4;
  (arg1)->AdjustWindow(arg2,arg3,(String const &)*arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_MoveWindow(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  int arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("World::MoveWindow",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::MoveWindow",1,"World *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("World::MoveWindow",2,"int");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("World::MoveWindow",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_MoveWindow",1,SWIGTYPE_p_World);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  arg3 = (int)lua_tonumber(L, 3);
  (arg1)->MoveWindow(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_ResetWorld(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  
  SWIG_check_num_args("World::ResetWorld",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::ResetWorld",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_ResetWorld",1,SWIGTYPE_p_World);
  }
  
  (arg1)->ResetWorld();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_StopGame(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  
  SWIG_check_num_args("World::StopGame",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::StopGame",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_StopGame",1,SWIGTYPE_p_World);
  }
  
  (arg1)->StopGame();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_GetCurrentTimeSeconds(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  float result;
  
  SWIG_check_num_args("World::GetCurrentTimeSeconds",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::GetCurrentTimeSeconds",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_GetCurrentTimeSeconds",1,SWIGTYPE_p_World);
  }
  
  result = (float)(arg1)->GetCurrentTimeSeconds();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetBackgroundColor(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Color arg2 ;
  
  SWIG_check_num_args("World::SetBackgroundColor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::SetBackgroundColor",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_SetBackgroundColor",1,SWIGTYPE_p_World);
  }
  
  {
    // Color conversion
    Color *colPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = *colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      arg2 = Color(r, g, b, a);
    }
  }
  (arg1)->SetBackgroundColor(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_Add__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  int arg3 ;
  
  SWIG_check_num_args("World::Add",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::Add",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::Add",2,"Renderable *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("World::Add",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_Add",1,SWIGTYPE_p_World);
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("World_Add",2,SWIGTYPE_p_Renderable);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  (arg1)->Add(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_Add__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  
  SWIG_check_num_args("World::Add",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::Add",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::Add",2,"Renderable *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_Add",1,SWIGTYPE_p_World);
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("World_Add",2,SWIGTYPE_p_Renderable);
  }
  
  (arg1)->Add(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_Add__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  String arg3 ;
  
  SWIG_check_num_args("World::Add",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::Add",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::Add",2,"Renderable *");
  if(!lua_isstring(L,3)) SWIG_fail_arg("World::Add",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_Add",1,SWIGTYPE_p_World);
  }
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("World_Add",2,SWIGTYPE_p_Renderable);
  }
  
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  (arg1)->Add(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_Add(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Renderable, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_World_Add__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Renderable, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_World_Add__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Renderable, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_World_Add__SWIG_2(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'World_Add'\n"
    "  Possible C/C++ prototypes are:\n"
    "    World::Add(Renderable *,int)\n"
    "    World::Add(Renderable *)\n"
    "    World::Add(Renderable *,String)\n");
  lua_error(L);return 0;
}


static int _wrap_World_Remove(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  
  SWIG_check_num_args("World::Remove",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::Remove",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::Remove",2,"Renderable *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_Remove",1,SWIGTYPE_p_World);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("World_Remove",2,SWIGTYPE_p_Renderable);
  }
  
  (arg1)->Remove(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_UpdateLayer__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  int arg3 ;
  
  SWIG_check_num_args("World::UpdateLayer",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::UpdateLayer",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::UpdateLayer",2,"Renderable *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("World::UpdateLayer",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_UpdateLayer",1,SWIGTYPE_p_World);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("World_UpdateLayer",2,SWIGTYPE_p_Renderable);
  }
  
  arg3 = (int)lua_tonumber(L, 3);
  (arg1)->UpdateLayer(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_UpdateLayer__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Renderable *arg2 = (Renderable *) 0 ;
  String arg3 ;
  
  SWIG_check_num_args("World::UpdateLayer",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::UpdateLayer",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::UpdateLayer",2,"Renderable *");
  if(!lua_isstring(L,3)) SWIG_fail_arg("World::UpdateLayer",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_UpdateLayer",1,SWIGTYPE_p_World);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Renderable,0))){
    SWIG_fail_ptr("World_UpdateLayer",2,SWIGTYPE_p_Renderable);
  }
  
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  (arg1)->UpdateLayer(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_UpdateLayer(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Renderable, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_World_UpdateLayer__SWIG_0(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Renderable, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isstring(L,argv[2]);
        }
        if (_v) {
          return _wrap_World_UpdateLayer__SWIG_1(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'World_UpdateLayer'\n"
    "  Possible C/C++ prototypes are:\n"
    "    World::UpdateLayer(Renderable *,int)\n"
    "    World::UpdateLayer(Renderable *,String)\n");
  lua_error(L);return 0;
}


static int _wrap_World_NameLayer(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  String arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("World::NameLayer",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::NameLayer",1,"World *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("World::NameLayer",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("World::NameLayer",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_NameLayer",1,SWIGTYPE_p_World);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  (arg1)->NameLayer(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_GetLayerByName(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  String arg2 ;
  int result;
  
  SWIG_check_num_args("World::GetLayerByName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::GetLayerByName",1,"World *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("World::GetLayerByName",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_GetLayerByName",1,SWIGTYPE_p_World);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (int)(arg1)->GetLayerByName(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_DrawDebugLine__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  float arg4 ;
  Color arg5 ;
  
  SWIG_check_num_args("World::DrawDebugLine",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::DrawDebugLine",1,"World *");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("World::DrawDebugLine",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_DrawDebugLine",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  arg4 = (float)lua_tonumber(L, 4);
  {
    // Color conversion
    Color *colPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,5,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg5 = *colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 5);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 5);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 5);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 5) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 5);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      arg5 = Color(r, g, b, a);
    }
  }
  (arg1)->DrawDebugLine((Vector2 const &)*arg2,(Vector2 const &)*arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_DrawDebugLine__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  float arg4 ;
  
  SWIG_check_num_args("World::DrawDebugLine",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::DrawDebugLine",1,"World *");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("World::DrawDebugLine",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_DrawDebugLine",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  arg4 = (float)lua_tonumber(L, 4);
  (arg1)->DrawDebugLine((Vector2 const &)*arg2,(Vector2 const &)*arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_DrawDebugLine__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("World::DrawDebugLine",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::DrawDebugLine",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_DrawDebugLine",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->DrawDebugLine((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_DrawDebugLine(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          return _wrap_World_DrawDebugLine__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_World_DrawDebugLine__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              // Color / const Color& typecheck
              _v = 0;
              swig_lua_userdata* usr;
              swig_cast_info *cast;
              usr=(swig_lua_userdata*)lua_touserdata(L,argv[4]);
              if (usr != NULL)
              {
                cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
                if (cast)
                {
                  _v = 1;
                }
              }
              
              if (!_v)
              {
                if (lua_istable(L, argv[4]) && (lua_rawlen(L, argv[4]) >= 3))
                {
                  // verify that at least the first three elements of the table contain numbers
                  lua_pushinteger(L, 1);
                  lua_gettable(L, argv[4]);
                  int v1 = lua_isnumber(L, -1);
                  lua_pop(L, 1);
                  lua_pushinteger(L, 2);
                  lua_gettable(L, argv[4]);
                  int v2 = lua_isnumber(L, -1);
                  lua_pop(L, 1);
                  lua_pushinteger(L, 3);
                  lua_gettable(L, argv[4]);
                  int v3 = lua_isnumber(L, -1);
                  lua_pop(L, 1);
                  _v = (v1 && v2 && v3);
                }
                else
                {
                  _v = 0;
                }
              }
            }
            if (_v) {
              return _wrap_World_DrawDebugLine__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'World_DrawDebugLine'\n"
    "  Possible C/C++ prototypes are:\n"
    "    World::DrawDebugLine(Vector2 const &,Vector2 const &,float,Color)\n"
    "    World::DrawDebugLine(Vector2 const &,Vector2 const &,float)\n"
    "    World::DrawDebugLine(Vector2 const &,Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_World_PurgeDebugDrawing(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  
  SWIG_check_num_args("World::PurgeDebugDrawing",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::PurgeDebugDrawing",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_PurgeDebugDrawing",1,SWIGTYPE_p_World);
  }
  
  (arg1)->PurgeDebugDrawing();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_PauseSimulation(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::PauseSimulation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::PauseSimulation",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_PauseSimulation",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->PauseSimulation();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_ResumeSimulation(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::ResumeSimulation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::ResumeSimulation",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_ResumeSimulation",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->ResumeSimulation();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_IsSimulationOn(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::IsSimulationOn",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::IsSimulationOn",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_IsSimulationOn",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->IsSimulationOn();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetupPhysics__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  Vector2 *arg4 = 0 ;
  bool result;
  
  SWIG_check_num_args("World::SetupPhysics",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::SetupPhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_SetupPhysics",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg4 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 4);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 4);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg4 = &vec;
    }
  }
  result = (bool)(arg1)->SetupPhysics((Vector2 const &)*arg2,(Vector2 const &)*arg3,(Vector2 const &)*arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetupPhysics__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  bool result;
  
  SWIG_check_num_args("World::SetupPhysics",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::SetupPhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_SetupPhysics",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  result = (bool)(arg1)->SetupPhysics((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetupPhysics__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Vector2 *arg2 = 0 ;
  bool result;
  
  SWIG_check_num_args("World::SetupPhysics",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::SetupPhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_SetupPhysics",1,SWIGTYPE_p_World);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  result = (bool)(arg1)->SetupPhysics((Vector2 const &)*arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetupPhysics__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::SetupPhysics",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::SetupPhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_SetupPhysics",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->SetupPhysics();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_SetupPhysics(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_World_SetupPhysics__SWIG_3(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_World_SetupPhysics__SWIG_2(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          return _wrap_World_SetupPhysics__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_World, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          // Vector2 / const Vector2& typecheck
          _v = 0;
          swig_lua_userdata* usr;
          swig_cast_info *cast;
          usr=(swig_lua_userdata*)lua_touserdata(L,argv[2]);
          if (usr != NULL)
          {
            cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
            if (cast)
            {
              _v = 1;
            }
          }
          
          if (!_v)
          {
            if (lua_istable(L, argv[2]) && (lua_rawlen(L, argv[2]) >= 2))
            {
              // verify that at least the first two elements of the table contain numbers
              lua_pushinteger(L, 1);
              lua_gettable(L, argv[2]);
              int v1 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              lua_pushinteger(L, 2);
              lua_gettable(L, argv[2]);
              int v2 = lua_isnumber(L, -1);
              lua_pop(L, 1);
              _v = (v1 && v2);
            }
            else
            {
              _v = 0;
            }
          }
        }
        if (_v) {
          {
            // Vector2 / const Vector2& typecheck
            _v = 0;
            swig_lua_userdata* usr;
            swig_cast_info *cast;
            usr=(swig_lua_userdata*)lua_touserdata(L,argv[3]);
            if (usr != NULL)
            {
              cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
              if (cast)
              {
                _v = 1;
              }
            }
            
            if (!_v)
            {
              if (lua_istable(L, argv[3]) && (lua_rawlen(L, argv[3]) >= 2))
              {
                // verify that at least the first two elements of the table contain numbers
                lua_pushinteger(L, 1);
                lua_gettable(L, argv[3]);
                int v1 = lua_isnumber(L, -1);
                lua_pop(L, 1);
                lua_pushinteger(L, 2);
                lua_gettable(L, argv[3]);
                int v2 = lua_isnumber(L, -1);
                lua_pop(L, 1);
                _v = (v1 && v2);
              }
              else
              {
                _v = 0;
              }
            }
          }
          if (_v) {
            return _wrap_World_SetupPhysics__SWIG_0(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'World_SetupPhysics'\n"
    "  Possible C/C++ prototypes are:\n"
    "    World::SetupPhysics(Vector2 const &,Vector2 const &,Vector2 const &)\n"
    "    World::SetupPhysics(Vector2 const &,Vector2 const &)\n"
    "    World::SetupPhysics(Vector2 const &)\n"
    "    World::SetupPhysics()\n");
  lua_error(L);return 0;
}


static int _wrap_World_IsPhysicsSetUp(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::IsPhysicsSetUp",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::IsPhysicsSetUp",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_IsPhysicsSetUp",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->IsPhysicsSetUp();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_PausePhysics(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::PausePhysics",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::PausePhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_PausePhysics",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->PausePhysics();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_ResumePhysics(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  bool result;
  
  SWIG_check_num_args("World::ResumePhysics",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::ResumePhysics",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_ResumePhysics",1,SWIGTYPE_p_World);
  }
  
  result = (bool)(arg1)->ResumePhysics();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_RegisterConsole(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Console *arg2 = (Console *) 0 ;
  
  SWIG_check_num_args("World::RegisterConsole",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::RegisterConsole",1,"World *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("World::RegisterConsole",2,"Console *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_RegisterConsole",1,SWIGTYPE_p_World);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Console,0))){
    SWIG_fail_ptr("World_RegisterConsole",2,SWIGTYPE_p_Console);
  }
  
  (arg1)->RegisterConsole(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_World_GetConsole(lua_State* L) {
  int SWIG_arg = 0;
  World *arg1 = (World *) 0 ;
  Console *result = 0 ;
  
  SWIG_check_num_args("World::GetConsole",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("World::GetConsole",1,"World *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_World,0))){
    SWIG_fail_ptr("World_GetConsole",1,SWIGTYPE_p_World);
  }
  
  result = (Console *)(arg1)->GetConsole();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Console,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_World(void *obj) {
World *arg1 = (World *) obj;
delete arg1;
}
static swig_lua_method swig_World_methods[] = {
    {"GetVideoModes", _wrap_World_GetVideoModes}, 
    {"AdjustWindow", _wrap_World_AdjustWindow}, 
    {"MoveWindow", _wrap_World_MoveWindow}, 
    {"ResetWorld", _wrap_World_ResetWorld}, 
    {"StopGame", _wrap_World_StopGame}, 
    {"GetCurrentTimeSeconds", _wrap_World_GetCurrentTimeSeconds}, 
    {"SetBackgroundColor", _wrap_World_SetBackgroundColor}, 
    {"Add", _wrap_World_Add}, 
    {"Remove", _wrap_World_Remove}, 
    {"UpdateLayer", _wrap_World_UpdateLayer}, 
    {"NameLayer", _wrap_World_NameLayer}, 
    {"GetLayerByName", _wrap_World_GetLayerByName}, 
    {"DrawDebugLine", _wrap_World_DrawDebugLine}, 
    {"PurgeDebugDrawing", _wrap_World_PurgeDebugDrawing}, 
    {"PauseSimulation", _wrap_World_PauseSimulation}, 
    {"ResumeSimulation", _wrap_World_ResumeSimulation}, 
    {"IsSimulationOn", _wrap_World_IsSimulationOn}, 
    {"SetupPhysics", _wrap_World_SetupPhysics}, 
    {"IsPhysicsSetUp", _wrap_World_IsPhysicsSetUp}, 
    {"PausePhysics", _wrap_World_PausePhysics}, 
    {"ResumePhysics", _wrap_World_ResumePhysics}, 
    {"RegisterConsole", _wrap_World_RegisterConsole}, 
    {"GetConsole", _wrap_World_GetConsole}, 
    {0,0}
};
static swig_lua_attribute swig_World_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_World_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_World_cls_methods[] = {
    {"GetInstance", _wrap_World_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_World_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_World_bases[] = {0};
static const char *swig_World_base_names[] = {0};
static swig_lua_class _wrap_class_World = { "World", &SWIGTYPE_p_World,0, swig_delete_World, swig_World_methods, swig_World_attributes, { "World", swig_World_cls_methods, swig_World_cls_attributes, swig_World_cls_constants }, swig_World_bases, swig_World_base_names };

static int _wrap_DeveloperLog_Log(lua_State* L) {
  int SWIG_arg = 0;
  DeveloperLog *arg1 = (DeveloperLog *) 0 ;
  String *arg2 = 0 ;
  String temp2 ;
  
  SWIG_check_num_args("DeveloperLog::Log",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("DeveloperLog::Log",1,"DeveloperLog *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("DeveloperLog::Log",2,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_DeveloperLog,0))){
    SWIG_fail_ptr("DeveloperLog_Log",1,SWIGTYPE_p_DeveloperLog);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  (arg1)->Log((String const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_DeveloperLog_Printf(lua_State* L) {
  int SWIG_arg = 0;
  DeveloperLog *arg1 = (DeveloperLog *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  
  SWIG_check_num_args("DeveloperLog::Printf",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("DeveloperLog::Printf",1,"DeveloperLog *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("DeveloperLog::Printf",2,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_DeveloperLog,0))){
    SWIG_fail_ptr("DeveloperLog_Printf",1,SWIGTYPE_p_DeveloperLog);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  (arg1)->Printf((char const *)arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_DeveloperLog(void *obj) {
DeveloperLog *arg1 = (DeveloperLog *) obj;
delete arg1;
}
static swig_lua_method swig_DeveloperLog_methods[] = {
    {"Log", _wrap_DeveloperLog_Log}, 
    {"Printf", _wrap_DeveloperLog_Printf}, 
    {0,0}
};
static swig_lua_attribute swig_DeveloperLog_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_DeveloperLog_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_DeveloperLog_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_DeveloperLog_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_DeveloperLog_bases[] = {0};
static const char *swig_DeveloperLog_base_names[] = {0};
static swig_lua_class _wrap_class_DeveloperLog = { "DeveloperLog", &SWIGTYPE_p_DeveloperLog,0, swig_delete_DeveloperLog, swig_DeveloperLog_methods, swig_DeveloperLog_attributes, { "DeveloperLog", swig_DeveloperLog_cls_methods, swig_DeveloperLog_cls_attributes, swig_DeveloperLog_cls_constants }, swig_DeveloperLog_bases, swig_DeveloperLog_base_names };

static int _wrap_ConsoleLog_Log(lua_State* L) {
  int SWIG_arg = 0;
  ConsoleLog *arg1 = (ConsoleLog *) 0 ;
  String *arg2 = 0 ;
  String temp2 ;
  
  SWIG_check_num_args("ConsoleLog::Log",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ConsoleLog::Log",1,"ConsoleLog *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("ConsoleLog::Log",2,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ConsoleLog,0))){
    SWIG_fail_ptr("ConsoleLog_Log",1,SWIGTYPE_p_ConsoleLog);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  (arg1)->Log((String const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ConsoleLog(lua_State* L) {
  int SWIG_arg = 0;
  ConsoleLog *result = 0 ;
  
  SWIG_check_num_args("ConsoleLog::ConsoleLog",0,0)
  result = (ConsoleLog *)new ConsoleLog();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ConsoleLog,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_ConsoleLog(void *obj) {
ConsoleLog *arg1 = (ConsoleLog *) obj;
delete arg1;
}
static swig_lua_method swig_ConsoleLog_methods[] = {
    {"Log", _wrap_ConsoleLog_Log}, 
    {0,0}
};
static swig_lua_attribute swig_ConsoleLog_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_ConsoleLog_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ConsoleLog_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_ConsoleLog_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_ConsoleLog_bases[] = {0,0};
static const char *swig_ConsoleLog_base_names[] = {"DeveloperLog *",0};
static swig_lua_class _wrap_class_ConsoleLog = { "ConsoleLog", &SWIGTYPE_p_ConsoleLog,_wrap_new_ConsoleLog, swig_delete_ConsoleLog, swig_ConsoleLog_methods, swig_ConsoleLog_attributes, { "ConsoleLog", swig_ConsoleLog_cls_methods, swig_ConsoleLog_cls_attributes, swig_ConsoleLog_cls_constants }, swig_ConsoleLog_bases, swig_ConsoleLog_base_names };

static int _wrap_FileLog_MakeLogFileName(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  String temp1 ;
  String result;
  
  SWIG_check_num_args("FileLog::MakeLogFileName",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("FileLog::MakeLogFileName",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  result = FileLog::MakeLogFileName((std::string const &)*arg1);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_FileLog(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  String temp1 ;
  FileLog *result = 0 ;
  
  SWIG_check_num_args("FileLog::FileLog",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("FileLog::FileLog",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  result = (FileLog *)new FileLog((String const &)*arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_FileLog,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_FileLog_Log(lua_State* L) {
  int SWIG_arg = 0;
  FileLog *arg1 = (FileLog *) 0 ;
  String *arg2 = 0 ;
  String temp2 ;
  
  SWIG_check_num_args("FileLog::Log",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("FileLog::Log",1,"FileLog *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("FileLog::Log",2,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FileLog,0))){
    SWIG_fail_ptr("FileLog_Log",1,SWIGTYPE_p_FileLog);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  (arg1)->Log((String const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_FileLog(void *obj) {
FileLog *arg1 = (FileLog *) obj;
delete arg1;
}
static swig_lua_method swig_FileLog_methods[] = {
    {"Log", _wrap_FileLog_Log}, 
    {0,0}
};
static swig_lua_attribute swig_FileLog_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_FileLog_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_FileLog_cls_methods[] = {
    {"MakeLogFileName", _wrap_FileLog_MakeLogFileName}, 
    {0,0}
};
static swig_lua_const_info swig_FileLog_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_FileLog_bases[] = {0,0};
static const char *swig_FileLog_base_names[] = {"DeveloperLog *",0};
static swig_lua_class _wrap_class_FileLog = { "FileLog", &SWIGTYPE_p_FileLog,_wrap_new_FileLog, swig_delete_FileLog, swig_FileLog_methods, swig_FileLog_attributes, { "FileLog", swig_FileLog_cls_methods, swig_FileLog_cls_attributes, swig_FileLog_cls_constants }, swig_FileLog_bases, swig_FileLog_base_names };

static int _wrap_SystemLog_Log(lua_State* L) {
  int SWIG_arg = 0;
  SystemLog *arg1 = (SystemLog *) 0 ;
  String *arg2 = 0 ;
  String temp2 ;
  
  SWIG_check_num_args("SystemLog::Log",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SystemLog::Log",1,"SystemLog *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("SystemLog::Log",2,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SystemLog,0))){
    SWIG_fail_ptr("SystemLog_Log",1,SWIGTYPE_p_SystemLog);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  (arg1)->Log((String const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_SystemLog(lua_State* L) {
  int SWIG_arg = 0;
  SystemLog *result = 0 ;
  
  SWIG_check_num_args("SystemLog::SystemLog",0,0)
  result = (SystemLog *)new SystemLog();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_SystemLog,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SystemLog(void *obj) {
SystemLog *arg1 = (SystemLog *) obj;
delete arg1;
}
static swig_lua_method swig_SystemLog_methods[] = {
    {"Log", _wrap_SystemLog_Log}, 
    {0,0}
};
static swig_lua_attribute swig_SystemLog_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_SystemLog_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_SystemLog_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_SystemLog_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_SystemLog_bases[] = {0,0};
static const char *swig_SystemLog_base_names[] = {"DeveloperLog *",0};
static swig_lua_class _wrap_class_SystemLog = { "SystemLog", &SWIGTYPE_p_SystemLog,_wrap_new_SystemLog, swig_delete_SystemLog, swig_SystemLog_methods, swig_SystemLog_attributes, { "SystemLog", swig_SystemLog_cls_methods, swig_SystemLog_cls_attributes, swig_SystemLog_cls_constants }, swig_SystemLog_bases, swig_SystemLog_base_names };

static int _wrap_CompoundLog_AddLog(lua_State* L) {
  int SWIG_arg = 0;
  CompoundLog *arg1 = (CompoundLog *) 0 ;
  DeveloperLog *arg2 = (DeveloperLog *) 0 ;
  
  SWIG_check_num_args("CompoundLog::AddLog",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CompoundLog::AddLog",1,"CompoundLog *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("CompoundLog::AddLog",2,"DeveloperLog *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CompoundLog,0))){
    SWIG_fail_ptr("CompoundLog_AddLog",1,SWIGTYPE_p_CompoundLog);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_DeveloperLog,0))){
    SWIG_fail_ptr("CompoundLog_AddLog",2,SWIGTYPE_p_DeveloperLog);
  }
  
  (arg1)->AddLog(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_CompoundLog_Log(lua_State* L) {
  int SWIG_arg = 0;
  CompoundLog *arg1 = (CompoundLog *) 0 ;
  String *arg2 = 0 ;
  String temp2 ;
  
  SWIG_check_num_args("CompoundLog::Log",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CompoundLog::Log",1,"CompoundLog *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("CompoundLog::Log",2,"String const &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CompoundLog,0))){
    SWIG_fail_ptr("CompoundLog_Log",1,SWIGTYPE_p_CompoundLog);
  }
  
  temp2.assign(lua_tostring(L,2),lua_rawlen(L,2)); arg2=&temp2;
  (arg1)->Log((String const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_CompoundLog_GetSystemLog(lua_State* L) {
  int SWIG_arg = 0;
  CompoundLog *result = 0 ;
  
  SWIG_check_num_args("CompoundLog::GetSystemLog",0,0)
  result = (CompoundLog *) &CompoundLog::GetSystemLog();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_CompoundLog,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_CompoundLog(lua_State* L) {
  int SWIG_arg = 0;
  CompoundLog *result = 0 ;
  
  SWIG_check_num_args("CompoundLog::CompoundLog",0,0)
  result = (CompoundLog *)new CompoundLog();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_CompoundLog,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_CompoundLog(void *obj) {
CompoundLog *arg1 = (CompoundLog *) obj;
delete arg1;
}
static swig_lua_method swig_CompoundLog_methods[] = {
    {"AddLog", _wrap_CompoundLog_AddLog}, 
    {"Log", _wrap_CompoundLog_Log}, 
    {0,0}
};
static swig_lua_attribute swig_CompoundLog_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_CompoundLog_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_CompoundLog_cls_methods[] = {
    {"GetSystemLog", _wrap_CompoundLog_GetSystemLog}, 
    {0,0}
};
static swig_lua_const_info swig_CompoundLog_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_CompoundLog_bases[] = {0,0};
static const char *swig_CompoundLog_base_names[] = {"DeveloperLog *",0};
static swig_lua_class _wrap_class_CompoundLog = { "CompoundLog", &SWIGTYPE_p_CompoundLog,_wrap_new_CompoundLog, swig_delete_CompoundLog, swig_CompoundLog_methods, swig_CompoundLog_attributes, { "CompoundLog", swig_CompoundLog_cls_methods, swig_CompoundLog_cls_attributes, swig_CompoundLog_cls_constants }, swig_CompoundLog_bases, swig_CompoundLog_base_names };

static int _wrap_Tuning_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *result = 0 ;
  
  SWIG_check_num_args("Tuning::GetInstance",0,0)
  result = (Tuning *) &Tuning::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Tuning,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_GetVariables(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  SwigValueWrapper< std::set< std::string > > result;
  
  SWIG_check_num_args("Tuning::GetVariables",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::GetVariables",1,"Tuning *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_GetVariables",1,SWIGTYPE_p_Tuning);
  }
  
  result = (arg1)->GetVariables();
  
  {
    lua_newtable(L);
    
    std::set<String>::iterator it = (&result)->begin();
    int setCounter = 1;
    while (it != (&result)->end())
    {
      lua_pushnumber(L, setCounter++);
      lua_pushstring(L, (*it).c_str()); 
      lua_settable(L, -3);
      
      it++;
    }
    
    SWIG_arg += 1; 
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_GetInt(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  int result;
  
  SWIG_check_num_args("Tuning::GetInt",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::GetInt",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::GetInt",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_GetInt",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (int)(arg1)->GetInt(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_GetFloat(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  float result;
  
  SWIG_check_num_args("Tuning::GetFloat",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::GetFloat",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::GetFloat",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_GetFloat",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (float)(arg1)->GetFloat(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_GetString(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  String result;
  
  SWIG_check_num_args("Tuning::GetString",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::GetString",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::GetString",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_GetString",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (arg1)->GetString(arg2);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_GetVector(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  Vector2 result;
  
  SWIG_check_num_args("Tuning::GetVector",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::GetVector",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::GetVector",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_GetVector",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (arg1)->GetVector(arg2);
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_SetInt(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  int arg3 ;
  
  SWIG_check_num_args("Tuning::SetInt",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::SetInt",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::SetInt",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Tuning::SetInt",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_SetInt",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  (arg1)->SetInt(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_SetFloat(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Tuning::SetFloat",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::SetFloat",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::SetFloat",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Tuning::SetFloat",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_SetFloat",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetFloat(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_SetString(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  String arg3 ;
  
  SWIG_check_num_args("Tuning::SetString",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::SetString",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::SetString",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Tuning::SetString",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_SetString",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  (arg1)->SetString(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_SetVector(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("Tuning::SetVector",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::SetVector",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::SetVector",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_SetVector",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->SetVector(arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_AddToRuntimeTuningList(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("Tuning::AddToRuntimeTuningList",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::AddToRuntimeTuningList",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::AddToRuntimeTuningList",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_AddToRuntimeTuningList",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->AddToRuntimeTuningList(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Tuning_IsRuntimeTuned(lua_State* L) {
  int SWIG_arg = 0;
  Tuning *arg1 = (Tuning *) 0 ;
  String arg2 ;
  bool result;
  
  SWIG_check_num_args("Tuning::IsRuntimeTuned",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Tuning::IsRuntimeTuned",1,"Tuning *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Tuning::IsRuntimeTuned",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Tuning,0))){
    SWIG_fail_ptr("Tuning_IsRuntimeTuned",1,SWIGTYPE_p_Tuning);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (bool)(arg1)->IsRuntimeTuned(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Tuning(void *obj) {
Tuning *arg1 = (Tuning *) obj;
delete arg1;
}
static swig_lua_method swig_Tuning_methods[] = {
    {"GetVariables", _wrap_Tuning_GetVariables}, 
    {"GetInt", _wrap_Tuning_GetInt}, 
    {"GetFloat", _wrap_Tuning_GetFloat}, 
    {"GetString", _wrap_Tuning_GetString}, 
    {"GetVector", _wrap_Tuning_GetVector}, 
    {"SetInt", _wrap_Tuning_SetInt}, 
    {"SetFloat", _wrap_Tuning_SetFloat}, 
    {"SetString", _wrap_Tuning_SetString}, 
    {"SetVector", _wrap_Tuning_SetVector}, 
    {"AddToRuntimeTuningList", _wrap_Tuning_AddToRuntimeTuningList}, 
    {"IsRuntimeTuned", _wrap_Tuning_IsRuntimeTuned}, 
    {0,0}
};
static swig_lua_attribute swig_Tuning_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Tuning_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Tuning_cls_methods[] = {
    {"GetInstance", _wrap_Tuning_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_Tuning_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Tuning_bases[] = {0};
static const char *swig_Tuning_base_names[] = {0};
static swig_lua_class _wrap_class_Tuning = { "Tuning", &SWIGTYPE_p_Tuning,0, swig_delete_Tuning, swig_Tuning_methods, swig_Tuning_attributes, { "Tuning", swig_Tuning_cls_methods, swig_Tuning_cls_attributes, swig_Tuning_cls_constants }, swig_Tuning_bases, swig_Tuning_base_names };

static int _wrap_Preferences_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *result = 0 ;
  
  SWIG_check_num_args("Preferences::GetInstance",0,0)
  result = (Preferences *) &Preferences::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Preferences,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_SavePreferences(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  
  SWIG_check_num_args("Preferences::SavePreferences",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::SavePreferences",1,"Preferences *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_SavePreferences",1,SWIGTYPE_p_Preferences);
  }
  
  (arg1)->SavePreferences();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_GetInt(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  int result;
  
  SWIG_check_num_args("Preferences::GetInt",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::GetInt",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::GetInt",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::GetInt",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_GetInt",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  result = (int)(arg1)->GetInt(arg2,arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_GetFloat(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  float result;
  
  SWIG_check_num_args("Preferences::GetFloat",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::GetFloat",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::GetFloat",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::GetFloat",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_GetFloat",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  result = (float)(arg1)->GetFloat(arg2,arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_GetString(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  String result;
  
  SWIG_check_num_args("Preferences::GetString",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::GetString",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::GetString",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::GetString",3,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_GetString",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  result = (arg1)->GetString(arg2,arg3);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_SetInt(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  int arg4 ;
  
  SWIG_check_num_args("Preferences::SetInt",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::SetInt",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::SetInt",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::SetInt",3,"String");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Preferences::SetInt",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_SetInt",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  arg4 = (int)lua_tonumber(L, 4);
  (arg1)->SetInt(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_SetFloat(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  float arg4 ;
  
  SWIG_check_num_args("Preferences::SetFloat",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::SetFloat",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::SetFloat",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::SetFloat",3,"String");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Preferences::SetFloat",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_SetFloat",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  arg4 = (float)lua_tonumber(L, 4);
  (arg1)->SetFloat(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_SetString(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String arg2 ;
  String arg3 ;
  String arg4 ;
  
  SWIG_check_num_args("Preferences::SetString",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::SetString",1,"Preferences *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Preferences::SetString",2,"String");
  if(!lua_isstring(L,3)) SWIG_fail_arg("Preferences::SetString",3,"String");
  if(!lua_isstring(L,4)) SWIG_fail_arg("Preferences::SetString",4,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_SetString",1,SWIGTYPE_p_Preferences);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (&arg3)->assign(lua_tostring(L,3),lua_rawlen(L,3));
  (&arg4)->assign(lua_tostring(L,4),lua_rawlen(L,4));
  (arg1)->SetString(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_GetDefaultPath(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String result;
  
  SWIG_check_num_args("Preferences::GetDefaultPath",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::GetDefaultPath",1,"Preferences *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_GetDefaultPath",1,SWIGTYPE_p_Preferences);
  }
  
  result = (arg1)->GetDefaultPath();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Preferences_GetUserPrefsPath(lua_State* L) {
  int SWIG_arg = 0;
  Preferences *arg1 = (Preferences *) 0 ;
  String result;
  
  SWIG_check_num_args("Preferences::GetUserPrefsPath",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Preferences::GetUserPrefsPath",1,"Preferences *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Preferences,0))){
    SWIG_fail_ptr("Preferences_GetUserPrefsPath",1,SWIGTYPE_p_Preferences);
  }
  
  result = (arg1)->GetUserPrefsPath();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Preferences(void *obj) {
Preferences *arg1 = (Preferences *) obj;
delete arg1;
}
static swig_lua_method swig_Preferences_methods[] = {
    {"SavePreferences", _wrap_Preferences_SavePreferences}, 
    {"GetInt", _wrap_Preferences_GetInt}, 
    {"GetFloat", _wrap_Preferences_GetFloat}, 
    {"GetString", _wrap_Preferences_GetString}, 
    {"SetInt", _wrap_Preferences_SetInt}, 
    {"SetFloat", _wrap_Preferences_SetFloat}, 
    {"SetString", _wrap_Preferences_SetString}, 
    {"GetDefaultPath", _wrap_Preferences_GetDefaultPath}, 
    {"GetUserPrefsPath", _wrap_Preferences_GetUserPrefsPath}, 
    {0,0}
};
static swig_lua_attribute swig_Preferences_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Preferences_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Preferences_cls_methods[] = {
    {"GetInstance", _wrap_Preferences_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_Preferences_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Preferences_bases[] = {0};
static const char *swig_Preferences_base_names[] = {0};
static swig_lua_class _wrap_class_Preferences = { "Preferences", &SWIGTYPE_p_Preferences,0, swig_delete_Preferences, swig_Preferences_methods, swig_Preferences_attributes, { "Preferences", swig_Preferences_cls_methods, swig_Preferences_cls_attributes, swig_Preferences_cls_constants }, swig_Preferences_bases, swig_Preferences_base_names };

static int _wrap_SoundDevice_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *result = 0 ;
  
  SWIG_check_num_args("SoundDevice::GetInstance",0,0)
  result = (SoundDevice *) &SoundDevice::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_SoundDevice,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_LoadSample(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  char *arg2 = (char *) 0 ;
  bool arg3 ;
  AngelSampleHandle result;
  
  SWIG_check_num_args("SoundDevice::LoadSample",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::LoadSample",1,"SoundDevice *");
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("SoundDevice::LoadSample",2,"char const *");
  if(!lua_isboolean(L,3)) SWIG_fail_arg("SoundDevice::LoadSample",3,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_LoadSample",1,SWIGTYPE_p_SoundDevice);
  }
  
  arg2 = (char *)lua_tostring(L, 2);
  arg3 = (lua_toboolean(L, 3)!=0);
  result = (arg1)->LoadSample((char const *)arg2,arg3);
  {
    AngelSampleHandle * resultptr = new AngelSampleHandle((const AngelSampleHandle &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_AngelSampleHandle,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PlaySound__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSampleHandle arg2 ;
  float arg3 ;
  bool arg4 ;
  int arg5 ;
  AngelSampleHandle *argp2 ;
  AngelSoundHandle result;
  
  SWIG_check_num_args("SoundDevice::PlaySound",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::PlaySound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::PlaySound",2,"AngelSampleHandle");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("SoundDevice::PlaySound",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("SoundDevice::PlaySound",4,"bool");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("SoundDevice::PlaySound",5,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSampleHandle,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",2,SWIGTYPE_p_AngelSampleHandle);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  arg5 = (int)lua_tonumber(L, 5);
  result = (arg1)->PlaySound(arg2,arg3,arg4,arg5);
  {
    AngelSoundHandle * resultptr = new AngelSoundHandle((const AngelSoundHandle &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_AngelSoundHandle,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PlaySound__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSampleHandle arg2 ;
  float arg3 ;
  bool arg4 ;
  AngelSampleHandle *argp2 ;
  AngelSoundHandle result;
  
  SWIG_check_num_args("SoundDevice::PlaySound",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::PlaySound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::PlaySound",2,"AngelSampleHandle");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("SoundDevice::PlaySound",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("SoundDevice::PlaySound",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSampleHandle,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",2,SWIGTYPE_p_AngelSampleHandle);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  result = (arg1)->PlaySound(arg2,arg3,arg4);
  {
    AngelSoundHandle * resultptr = new AngelSoundHandle((const AngelSoundHandle &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_AngelSoundHandle,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PlaySound__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSampleHandle arg2 ;
  float arg3 ;
  AngelSampleHandle *argp2 ;
  AngelSoundHandle result;
  
  SWIG_check_num_args("SoundDevice::PlaySound",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::PlaySound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::PlaySound",2,"AngelSampleHandle");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("SoundDevice::PlaySound",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSampleHandle,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",2,SWIGTYPE_p_AngelSampleHandle);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  result = (arg1)->PlaySound(arg2,arg3);
  {
    AngelSoundHandle * resultptr = new AngelSoundHandle((const AngelSoundHandle &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_AngelSoundHandle,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PlaySound__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSampleHandle arg2 ;
  AngelSampleHandle *argp2 ;
  AngelSoundHandle result;
  
  SWIG_check_num_args("SoundDevice::PlaySound",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::PlaySound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::PlaySound",2,"AngelSampleHandle");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSampleHandle,0))){
    SWIG_fail_ptr("SoundDevice_PlaySound",2,SWIGTYPE_p_AngelSampleHandle);
  }
  arg2 = *argp2;
  
  result = (arg1)->PlaySound(arg2);
  {
    AngelSoundHandle * resultptr = new AngelSoundHandle((const AngelSoundHandle &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_AngelSoundHandle,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PlaySound(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_SoundDevice, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_AngelSampleHandle, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_SoundDevice_PlaySound__SWIG_3(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_SoundDevice, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_AngelSampleHandle, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_SoundDevice_PlaySound__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_SoundDevice, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_AngelSampleHandle, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_SoundDevice_PlaySound__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_SoundDevice, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_AngelSampleHandle, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_SoundDevice_PlaySound__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'SoundDevice_PlaySound'\n"
    "  Possible C/C++ prototypes are:\n"
    "    SoundDevice::PlaySound(AngelSampleHandle,float,bool,int)\n"
    "    SoundDevice::PlaySound(AngelSampleHandle,float,bool)\n"
    "    SoundDevice::PlaySound(AngelSampleHandle,float)\n"
    "    SoundDevice::PlaySound(AngelSampleHandle)\n");
  lua_error(L);return 0;
}


static int _wrap_SoundDevice_StopSound(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  AngelSoundHandle *argp2 ;
  
  SWIG_check_num_args("SoundDevice::StopSound",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::StopSound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::StopSound",2,"AngelSoundHandle");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_StopSound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_StopSound",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  (arg1)->StopSound(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_PauseSound(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  bool arg3 ;
  AngelSoundHandle *argp2 ;
  
  SWIG_check_num_args("SoundDevice::PauseSound",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::PauseSound",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::PauseSound",2,"AngelSoundHandle");
  if(!lua_isboolean(L,3)) SWIG_fail_arg("SoundDevice::PauseSound",3,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_PauseSound",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_PauseSound",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  arg3 = (lua_toboolean(L, 3)!=0);
  (arg1)->PauseSound(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_IsPlaying(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  AngelSoundHandle *argp2 ;
  bool result;
  
  SWIG_check_num_args("SoundDevice::IsPlaying",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::IsPlaying",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::IsPlaying",2,"AngelSoundHandle");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_IsPlaying",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_IsPlaying",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  result = (bool)(arg1)->IsPlaying(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_IsPaused(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  AngelSoundHandle *argp2 ;
  bool result;
  
  SWIG_check_num_args("SoundDevice::IsPaused",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::IsPaused",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::IsPaused",2,"AngelSoundHandle");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_IsPaused",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_IsPaused",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  result = (bool)(arg1)->IsPaused(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_SetPan(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  float arg3 ;
  AngelSoundHandle *argp2 ;
  
  SWIG_check_num_args("SoundDevice::SetPan",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::SetPan",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::SetPan",2,"AngelSoundHandle");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("SoundDevice::SetPan",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_SetPan",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_SetPan",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetPan(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_SoundDevice_SetVolume(lua_State* L) {
  int SWIG_arg = 0;
  SoundDevice *arg1 = (SoundDevice *) 0 ;
  AngelSoundHandle arg2 ;
  float arg3 ;
  AngelSoundHandle *argp2 ;
  
  SWIG_check_num_args("SoundDevice::SetVolume",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("SoundDevice::SetVolume",1,"SoundDevice *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("SoundDevice::SetVolume",2,"AngelSoundHandle");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("SoundDevice::SetVolume",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_SoundDevice,0))){
    SWIG_fail_ptr("SoundDevice_SetVolume",1,SWIGTYPE_p_SoundDevice);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_AngelSoundHandle,0))){
    SWIG_fail_ptr("SoundDevice_SetVolume",2,SWIGTYPE_p_AngelSoundHandle);
  }
  arg2 = *argp2;
  
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetVolume(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_SoundDevice(void *obj) {
SoundDevice *arg1 = (SoundDevice *) obj;
delete arg1;
}
static swig_lua_method swig_SoundDevice_methods[] = {
    {"LoadSample", _wrap_SoundDevice_LoadSample}, 
    {"PlaySound", _wrap_SoundDevice_PlaySound}, 
    {"StopSound", _wrap_SoundDevice_StopSound}, 
    {"PauseSound", _wrap_SoundDevice_PauseSound}, 
    {"IsPlaying", _wrap_SoundDevice_IsPlaying}, 
    {"IsPaused", _wrap_SoundDevice_IsPaused}, 
    {"SetPan", _wrap_SoundDevice_SetPan}, 
    {"SetVolume", _wrap_SoundDevice_SetVolume}, 
    {0,0}
};
static swig_lua_attribute swig_SoundDevice_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_SoundDevice_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_SoundDevice_cls_methods[] = {
    {"GetInstance", _wrap_SoundDevice_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_SoundDevice_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_SoundDevice_bases[] = {0};
static const char *swig_SoundDevice_base_names[] = {0};
static swig_lua_class _wrap_class_SoundDevice = { "SoundDevice", &SWIGTYPE_p_SoundDevice,0, swig_delete_SoundDevice, swig_SoundDevice_methods, swig_SoundDevice_attributes, { "SoundDevice", swig_SoundDevice_cls_methods, swig_SoundDevice_cls_attributes, swig_SoundDevice_cls_constants }, swig_SoundDevice_bases, swig_SoundDevice_base_names };

static int _wrap_LuaWrite(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  
  SWIG_check_num_args("LuaWrite",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("LuaWrite",1,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  LuaWrite(arg1);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftThumbstickX_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::LeftThumbstickX",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftThumbstickX",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::LeftThumbstickX",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftThumbstickX_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->LeftThumbstickX = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftThumbstickX_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::LeftThumbstickX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftThumbstickX",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftThumbstickX_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->LeftThumbstickX);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftThumbstickY_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::LeftThumbstickY",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftThumbstickY",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::LeftThumbstickY",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftThumbstickY_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->LeftThumbstickY = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftThumbstickY_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::LeftThumbstickY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftThumbstickY",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftThumbstickY_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->LeftThumbstickY);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightThumbstickX_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::RightThumbstickX",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightThumbstickX",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::RightThumbstickX",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightThumbstickX_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->RightThumbstickX = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightThumbstickX_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::RightThumbstickX",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightThumbstickX",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightThumbstickX_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->RightThumbstickX);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightThumbstickY_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::RightThumbstickY",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightThumbstickY",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::RightThumbstickY",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightThumbstickY_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->RightThumbstickY = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightThumbstickY_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::RightThumbstickY",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightThumbstickY",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightThumbstickY_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->RightThumbstickY);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftTriggerValue_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::LeftTriggerValue",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftTriggerValue",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::LeftTriggerValue",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftTriggerValue_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->LeftTriggerValue = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_LeftTriggerValue_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::LeftTriggerValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::LeftTriggerValue",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_LeftTriggerValue_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->LeftTriggerValue);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightTriggerValue_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ControllerInput::RightTriggerValue",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightTriggerValue",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::RightTriggerValue",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightTriggerValue_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  if (arg1) (arg1)->RightTriggerValue = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_RightTriggerValue_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  int result;
  
  SWIG_check_num_args("ControllerInput::RightTriggerValue",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::RightTriggerValue",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_RightTriggerValue_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (int) ((arg1)->RightTriggerValue);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_Buttons_set(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("ControllerInput::Buttons",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::Buttons",1,"ControllerInput *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerInput::Buttons",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_Buttons_set",1,SWIGTYPE_p_ControllerInput);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  if (arg1) (arg1)->Buttons = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerInput_Buttons_get(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *arg1 = (ControllerInput *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("ControllerInput::Buttons",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerInput::Buttons",1,"ControllerInput *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerInput,0))){
    SWIG_fail_ptr("ControllerInput_Buttons_get",1,SWIGTYPE_p_ControllerInput);
  }
  
  result = (unsigned int) ((arg1)->Buttons);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_ControllerInput(lua_State* L) {
  int SWIG_arg = 0;
  ControllerInput *result = 0 ;
  
  SWIG_check_num_args("ControllerInput::ControllerInput",0,0)
  result = (ControllerInput *)new ControllerInput();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ControllerInput,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_ControllerInput(void *obj) {
ControllerInput *arg1 = (ControllerInput *) obj;
delete arg1;
}
static swig_lua_method swig_ControllerInput_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_ControllerInput_attributes[] = {
    { "LeftThumbstickX", _wrap_ControllerInput_LeftThumbstickX_get, _wrap_ControllerInput_LeftThumbstickX_set},
    { "LeftThumbstickY", _wrap_ControllerInput_LeftThumbstickY_get, _wrap_ControllerInput_LeftThumbstickY_set},
    { "RightThumbstickX", _wrap_ControllerInput_RightThumbstickX_get, _wrap_ControllerInput_RightThumbstickX_set},
    { "RightThumbstickY", _wrap_ControllerInput_RightThumbstickY_get, _wrap_ControllerInput_RightThumbstickY_set},
    { "LeftTriggerValue", _wrap_ControllerInput_LeftTriggerValue_get, _wrap_ControllerInput_LeftTriggerValue_set},
    { "RightTriggerValue", _wrap_ControllerInput_RightTriggerValue_get, _wrap_ControllerInput_RightTriggerValue_set},
    { "Buttons", _wrap_ControllerInput_Buttons_get, _wrap_ControllerInput_Buttons_set},
    {0,0,0}
};
static swig_lua_attribute swig_ControllerInput_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ControllerInput_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_ControllerInput_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_ControllerInput_bases[] = {0};
static const char *swig_ControllerInput_base_names[] = {0};
static swig_lua_class _wrap_class_ControllerInput = { "ControllerInput", &SWIGTYPE_p_ControllerInput,_wrap_new_ControllerInput, swig_delete_ControllerInput, swig_ControllerInput_methods, swig_ControllerInput_attributes, { "ControllerInput", swig_ControllerInput_cls_methods, swig_ControllerInput_cls_attributes, swig_ControllerInput_cls_constants }, swig_ControllerInput_bases, swig_ControllerInput_base_names };

static int _wrap_ControllerManager_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  ControllerManager *result = 0 ;
  
  SWIG_check_num_args("ControllerManager::GetInstance",0,0)
  result = (ControllerManager *) &ControllerManager::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ControllerManager,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerManager_GetController__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  ControllerManager *arg1 = (ControllerManager *) 0 ;
  int arg2 ;
  Controller *result = 0 ;
  
  SWIG_check_num_args("ControllerManager::GetController",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerManager::GetController",1,"ControllerManager *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ControllerManager::GetController",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerManager,0))){
    SWIG_fail_ptr("ControllerManager_GetController",1,SWIGTYPE_p_ControllerManager);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (Controller *) &(arg1)->GetController(arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Controller,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerManager_GetController__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  ControllerManager *arg1 = (ControllerManager *) 0 ;
  Controller *result = 0 ;
  
  SWIG_check_num_args("ControllerManager::GetController",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ControllerManager::GetController",1,"ControllerManager *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ControllerManager,0))){
    SWIG_fail_ptr("ControllerManager_GetController",1,SWIGTYPE_p_ControllerManager);
  }
  
  result = (Controller *) &(arg1)->GetController();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Controller,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ControllerManager_GetController(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_ControllerManager, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_ControllerManager_GetController__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_ControllerManager, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_ControllerManager_GetController__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'ControllerManager_GetController'\n"
    "  Possible C/C++ prototypes are:\n"
    "    ControllerManager::GetController(int)\n"
    "    ControllerManager::GetController()\n");
  lua_error(L);return 0;
}


static void swig_delete_ControllerManager(void *obj) {
ControllerManager *arg1 = (ControllerManager *) obj;
delete arg1;
}
static swig_lua_method swig_ControllerManager_methods[] = {
    {"GetController", _wrap_ControllerManager_GetController}, 
    {0,0}
};
static swig_lua_attribute swig_ControllerManager_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_ControllerManager_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ControllerManager_cls_methods[] = {
    {"GetInstance", _wrap_ControllerManager_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_ControllerManager_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_ControllerManager_bases[] = {0};
static const char *swig_ControllerManager_base_names[] = {0};
static swig_lua_class _wrap_class_ControllerManager = { "ControllerManager", &SWIGTYPE_p_ControllerManager,0, swig_delete_ControllerManager, swig_ControllerManager_methods, swig_ControllerManager_attributes, { "ControllerManager", swig_ControllerManager_cls_methods, swig_ControllerManager_cls_attributes, swig_ControllerManager_cls_constants }, swig_ControllerManager_bases, swig_ControllerManager_base_names };

static int _wrap_Controller_GetState(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  ControllerInput result;
  
  SWIG_check_num_args("Controller::GetState",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetState",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetState",1,SWIGTYPE_p_Controller);
  }
  
  result = (arg1)->GetState();
  {
    ControllerInput * resultptr = new ControllerInput((const ControllerInput &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_ControllerInput,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetLeftThumbVec2(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Controller::GetLeftThumbVec2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetLeftThumbVec2",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetLeftThumbVec2",1,SWIGTYPE_p_Controller);
  }
  
  result = (arg1)->GetLeftThumbVec2();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetRightThumbVec2(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Controller::GetRightThumbVec2",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetRightThumbVec2",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetRightThumbVec2",1,SWIGTYPE_p_Controller);
  }
  
  result = (arg1)->GetRightThumbVec2();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetLeftThumbstick(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  Vec2i result;
  
  SWIG_check_num_args("Controller::GetLeftThumbstick",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetLeftThumbstick",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetLeftThumbstick",1,SWIGTYPE_p_Controller);
  }
  
  result = (arg1)->GetLeftThumbstick();
  {
    Vec2i * resultptr = new Vec2i((const Vec2i &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec2i,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetRightThumbstick(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  Vec2i result;
  
  SWIG_check_num_args("Controller::GetRightThumbstick",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetRightThumbstick",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetRightThumbstick",1,SWIGTYPE_p_Controller);
  }
  
  result = (arg1)->GetRightThumbstick();
  {
    Vec2i * resultptr = new Vec2i((const Vec2i &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec2i,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetRightTrigger(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  int result;
  
  SWIG_check_num_args("Controller::GetRightTrigger",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetRightTrigger",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetRightTrigger",1,SWIGTYPE_p_Controller);
  }
  
  result = (int)(arg1)->GetRightTrigger();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetLeftTrigger(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  int result;
  
  SWIG_check_num_args("Controller::GetLeftTrigger",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetLeftTrigger",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetLeftTrigger",1,SWIGTYPE_p_Controller);
  }
  
  result = (int)(arg1)->GetLeftTrigger();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  int arg2 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsButtonDown",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsButtonDown",1,"Controller *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Controller::IsButtonDown",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (bool)(arg1)->IsButtonDown(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsAButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsAButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsAButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsAButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsAButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsBButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsBButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsBButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsBButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsBButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsXButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsXButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsXButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsXButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsXButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsYButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsYButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsYButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsYButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsYButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsLeftThumbstickButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsLeftThumbstickButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsLeftThumbstickButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsLeftThumbstickButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsLeftThumbstickButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsRightThumbstickButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsRightThumbstickButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsRightThumbstickButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsRightThumbstickButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsRightThumbstickButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsStartButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsStartButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsStartButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsStartButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsStartButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsBackButtonDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsBackButtonDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsBackButtonDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsBackButtonDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsBackButtonDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsLeftBumperDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsLeftBumperDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsLeftBumperDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsLeftBumperDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsLeftBumperDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsRightBumperDown(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsRightBumperDown",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsRightBumperDown",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsRightBumperDown",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsRightBumperDown();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsLeftTriggerPressed(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsLeftTriggerPressed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsLeftTriggerPressed",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsLeftTriggerPressed",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsLeftTriggerPressed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsRightTriggerPressed(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsRightTriggerPressed",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsRightTriggerPressed",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsRightTriggerPressed",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsRightTriggerPressed();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_SetLeftVibrationRaw(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Controller::SetLeftVibrationRaw",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::SetLeftVibrationRaw",1,"Controller *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Controller::SetLeftVibrationRaw",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_SetLeftVibrationRaw",1,SWIGTYPE_p_Controller);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  (arg1)->SetLeftVibrationRaw(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_SetRightVibrationRaw(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Controller::SetRightVibrationRaw",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::SetRightVibrationRaw",1,"Controller *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Controller::SetRightVibrationRaw",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_SetRightVibrationRaw",1,SWIGTYPE_p_Controller);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  (arg1)->SetRightVibrationRaw(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_SetLeftVibration(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Controller::SetLeftVibration",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::SetLeftVibration",1,"Controller *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Controller::SetLeftVibration",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_SetLeftVibration",1,SWIGTYPE_p_Controller);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  (arg1)->SetLeftVibration(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_SetRightVibration(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int arg2 ;
  
  SWIG_check_num_args("Controller::SetRightVibration",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::SetRightVibration",1,"Controller *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Controller::SetRightVibration",2,"unsigned int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_SetRightVibration",1,SWIGTYPE_p_Controller);
  }
  
  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
  arg2 = (unsigned int)lua_tonumber(L, 2);
  (arg1)->SetRightVibration(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetLeftVibration(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Controller::GetLeftVibration",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetLeftVibration",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetLeftVibration",1,SWIGTYPE_p_Controller);
  }
  
  result = (unsigned int)(arg1)->GetLeftVibration();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetRightVibration(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  unsigned int result;
  
  SWIG_check_num_args("Controller::GetRightVibration",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetRightVibration",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetRightVibration",1,SWIGTYPE_p_Controller);
  }
  
  result = (unsigned int)(arg1)->GetRightVibration();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_IsConnected(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  bool result;
  
  SWIG_check_num_args("Controller::IsConnected",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::IsConnected",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_IsConnected",1,SWIGTYPE_p_Controller);
  }
  
  result = (bool)(arg1)->IsConnected();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Controller_GetControllerID(lua_State* L) {
  int SWIG_arg = 0;
  Controller *arg1 = (Controller *) 0 ;
  int result;
  
  SWIG_check_num_args("Controller::GetControllerID",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Controller::GetControllerID",1,"Controller *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Controller,0))){
    SWIG_fail_ptr("Controller_GetControllerID",1,SWIGTYPE_p_Controller);
  }
  
  result = (int)(arg1)->GetControllerID();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Controller(void *obj) {
Controller *arg1 = (Controller *) obj;
delete arg1;
}
static swig_lua_method swig_Controller_methods[] = {
    {"GetState", _wrap_Controller_GetState}, 
    {"GetLeftThumbVec2", _wrap_Controller_GetLeftThumbVec2}, 
    {"GetRightThumbVec2", _wrap_Controller_GetRightThumbVec2}, 
    {"GetLeftThumbstick", _wrap_Controller_GetLeftThumbstick}, 
    {"GetRightThumbstick", _wrap_Controller_GetRightThumbstick}, 
    {"GetRightTrigger", _wrap_Controller_GetRightTrigger}, 
    {"GetLeftTrigger", _wrap_Controller_GetLeftTrigger}, 
    {"IsButtonDown", _wrap_Controller_IsButtonDown}, 
    {"IsAButtonDown", _wrap_Controller_IsAButtonDown}, 
    {"IsBButtonDown", _wrap_Controller_IsBButtonDown}, 
    {"IsXButtonDown", _wrap_Controller_IsXButtonDown}, 
    {"IsYButtonDown", _wrap_Controller_IsYButtonDown}, 
    {"IsLeftThumbstickButtonDown", _wrap_Controller_IsLeftThumbstickButtonDown}, 
    {"IsRightThumbstickButtonDown", _wrap_Controller_IsRightThumbstickButtonDown}, 
    {"IsStartButtonDown", _wrap_Controller_IsStartButtonDown}, 
    {"IsBackButtonDown", _wrap_Controller_IsBackButtonDown}, 
    {"IsLeftBumperDown", _wrap_Controller_IsLeftBumperDown}, 
    {"IsRightBumperDown", _wrap_Controller_IsRightBumperDown}, 
    {"IsLeftTriggerPressed", _wrap_Controller_IsLeftTriggerPressed}, 
    {"IsRightTriggerPressed", _wrap_Controller_IsRightTriggerPressed}, 
    {"SetLeftVibrationRaw", _wrap_Controller_SetLeftVibrationRaw}, 
    {"SetRightVibrationRaw", _wrap_Controller_SetRightVibrationRaw}, 
    {"SetLeftVibration", _wrap_Controller_SetLeftVibration}, 
    {"SetRightVibration", _wrap_Controller_SetRightVibration}, 
    {"GetLeftVibration", _wrap_Controller_GetLeftVibration}, 
    {"GetRightVibration", _wrap_Controller_GetRightVibration}, 
    {"IsConnected", _wrap_Controller_IsConnected}, 
    {"GetControllerID", _wrap_Controller_GetControllerID}, 
    {0,0}
};
static swig_lua_attribute swig_Controller_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Controller_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Controller_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Controller_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Controller_bases[] = {0};
static const char *swig_Controller_base_names[] = {0};
static swig_lua_class _wrap_class_Controller = { "Controller", &SWIGTYPE_p_Controller,0, swig_delete_Controller, swig_Controller_methods, swig_Controller_attributes, { "Controller", swig_Controller_cls_methods, swig_Controller_cls_attributes, swig_Controller_cls_constants }, swig_Controller_bases, swig_Controller_base_names };

static int _wrap_new_MouseListener(lua_State* L) {
  int SWIG_arg = 0;
  MouseListener *result = 0 ;
  
  SWIG_check_num_args("MouseListener::MouseListener",0,0)
  result = (MouseListener *)new MouseListener();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_MouseListener,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseListener_MouseMotionEvent(lua_State* L) {
  int SWIG_arg = 0;
  MouseListener *arg1 = (MouseListener *) 0 ;
  Vec2i arg2 ;
  
  SWIG_check_num_args("MouseListener::MouseMotionEvent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MouseListener::MouseMotionEvent",1,"MouseListener *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_MouseListener,0))){
    SWIG_fail_ptr("MouseListener_MouseMotionEvent",1,SWIGTYPE_p_MouseListener);
  }
  
  {
    // Vec2i conversion
    Vec2i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2i(x, y);
    }
  }
  (arg1)->MouseMotionEvent(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseListener_MouseDownEvent(lua_State* L) {
  int SWIG_arg = 0;
  MouseListener *arg1 = (MouseListener *) 0 ;
  Vec2i arg2 ;
  MouseButtonInput arg3 ;
  
  SWIG_check_num_args("MouseListener::MouseDownEvent",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MouseListener::MouseDownEvent",1,"MouseListener *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("MouseListener::MouseDownEvent",3,"MouseButtonInput");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_MouseListener,0))){
    SWIG_fail_ptr("MouseListener_MouseDownEvent",1,SWIGTYPE_p_MouseListener);
  }
  
  {
    // Vec2i conversion
    Vec2i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2i(x, y);
    }
  }
  arg3 = (MouseButtonInput)(int)lua_tonumber(L, 3);
  (arg1)->MouseDownEvent(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseListener_MouseUpEvent(lua_State* L) {
  int SWIG_arg = 0;
  MouseListener *arg1 = (MouseListener *) 0 ;
  Vec2i arg2 ;
  MouseButtonInput arg3 ;
  
  SWIG_check_num_args("MouseListener::MouseUpEvent",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MouseListener::MouseUpEvent",1,"MouseListener *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("MouseListener::MouseUpEvent",3,"MouseButtonInput");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_MouseListener,0))){
    SWIG_fail_ptr("MouseListener_MouseUpEvent",1,SWIGTYPE_p_MouseListener);
  }
  
  {
    // Vec2i conversion
    Vec2i *vecPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vec2i,0)))
    {
      arg2 = *vecPtr;
    }
    else
    {
      // convert table parameters to ints
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      int x = lua_tointeger(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      int y = lua_tointeger(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      arg2 = Vec2i(x, y);
    }
  }
  arg3 = (MouseButtonInput)(int)lua_tonumber(L, 3);
  (arg1)->MouseUpEvent(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_MouseListener_MouseWheelEvent(lua_State* L) {
  int SWIG_arg = 0;
  MouseListener *arg1 = (MouseListener *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("MouseListener::MouseWheelEvent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("MouseListener::MouseWheelEvent",1,"MouseListener *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_MouseListener,0))){
    SWIG_fail_ptr("MouseListener_MouseWheelEvent",1,SWIGTYPE_p_MouseListener);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->MouseWheelEvent((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_MouseListener(void *obj) {
MouseListener *arg1 = (MouseListener *) obj;
delete arg1;
}
static swig_lua_method swig_MouseListener_methods[] = {
    {"MouseMotionEvent", _wrap_MouseListener_MouseMotionEvent}, 
    {"MouseDownEvent", _wrap_MouseListener_MouseDownEvent}, 
    {"MouseUpEvent", _wrap_MouseListener_MouseUpEvent}, 
    {"MouseWheelEvent", _wrap_MouseListener_MouseWheelEvent}, 
    {0,0}
};
static swig_lua_attribute swig_MouseListener_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_MouseListener_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_MouseListener_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_MouseListener_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_MouseListener_bases[] = {0};
static const char *swig_MouseListener_base_names[] = {0};
static swig_lua_class _wrap_class_MouseListener = { "MouseListener", &SWIGTYPE_p_MouseListener,_wrap_new_MouseListener, swig_delete_MouseListener, swig_MouseListener_methods, swig_MouseListener_attributes, { "MouseListener", swig_MouseListener_cls_methods, swig_MouseListener_cls_attributes, swig_MouseListener_cls_constants }, swig_MouseListener_bases, swig_MouseListener_base_names };

static int _wrap_Touch_StartingPoint_set(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  Vec2i *arg2 = (Vec2i *) 0 ;
  
  SWIG_check_num_args("Touch::StartingPoint",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::StartingPoint",1,"Touch *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Touch::StartingPoint",2,"Vec2i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_StartingPoint_set",1,SWIGTYPE_p_Touch);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Touch_StartingPoint_set",2,SWIGTYPE_p_Vec2i);
  }
  
  if (arg1) (arg1)->StartingPoint = *arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_StartingPoint_get(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  Vec2i *result = 0 ;
  
  SWIG_check_num_args("Touch::StartingPoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::StartingPoint",1,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_StartingPoint_get",1,SWIGTYPE_p_Touch);
  }
  
  result = (Vec2i *)& ((arg1)->StartingPoint);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2i,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_CurrentPoint_set(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  Vec2i *arg2 = (Vec2i *) 0 ;
  
  SWIG_check_num_args("Touch::CurrentPoint",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::CurrentPoint",1,"Touch *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Touch::CurrentPoint",2,"Vec2i *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_CurrentPoint_set",1,SWIGTYPE_p_Touch);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Vec2i,0))){
    SWIG_fail_ptr("Touch_CurrentPoint_set",2,SWIGTYPE_p_Vec2i);
  }
  
  if (arg1) (arg1)->CurrentPoint = *arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_CurrentPoint_get(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  Vec2i *result = 0 ;
  
  SWIG_check_num_args("Touch::CurrentPoint",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::CurrentPoint",1,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_CurrentPoint_get",1,SWIGTYPE_p_Touch);
  }
  
  result = (Vec2i *)& ((arg1)->CurrentPoint);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vec2i,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_StartTime_set(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Touch::StartTime",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::StartTime",1,"Touch *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Touch::StartTime",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_StartTime_set",1,SWIGTYPE_p_Touch);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->StartTime = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_StartTime_get(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  float result;
  
  SWIG_check_num_args("Touch::StartTime",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::StartTime",1,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_StartTime_get",1,SWIGTYPE_p_Touch);
  }
  
  result = (float) ((arg1)->StartTime);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_MotionStartTime_set(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Touch::MotionStartTime",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::MotionStartTime",1,"Touch *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Touch::MotionStartTime",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_MotionStartTime_set",1,SWIGTYPE_p_Touch);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->MotionStartTime = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch_MotionStartTime_get(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  float result;
  
  SWIG_check_num_args("Touch::MotionStartTime",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::MotionStartTime",1,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch_MotionStartTime_get",1,SWIGTYPE_p_Touch);
  }
  
  result = (float) ((arg1)->MotionStartTime);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch___platformTouch_set(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  void *arg2 = (void *) 0 ;
  
  SWIG_check_num_args("Touch::__platformTouch",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::__platformTouch",1,"Touch *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Touch::__platformTouch",2,"void *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch___platformTouch_set",1,SWIGTYPE_p_Touch);
  }
  
  arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"Touch___platformTouch_set");
  if (arg1) (arg1)->__platformTouch = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Touch___platformTouch_get(lua_State* L) {
  int SWIG_arg = 0;
  Touch *arg1 = (Touch *) 0 ;
  void *result = 0 ;
  
  SWIG_check_num_args("Touch::__platformTouch",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Touch::__platformTouch",1,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("Touch___platformTouch_get",1,SWIGTYPE_p_Touch);
  }
  
  result = (void *) ((arg1)->__platformTouch);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_Touch(lua_State* L) {
  int SWIG_arg = 0;
  Touch *result = 0 ;
  
  SWIG_check_num_args("Touch::Touch",0,0)
  result = (Touch *)new Touch();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Touch,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Touch(void *obj) {
Touch *arg1 = (Touch *) obj;
delete arg1;
}
static swig_lua_method swig_Touch_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_Touch_attributes[] = {
    { "StartingPoint", _wrap_Touch_StartingPoint_get, _wrap_Touch_StartingPoint_set},
    { "CurrentPoint", _wrap_Touch_CurrentPoint_get, _wrap_Touch_CurrentPoint_set},
    { "StartTime", _wrap_Touch_StartTime_get, _wrap_Touch_StartTime_set},
    { "MotionStartTime", _wrap_Touch_MotionStartTime_get, _wrap_Touch_MotionStartTime_set},
    { "__platformTouch", _wrap_Touch___platformTouch_get, _wrap_Touch___platformTouch_set},
    {0,0,0}
};
static swig_lua_attribute swig_Touch_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Touch_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_Touch_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Touch_bases[] = {0};
static const char *swig_Touch_base_names[] = {0};
static swig_lua_class _wrap_class_Touch = { "Touch", &SWIGTYPE_p_Touch,_wrap_new_Touch, swig_delete_Touch, swig_Touch_methods, swig_Touch_attributes, { "Touch", swig_Touch_cls_methods, swig_Touch_cls_attributes, swig_Touch_cls_constants }, swig_Touch_bases, swig_Touch_base_names };

static int _wrap_GestureData_Velocity_set(lua_State* L) {
  int SWIG_arg = 0;
  GestureData *arg1 = (GestureData *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("GestureData::Velocity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GestureData::Velocity",1,"GestureData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("GestureData::Velocity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GestureData,0))){
    SWIG_fail_ptr("GestureData_Velocity_set",1,SWIGTYPE_p_GestureData);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->Velocity = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GestureData_Velocity_get(lua_State* L) {
  int SWIG_arg = 0;
  GestureData *arg1 = (GestureData *) 0 ;
  float result;
  
  SWIG_check_num_args("GestureData::Velocity",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GestureData::Velocity",1,"GestureData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GestureData,0))){
    SWIG_fail_ptr("GestureData_Velocity_get",1,SWIGTYPE_p_GestureData);
  }
  
  result = (float) ((arg1)->Velocity);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GestureData_GestureMagnitude_set(lua_State* L) {
  int SWIG_arg = 0;
  GestureData *arg1 = (GestureData *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("GestureData::GestureMagnitude",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GestureData::GestureMagnitude",1,"GestureData *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("GestureData::GestureMagnitude",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GestureData,0))){
    SWIG_fail_ptr("GestureData_GestureMagnitude_set",1,SWIGTYPE_p_GestureData);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  if (arg1) (arg1)->GestureMagnitude = arg2;
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GestureData_GestureMagnitude_get(lua_State* L) {
  int SWIG_arg = 0;
  GestureData *arg1 = (GestureData *) 0 ;
  float result;
  
  SWIG_check_num_args("GestureData::GestureMagnitude",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GestureData::GestureMagnitude",1,"GestureData *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GestureData,0))){
    SWIG_fail_ptr("GestureData_GestureMagnitude_get",1,SWIGTYPE_p_GestureData);
  }
  
  result = (float) ((arg1)->GestureMagnitude);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_GestureData(lua_State* L) {
  int SWIG_arg = 0;
  GestureData *result = 0 ;
  
  SWIG_check_num_args("GestureData::GestureData",0,0)
  result = (GestureData *)new GestureData();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_GestureData,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_GestureData(void *obj) {
GestureData *arg1 = (GestureData *) obj;
delete arg1;
}
static swig_lua_method swig_GestureData_methods[] = {
    {0,0}
};
static swig_lua_attribute swig_GestureData_attributes[] = {
    { "Velocity", _wrap_GestureData_Velocity_get, _wrap_GestureData_Velocity_set},
    { "GestureMagnitude", _wrap_GestureData_GestureMagnitude_get, _wrap_GestureData_GestureMagnitude_set},
    {0,0,0}
};
static swig_lua_attribute swig_GestureData_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_GestureData_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_GestureData_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_GestureData_bases[] = {0};
static const char *swig_GestureData_base_names[] = {0};
static swig_lua_class _wrap_class_GestureData = { "GestureData", &SWIGTYPE_p_GestureData,_wrap_new_GestureData, swig_delete_GestureData, swig_GestureData_methods, swig_GestureData_attributes, { "GestureData", swig_GestureData_cls_methods, swig_GestureData_cls_attributes, swig_GestureData_cls_constants }, swig_GestureData_bases, swig_GestureData_base_names };

static int _wrap_new_TouchListener(lua_State* L) {
  int SWIG_arg = 0;
  TouchListener *result = 0 ;
  
  SWIG_check_num_args("TouchListener::TouchListener",0,0)
  result = (TouchListener *)new TouchListener();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TouchListener,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TouchListener_TouchMotionEvent(lua_State* L) {
  int SWIG_arg = 0;
  TouchListener *arg1 = (TouchListener *) 0 ;
  Touch *arg2 = (Touch *) 0 ;
  
  SWIG_check_num_args("TouchListener::TouchMotionEvent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TouchListener::TouchMotionEvent",1,"TouchListener *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("TouchListener::TouchMotionEvent",2,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TouchListener,0))){
    SWIG_fail_ptr("TouchListener_TouchMotionEvent",1,SWIGTYPE_p_TouchListener);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("TouchListener_TouchMotionEvent",2,SWIGTYPE_p_Touch);
  }
  
  (arg1)->TouchMotionEvent(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TouchListener_TouchEndEvent(lua_State* L) {
  int SWIG_arg = 0;
  TouchListener *arg1 = (TouchListener *) 0 ;
  Touch *arg2 = (Touch *) 0 ;
  
  SWIG_check_num_args("TouchListener::TouchEndEvent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TouchListener::TouchEndEvent",1,"TouchListener *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("TouchListener::TouchEndEvent",2,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TouchListener,0))){
    SWIG_fail_ptr("TouchListener_TouchEndEvent",1,SWIGTYPE_p_TouchListener);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("TouchListener_TouchEndEvent",2,SWIGTYPE_p_Touch);
  }
  
  (arg1)->TouchEndEvent(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TouchListener_TouchStartEvent(lua_State* L) {
  int SWIG_arg = 0;
  TouchListener *arg1 = (TouchListener *) 0 ;
  Touch *arg2 = (Touch *) 0 ;
  
  SWIG_check_num_args("TouchListener::TouchStartEvent",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TouchListener::TouchStartEvent",1,"TouchListener *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("TouchListener::TouchStartEvent",2,"Touch *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TouchListener,0))){
    SWIG_fail_ptr("TouchListener_TouchStartEvent",1,SWIGTYPE_p_TouchListener);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Touch,0))){
    SWIG_fail_ptr("TouchListener_TouchStartEvent",2,SWIGTYPE_p_Touch);
  }
  
  (arg1)->TouchStartEvent(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TouchListener_GetTouchList(lua_State* L) {
  int SWIG_arg = 0;
  TouchList *result = 0 ;
  
  SWIG_check_num_args("TouchListener::GetTouchList",0,0)
  result = (TouchList *) &TouchListener::GetTouchList();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_std__vectorT_Touch_p_t,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_TouchListener(void *obj) {
TouchListener *arg1 = (TouchListener *) obj;
delete arg1;
}
static swig_lua_method swig_TouchListener_methods[] = {
    {"TouchMotionEvent", _wrap_TouchListener_TouchMotionEvent}, 
    {"TouchEndEvent", _wrap_TouchListener_TouchEndEvent}, 
    {"TouchStartEvent", _wrap_TouchListener_TouchStartEvent}, 
    {0,0}
};
static swig_lua_attribute swig_TouchListener_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TouchListener_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TouchListener_cls_methods[] = {
    {"GetTouchList", _wrap_TouchListener_GetTouchList}, 
    {0,0}
};
static swig_lua_const_info swig_TouchListener_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TouchListener_bases[] = {0};
static const char *swig_TouchListener_base_names[] = {0};
static swig_lua_class _wrap_class_TouchListener = { "TouchListener", &SWIGTYPE_p_TouchListener,_wrap_new_TouchListener, swig_delete_TouchListener, swig_TouchListener_methods, swig_TouchListener_attributes, { "TouchListener", swig_TouchListener_cls_methods, swig_TouchListener_cls_attributes, swig_TouchListener_cls_constants }, swig_TouchListener_bases, swig_TouchListener_base_names };

static int _wrap_Accelerometer_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  Accelerometer *result = 0 ;
  
  SWIG_check_num_args("Accelerometer::GetInstance",0,0)
  result = (Accelerometer *) &Accelerometer::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Accelerometer,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Accelerometer_GetData(lua_State* L) {
  int SWIG_arg = 0;
  Accelerometer *arg1 = (Accelerometer *) 0 ;
  Vector3 result;
  
  SWIG_check_num_args("Accelerometer::GetData",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Accelerometer::GetData",1,"Accelerometer *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Accelerometer,0))){
    SWIG_fail_ptr("Accelerometer_GetData",1,SWIGTYPE_p_Accelerometer);
  }
  
  result = (arg1)->GetData();
  {
    Vector3 * resultptr = new Vector3((const Vector3 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector3,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Accelerometer(void *obj) {
Accelerometer *arg1 = (Accelerometer *) obj;
delete arg1;
}
static swig_lua_method swig_Accelerometer_methods[] = {
    {"GetData", _wrap_Accelerometer_GetData}, 
    {0,0}
};
static swig_lua_attribute swig_Accelerometer_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Accelerometer_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Accelerometer_cls_methods[] = {
    {"GetInstance", _wrap_Accelerometer_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_Accelerometer_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Accelerometer_bases[] = {0};
static const char *swig_Accelerometer_base_names[] = {0};
static swig_lua_class _wrap_class_Accelerometer = { "Accelerometer", &SWIGTYPE_p_Accelerometer,0, swig_delete_Accelerometer, swig_Accelerometer_methods, swig_Accelerometer_attributes, { "Accelerometer", swig_Accelerometer_cls_methods, swig_Accelerometer_cls_attributes, swig_Accelerometer_cls_constants }, swig_Accelerometer_bases, swig_Accelerometer_base_names };

static int _wrap_new_Actor(lua_State* L) {
  int SWIG_arg = 0;
  Actor *result = 0 ;
  
  SWIG_check_num_args("Actor::Actor",0,0)
  result = (Actor *)new Actor();
  {
    int dcast = 0;
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      TextActor *dobj = dynamic_cast<TextActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_TextActor, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      HUDActor *dobj = dynamic_cast<HUDActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_HUDActor, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      FullScreenActor *dobj = dynamic_cast<FullScreenActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_FullScreenActor, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Camera *dobj = dynamic_cast<Camera *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Camera, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      PhysicsActor *dobj = dynamic_cast<PhysicsActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_PhysicsActor, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      ParticleActor *dobj = dynamic_cast<ParticleActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_ParticleActor, 1); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*//*@SWIG@*/
    if (!dcast) {
      SWIG_NewPointerObj(L, result, SWIGTYPE_p_Actor, 1); SWIG_arg++;
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSize__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::SetSize",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSize",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetSize",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetSize",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSize",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetSize(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSize__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Actor::SetSize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSize",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetSize",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSize",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetSize(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSize__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("Actor::SetSize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSize",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSize",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetSize((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSize(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_Actor_SetSize__SWIG_2(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_SetSize__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_SetSize__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_SetSize'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::SetSize(float,float)\n"
    "    Actor::SetSize(float)\n"
    "    Actor::SetSize(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_GetSize(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Actor::GetSize",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetSize",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetSize",1,SWIGTYPE_p_Actor);
  }
  
  result = (Vector2 *) &(arg1)->GetSize();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetPosition__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::SetPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetPosition",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetPosition",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetPosition(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetPosition__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("Actor::SetPosition",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetPosition",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetPosition",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetPosition((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetPosition(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_Actor_SetPosition__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_SetPosition__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_SetPosition'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::SetPosition(float,float)\n"
    "    Actor::SetPosition(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_GetPosition(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *result = 0 ;
  
  SWIG_check_num_args("Actor::GetPosition",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetPosition",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetPosition",1,SWIGTYPE_p_Actor);
  }
  
  result = (Vector2 *) &(arg1)->GetPosition();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector2,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetRotation(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Actor::SetRotation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetRotation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetRotation",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetRotation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetRotation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetRotation(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float result;
  
  SWIG_check_num_args("Actor::GetRotation",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetRotation",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetRotation",1,SWIGTYPE_p_Actor);
  }
  
  result = (float)(arg1)->GetRotation();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetColor__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  
  SWIG_check_num_args("Actor::SetColor",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetColor",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetColor",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetColor",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Actor::SetColor",4,"float");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("Actor::SetColor",5,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetColor",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  arg5 = (float)lua_tonumber(L, 5);
  (arg1)->SetColor(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetColor__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  
  SWIG_check_num_args("Actor::SetColor",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetColor",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetColor",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetColor",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Actor::SetColor",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetColor",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  (arg1)->SetColor(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetColor__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Color arg2 ;
  
  SWIG_check_num_args("Actor::SetColor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetColor",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetColor",1,SWIGTYPE_p_Actor);
  }
  
  {
    // Color conversion
    Color *colPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = *colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      arg2 = Color(r, g, b, a);
    }
  }
  (arg1)->SetColor(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetColor(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Color / const Color& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_Actor_SetColor__SWIG_2(L);
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_SetColor__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_SetColor__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_SetColor'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::SetColor(float,float,float,float)\n"
    "    Actor::SetColor(float,float,float)\n"
    "    Actor::SetColor(Color const)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_GetColor(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("Actor::GetColor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetColor",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetColor",1,SWIGTYPE_p_Actor);
  }
  
  result = (Color *) &(arg1)->GetColor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetAlpha(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Actor::SetAlpha",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetAlpha",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetAlpha",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetAlpha",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetAlpha(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetAlpha(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float result;
  
  SWIG_check_num_args("Actor::GetAlpha",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetAlpha",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetAlpha",1,SWIGTYPE_p_Actor);
  }
  
  result = (float)(arg1)->GetAlpha();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetDrawShape(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  actorDrawShape arg2 ;
  
  SWIG_check_num_args("Actor::SetDrawShape",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetDrawShape",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetDrawShape",2,"actorDrawShape");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetDrawShape",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (actorDrawShape)(int)lua_tonumber(L, 2);
  (arg1)->SetDrawShape(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetDrawShape(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  actorDrawShape *result = 0 ;
  
  SWIG_check_num_args("Actor::GetDrawShape",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetDrawShape",1,"Actor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetDrawShape",1,SWIGTYPE_p_Actor);
  }
  
  result = (actorDrawShape *) &((Actor const *)arg1)->GetDrawShape();
  lua_pushnumber(L, (lua_Number) *result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_MoveTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Actor::MoveTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::MoveTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::MoveTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Actor::MoveTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_MoveTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_MoveTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Actor::MoveTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::MoveTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::MoveTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_MoveTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_MoveTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::MoveTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::MoveTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::MoveTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_MoveTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_MoveTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_MoveTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_MoveTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_MoveTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_MoveTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::MoveTo(Vector2 const &,float,bool,String)\n"
    "    Actor::MoveTo(Vector2 const &,float,bool)\n"
    "    Actor::MoveTo(Vector2 const &,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_RotateTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Actor::RotateTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::RotateTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::RotateTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::RotateTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Actor::RotateTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_RotateTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->RotateTo(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_RotateTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Actor::RotateTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::RotateTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::RotateTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::RotateTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_RotateTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->RotateTo(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_RotateTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::RotateTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::RotateTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::RotateTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_RotateTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->RotateTo(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_RotateTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_RotateTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_RotateTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_RotateTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_RotateTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::RotateTo(float,float,bool,String)\n"
    "    Actor::RotateTo(float,float,bool)\n"
    "    Actor::RotateTo(float,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_ChangeColorTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Color *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Actor::ChangeColorTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeColorTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeColorTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeColorTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Actor::ChangeColorTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeColorTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->ChangeColorTo((Color const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeColorTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Color *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Actor::ChangeColorTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeColorTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeColorTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeColorTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeColorTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->ChangeColorTo((Color const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeColorTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Color *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::ChangeColorTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeColorTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeColorTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeColorTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->ChangeColorTo((Color const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeColorTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Color / const Color& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_ChangeColorTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Color / const Color& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_ChangeColorTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Color / const Color& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_ChangeColorTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_ChangeColorTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::ChangeColorTo(Color const &,float,bool,String)\n"
    "    Actor::ChangeColorTo(Color const &,float,bool)\n"
    "    Actor::ChangeColorTo(Color const &,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeSizeTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Actor::ChangeSizeTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeSizeTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeSizeTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Actor::ChangeSizeTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->ChangeSizeTo(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Actor::ChangeSizeTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->ChangeSizeTo(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Actor::ChangeSizeTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ChangeSizeTo",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::ChangeSizeTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ChangeSizeTo",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->ChangeSizeTo(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_ChangeSizeTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_ChangeSizeTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_ChangeSizeTo__SWIG_5(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_ChangeSizeTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_ChangeSizeTo__SWIG_4(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_ChangeSizeTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_ChangeSizeTo__SWIG_3(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_ChangeSizeTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::ChangeSizeTo(Vector2 const &,float,bool,String)\n"
    "    Actor::ChangeSizeTo(Vector2 const &,float,bool)\n"
    "    Actor::ChangeSizeTo(Vector2 const &,float)\n"
    "    Actor::ChangeSizeTo(float,float,bool,String)\n"
    "    Actor::ChangeSizeTo(float,float,bool)\n"
    "    Actor::ChangeSizeTo(float,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_GetSpriteTexture__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  int arg2 ;
  int result;
  
  SWIG_check_num_args("Actor::GetSpriteTexture",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetSpriteTexture",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::GetSpriteTexture",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetSpriteTexture",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  result = (int)(arg1)->GetSpriteTexture(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetSpriteTexture__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  int result;
  
  SWIG_check_num_args("Actor::GetSpriteTexture",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetSpriteTexture",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetSpriteTexture",1,SWIGTYPE_p_Actor);
  }
  
  result = (int)(arg1)->GetSpriteTexture();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetSpriteTexture(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      return _wrap_Actor_GetSpriteTexture__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_GetSpriteTexture__SWIG_0(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_GetSpriteTexture'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::GetSpriteTexture(int)\n"
    "    Actor::GetSpriteTexture()\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_SetSprite__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  int arg3 ;
  GLint arg4 ;
  GLint arg5 ;
  bool arg6 ;
  GLint *argp4 ;
  GLint *argp5 ;
  bool result;
  
  SWIG_check_num_args("Actor::SetSprite",6,6)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSprite",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetSprite",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetSprite",3,"int");
  if(!lua_isuserdata(L,4)) SWIG_fail_arg("Actor::SetSprite",4,"GLint");
  if(!lua_isuserdata(L,5)) SWIG_fail_arg("Actor::SetSprite",5,"GLint");
  if(!lua_isboolean(L,6)) SWIG_fail_arg("Actor::SetSprite",6,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSprite",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&argp4,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_SetSprite",4,SWIGTYPE_p_GLint);
  }
  arg4 = *argp4;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,5,(void**)&argp5,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_SetSprite",5,SWIGTYPE_p_GLint);
  }
  arg5 = *argp5;
  
  arg6 = (lua_toboolean(L, 6)!=0);
  result = (bool)(arg1)->SetSprite(arg2,arg3,arg4,arg5,arg6);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSprite__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  int arg3 ;
  GLint arg4 ;
  GLint arg5 ;
  GLint *argp4 ;
  GLint *argp5 ;
  bool result;
  
  SWIG_check_num_args("Actor::SetSprite",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSprite",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetSprite",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetSprite",3,"int");
  if(!lua_isuserdata(L,4)) SWIG_fail_arg("Actor::SetSprite",4,"GLint");
  if(!lua_isuserdata(L,5)) SWIG_fail_arg("Actor::SetSprite",5,"GLint");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSprite",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&argp4,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_SetSprite",4,SWIGTYPE_p_GLint);
  }
  arg4 = *argp4;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,5,(void**)&argp5,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_SetSprite",5,SWIGTYPE_p_GLint);
  }
  arg5 = *argp5;
  
  result = (bool)(arg1)->SetSprite(arg2,arg3,arg4,arg5);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSprite__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  int arg3 ;
  GLint arg4 ;
  GLint *argp4 ;
  bool result;
  
  SWIG_check_num_args("Actor::SetSprite",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSprite",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetSprite",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetSprite",3,"int");
  if(!lua_isuserdata(L,4)) SWIG_fail_arg("Actor::SetSprite",4,"GLint");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSprite",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&argp4,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_SetSprite",4,SWIGTYPE_p_GLint);
  }
  arg4 = *argp4;
  
  result = (bool)(arg1)->SetSprite(arg2,arg3,arg4);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSprite__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  int arg3 ;
  bool result;
  
  SWIG_check_num_args("Actor::SetSprite",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSprite",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetSprite",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::SetSprite",3,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSprite",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (int)lua_tonumber(L, 3);
  result = (bool)(arg1)->SetSprite(arg2,arg3);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSprite__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  bool result;
  
  SWIG_check_num_args("Actor::SetSprite",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSprite",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetSprite",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSprite",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (bool)(arg1)->SetSprite(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetSprite(lua_State* L) {
  int argc;
  int argv[7]={
    1,2,3,4,5,6,7
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_SetSprite__SWIG_4(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_SetSprite__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            void *ptr;
            if (lua_isuserdata(L,argv[3])==0 || SWIG_ConvertPtr(L,argv[3], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
              _v = 0;
            } else {
              _v = 1;
            }
          }
          if (_v) {
            return _wrap_Actor_SetSprite__SWIG_2(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            void *ptr;
            if (lua_isuserdata(L,argv[3])==0 || SWIG_ConvertPtr(L,argv[3], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
              _v = 0;
            } else {
              _v = 1;
            }
          }
          if (_v) {
            {
              void *ptr;
              if (lua_isuserdata(L,argv[4])==0 || SWIG_ConvertPtr(L,argv[4], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
                _v = 0;
              } else {
                _v = 1;
              }
            }
            if (_v) {
              return _wrap_Actor_SetSprite__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            void *ptr;
            if (lua_isuserdata(L,argv[3])==0 || SWIG_ConvertPtr(L,argv[3], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
              _v = 0;
            } else {
              _v = 1;
            }
          }
          if (_v) {
            {
              void *ptr;
              if (lua_isuserdata(L,argv[4])==0 || SWIG_ConvertPtr(L,argv[4], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
                _v = 0;
              } else {
                _v = 1;
              }
            }
            if (_v) {
              {
                _v = lua_isboolean(L,argv[5]);
              }
              if (_v) {
                return _wrap_Actor_SetSprite__SWIG_0(L);
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_SetSprite'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::SetSprite(String,int,GLint,GLint,bool)\n"
    "    Actor::SetSprite(String,int,GLint,GLint)\n"
    "    Actor::SetSprite(String,int,GLint)\n"
    "    Actor::SetSprite(String,int)\n"
    "    Actor::SetSprite(String)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_ClearSpriteInfo(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  
  SWIG_check_num_args("Actor::ClearSpriteInfo",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::ClearSpriteInfo",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_ClearSpriteInfo",1,SWIGTYPE_p_Actor);
  }
  
  (arg1)->ClearSpriteInfo();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_LoadSpriteFrames__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  GLint arg3 ;
  GLint arg4 ;
  GLint *argp3 ;
  GLint *argp4 ;
  
  SWIG_check_num_args("Actor::LoadSpriteFrames",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::LoadSpriteFrames",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::LoadSpriteFrames",2,"String");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Actor::LoadSpriteFrames",3,"GLint");
  if(!lua_isuserdata(L,4)) SWIG_fail_arg("Actor::LoadSpriteFrames",4,"GLint");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",3,SWIGTYPE_p_GLint);
  }
  arg3 = *argp3;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&argp4,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",4,SWIGTYPE_p_GLint);
  }
  arg4 = *argp4;
  
  (arg1)->LoadSpriteFrames(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_LoadSpriteFrames__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  GLint arg3 ;
  GLint *argp3 ;
  
  SWIG_check_num_args("Actor::LoadSpriteFrames",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::LoadSpriteFrames",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::LoadSpriteFrames",2,"String");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Actor::LoadSpriteFrames",3,"GLint");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",3,SWIGTYPE_p_GLint);
  }
  arg3 = *argp3;
  
  (arg1)->LoadSpriteFrames(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_LoadSpriteFrames__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("Actor::LoadSpriteFrames",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::LoadSpriteFrames",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::LoadSpriteFrames",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_LoadSpriteFrames",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->LoadSpriteFrames(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_LoadSpriteFrames(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_LoadSpriteFrames__SWIG_2(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_Actor_LoadSpriteFrames__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            void *ptr;
            if (lua_isuserdata(L,argv[3])==0 || SWIG_ConvertPtr(L,argv[3], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
              _v = 0;
            } else {
              _v = 1;
            }
          }
          if (_v) {
            return _wrap_Actor_LoadSpriteFrames__SWIG_0(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_LoadSpriteFrames'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::LoadSpriteFrames(String,GLint,GLint)\n"
    "    Actor::LoadSpriteFrames(String,GLint)\n"
    "    Actor::LoadSpriteFrames(String)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_PlaySpriteAnimation__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  spriteAnimationType arg3 ;
  int arg4 ;
  int arg5 ;
  char *arg6 = (char *) 0 ;
  
  SWIG_check_num_args("Actor::PlaySpriteAnimation",6,6)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::PlaySpriteAnimation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::PlaySpriteAnimation",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::PlaySpriteAnimation",3,"spriteAnimationType");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Actor::PlaySpriteAnimation",4,"int");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("Actor::PlaySpriteAnimation",5,"int");
  if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("Actor::PlaySpriteAnimation",6,"char const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_PlaySpriteAnimation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (spriteAnimationType)(int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  arg5 = (int)lua_tonumber(L, 5);
  arg6 = (char *)lua_tostring(L, 6);
  (arg1)->PlaySpriteAnimation(arg2,arg3,arg4,arg5,(char const *)arg6);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_PlaySpriteAnimation__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  spriteAnimationType arg3 ;
  int arg4 ;
  int arg5 ;
  
  SWIG_check_num_args("Actor::PlaySpriteAnimation",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::PlaySpriteAnimation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::PlaySpriteAnimation",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::PlaySpriteAnimation",3,"spriteAnimationType");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Actor::PlaySpriteAnimation",4,"int");
  if(!lua_isnumber(L,5)) SWIG_fail_arg("Actor::PlaySpriteAnimation",5,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_PlaySpriteAnimation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (spriteAnimationType)(int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  arg5 = (int)lua_tonumber(L, 5);
  (arg1)->PlaySpriteAnimation(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_PlaySpriteAnimation__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  spriteAnimationType arg3 ;
  int arg4 ;
  
  SWIG_check_num_args("Actor::PlaySpriteAnimation",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::PlaySpriteAnimation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::PlaySpriteAnimation",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::PlaySpriteAnimation",3,"spriteAnimationType");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Actor::PlaySpriteAnimation",4,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_PlaySpriteAnimation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (spriteAnimationType)(int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  (arg1)->PlaySpriteAnimation(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_PlaySpriteAnimation__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  spriteAnimationType arg3 ;
  
  SWIG_check_num_args("Actor::PlaySpriteAnimation",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::PlaySpriteAnimation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::PlaySpriteAnimation",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Actor::PlaySpriteAnimation",3,"spriteAnimationType");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_PlaySpriteAnimation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (spriteAnimationType)(int)lua_tonumber(L, 3);
  (arg1)->PlaySpriteAnimation(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_PlaySpriteAnimation__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Actor::PlaySpriteAnimation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::PlaySpriteAnimation",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::PlaySpriteAnimation",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_PlaySpriteAnimation",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->PlaySpriteAnimation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_PlaySpriteAnimation(lua_State* L) {
  int argc;
  int argv[7]={
    1,2,3,4,5,6,7
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_PlaySpriteAnimation__SWIG_4(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Actor_PlaySpriteAnimation__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Actor_PlaySpriteAnimation__SWIG_2(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              return _wrap_Actor_PlaySpriteAnimation__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isnumber(L,argv[4]);
            }
            if (_v) {
              {
                _v = SWIG_lua_isnilstring(L,argv[5]);
              }
              if (_v) {
                return _wrap_Actor_PlaySpriteAnimation__SWIG_0(L);
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_PlaySpriteAnimation'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::PlaySpriteAnimation(float,spriteAnimationType,int,int,char const *)\n"
    "    Actor::PlaySpriteAnimation(float,spriteAnimationType,int,int)\n"
    "    Actor::PlaySpriteAnimation(float,spriteAnimationType,int)\n"
    "    Actor::PlaySpriteAnimation(float,spriteAnimationType)\n"
    "    Actor::PlaySpriteAnimation(float)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_SetSpriteFrame(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Actor::SetSpriteFrame",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetSpriteFrame",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetSpriteFrame",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetSpriteFrame",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->SetSpriteFrame(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetSpriteFrame(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  int result;
  
  SWIG_check_num_args("Actor::GetSpriteFrame",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetSpriteFrame",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetSpriteFrame",1,SWIGTYPE_p_Actor);
  }
  
  result = (int)(arg1)->GetSpriteFrame();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_IsSpriteAnimPlaying(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  bool result;
  
  SWIG_check_num_args("Actor::IsSpriteAnimPlaying",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::IsSpriteAnimPlaying",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_IsSpriteAnimPlaying",1,SWIGTYPE_p_Actor);
  }
  
  result = (bool)(arg1)->IsSpriteAnimPlaying();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetUVs(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("Actor::SetUVs",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetUVs",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetUVs",1,SWIGTYPE_p_Actor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->SetUVs((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetUVs(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("Actor::GetUVs",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetUVs",1,"Actor const *");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("Actor::GetUVs",2,"Vector2 &");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("Actor::GetUVs",3,"Vector2 &");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetUVs",1,SWIGTYPE_p_Actor);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Actor_GetUVs",2,SWIGTYPE_p_Vector2);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_Vector2,0))){
    SWIG_fail_ptr("Actor_GetUVs",3,SWIGTYPE_p_Vector2);
  }
  
  ((Actor const *)arg1)->GetUVs(*arg2,*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_IsTagged(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  bool result;
  
  SWIG_check_num_args("Actor::IsTagged",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::IsTagged",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::IsTagged",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_IsTagged",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (bool)(arg1)->IsTagged(arg2);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_Tag(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("Actor::Tag",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::Tag",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::Tag",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_Tag",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->Tag(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_Untag(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("Actor::Untag",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::Untag",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::Untag",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_Untag",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->Untag(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetTags(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  SwigValueWrapper< std::set< std::string > > result;
  
  SWIG_check_num_args("Actor::GetTags",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetTags",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetTags",1,SWIGTYPE_p_Actor);
  }
  
  result = (arg1)->GetTags();
  
  {
    lua_newtable(L);
    
    std::set<String>::iterator it = (&result)->begin();
    int setCounter = 1;
    while (it != (&result)->end())
    {
      lua_pushnumber(L, setCounter++);
      lua_pushstring(L, (*it).c_str()); 
      lua_settable(L, -3);
      
      it++;
    }
    
    SWIG_arg += 1; 
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetName(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  String result;
  
  SWIG_check_num_args("Actor::SetName",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetName",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetName",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetName",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (arg1)->SetName(arg2);
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetName(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String result;
  
  SWIG_check_num_args("Actor::GetName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetName",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetName",1,SWIGTYPE_p_Actor);
  }
  
  result = (arg1)->GetName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetNamed(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  Actor *result = 0 ;
  
  SWIG_check_num_args("Actor::GetNamed",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("Actor::GetNamed",1,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  result = (Actor *)Actor::GetNamed(arg1);
  {
    int dcast = 0;
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      TextActor *dobj = dynamic_cast<TextActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_TextActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      HUDActor *dobj = dynamic_cast<HUDActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_HUDActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      FullScreenActor *dobj = dynamic_cast<FullScreenActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_FullScreenActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Camera *dobj = dynamic_cast<Camera *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Camera, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      PhysicsActor *dobj = dynamic_cast<PhysicsActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_PhysicsActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      ParticleActor *dobj = dynamic_cast<ParticleActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_ParticleActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*//*@SWIG@*/
    if (!dcast) {
      SWIG_NewPointerObj(L, result, SWIGTYPE_p_Actor, 0); SWIG_arg++;
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetLayer__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("Actor::SetLayer",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetLayer",1,"Actor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Actor::SetLayer",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetLayer",1,SWIGTYPE_p_Actor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->SetLayer(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetLayer__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("Actor::SetLayer",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetLayer",1,"Actor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("Actor::SetLayer",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_SetLayer",1,SWIGTYPE_p_Actor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->SetLayer(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetLayer(lua_State* L) {
  int argc;
  int argv[3]={
    1,2,3
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_SetLayer__SWIG_0(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_Actor_SetLayer__SWIG_1(L);
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Actor_SetLayer'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Actor::SetLayer(int)\n"
    "    Actor::SetLayer(String)\n");
  lua_error(L);return 0;
}


static int _wrap_Actor_LevelUnloaded(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  
  SWIG_check_num_args("Actor::LevelUnloaded",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::LevelUnloaded",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_LevelUnloaded",1,SWIGTYPE_p_Actor);
  }
  
  (arg1)->LevelUnloaded();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetSelf(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  Actor *result = 0 ;
  
  SWIG_check_num_args("Actor::GetSelf",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetSelf",1,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetSelf",1,SWIGTYPE_p_Actor);
  }
  
  result = (Actor *)(arg1)->GetSelf();
  {
    int dcast = 0;
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      TextActor *dobj = dynamic_cast<TextActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_TextActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      HUDActor *dobj = dynamic_cast<HUDActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_HUDActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      FullScreenActor *dobj = dynamic_cast<FullScreenActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_FullScreenActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Camera *dobj = dynamic_cast<Camera *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Camera, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      PhysicsActor *dobj = dynamic_cast<PhysicsActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_PhysicsActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      ParticleActor *dobj = dynamic_cast<ParticleActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_ParticleActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*//*@SWIG@*/
    if (!dcast) {
      SWIG_NewPointerObj(L, result, SWIGTYPE_p_Actor, 0); SWIG_arg++;
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  String result;
  
  SWIG_check_num_args("Actor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::GetClassName",1,"Actor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Actor_GetClassName",1,SWIGTYPE_p_Actor);
  }
  
  result = ((Actor const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Actor_SetScriptCreatedActor(lua_State* L) {
  int SWIG_arg = 0;
  Actor *arg1 = (Actor *) 0 ;
  
  SWIG_check_num_args("Actor::SetScriptCreatedActor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Actor::SetScriptCreatedActor",1,"Actor *");
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Actor,SWIG_POINTER_DISOWN))){
    SWIG_fail_ptr("Actor_SetScriptCreatedActor",1,SWIGTYPE_p_Actor);
  }
  
  Actor::SetScriptCreatedActor(arg1);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Actor(void *obj) {
Actor *arg1 = (Actor *) obj;
delete arg1;
}
static swig_lua_method swig_Actor_methods[] = {
    {"SetSize", _wrap_Actor_SetSize}, 
    {"GetSize", _wrap_Actor_GetSize}, 
    {"SetPosition", _wrap_Actor_SetPosition}, 
    {"GetPosition", _wrap_Actor_GetPosition}, 
    {"SetRotation", _wrap_Actor_SetRotation}, 
    {"GetRotation", _wrap_Actor_GetRotation}, 
    {"SetColor", _wrap_Actor_SetColor}, 
    {"GetColor", _wrap_Actor_GetColor}, 
    {"SetAlpha", _wrap_Actor_SetAlpha}, 
    {"GetAlpha", _wrap_Actor_GetAlpha}, 
    {"SetDrawShape", _wrap_Actor_SetDrawShape}, 
    {"GetDrawShape", _wrap_Actor_GetDrawShape}, 
    {"MoveTo", _wrap_Actor_MoveTo}, 
    {"RotateTo", _wrap_Actor_RotateTo}, 
    {"ChangeColorTo", _wrap_Actor_ChangeColorTo}, 
    {"ChangeSizeTo", _wrap_Actor_ChangeSizeTo}, 
    {"GetSpriteTexture", _wrap_Actor_GetSpriteTexture}, 
    {"SetSprite", _wrap_Actor_SetSprite}, 
    {"ClearSpriteInfo", _wrap_Actor_ClearSpriteInfo}, 
    {"LoadSpriteFrames", _wrap_Actor_LoadSpriteFrames}, 
    {"PlaySpriteAnimation", _wrap_Actor_PlaySpriteAnimation}, 
    {"SetSpriteFrame", _wrap_Actor_SetSpriteFrame}, 
    {"GetSpriteFrame", _wrap_Actor_GetSpriteFrame}, 
    {"IsSpriteAnimPlaying", _wrap_Actor_IsSpriteAnimPlaying}, 
    {"SetUVs", _wrap_Actor_SetUVs}, 
    {"GetUVs", _wrap_Actor_GetUVs}, 
    {"IsTagged", _wrap_Actor_IsTagged}, 
    {"Tag", _wrap_Actor_Tag}, 
    {"Untag", _wrap_Actor_Untag}, 
    {"GetTags", _wrap_Actor_GetTags}, 
    {"SetName", _wrap_Actor_SetName}, 
    {"GetName", _wrap_Actor_GetName}, 
    {"SetLayer", _wrap_Actor_SetLayer}, 
    {"LevelUnloaded", _wrap_Actor_LevelUnloaded}, 
    {"GetSelf", _wrap_Actor_GetSelf}, 
    {"GetClassName", _wrap_Actor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_Actor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Actor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Actor_cls_methods[] = {
    {"GetNamed", _wrap_Actor_GetNamed}, 
    {"SetScriptCreatedActor", _wrap_Actor_SetScriptCreatedActor}, 
    {0,0}
};
static swig_lua_const_info swig_Actor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Actor_bases[] = {0,0,0};
static const char *swig_Actor_base_names[] = {"Renderable *","MessageListener *",0};
static swig_lua_class _wrap_class_Actor = { "Actor", &SWIGTYPE_p_Actor,_wrap_new_Actor, swig_delete_Actor, swig_Actor_methods, swig_Actor_attributes, { "Actor", swig_Actor_cls_methods, swig_Actor_cls_attributes, swig_Actor_cls_constants }, swig_Actor_bases, swig_Actor_base_names };

static int _wrap_TagCollection_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  TagCollection *result = 0 ;
  
  SWIG_check_num_args("TagCollection::GetInstance",0,0)
  result = (TagCollection *) &TagCollection::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TagCollection,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TagCollection_GetObjectsTagged(lua_State* L) {
  int SWIG_arg = 0;
  TagCollection *arg1 = (TagCollection *) 0 ;
  String arg2 ;
  SwigValueWrapper< std::set< Actor * > > result;
  
  SWIG_check_num_args("TagCollection::GetObjectsTagged",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TagCollection::GetObjectsTagged",1,"TagCollection *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TagCollection::GetObjectsTagged",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TagCollection,0))){
    SWIG_fail_ptr("TagCollection_GetObjectsTagged",1,SWIGTYPE_p_TagCollection);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (arg1)->GetObjectsTagged(arg2);
  
  {
    lua_newtable(L);
    std::set<Actor*>::iterator it = (&result)->begin();
    int setCounter = 1;
    while (it != (&result)->end())
    {
      lua_pushnumber(L, setCounter++);
      SWIG_NewPointerObj(L, (*it), SWIGTYPE_p_Actor, 0);
      lua_settable(L, -3);
      
      it++;
    }
    
    SWIG_arg += 1;
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TagCollection_GetTagList(lua_State* L) {
  int SWIG_arg = 0;
  TagCollection *arg1 = (TagCollection *) 0 ;
  SwigValueWrapper< std::set< std::string > > result;
  
  SWIG_check_num_args("TagCollection::GetTagList",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TagCollection::GetTagList",1,"TagCollection *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TagCollection,0))){
    SWIG_fail_ptr("TagCollection_GetTagList",1,SWIGTYPE_p_TagCollection);
  }
  
  result = (arg1)->GetTagList();
  
  {
    lua_newtable(L);
    
    std::set<String>::iterator it = (&result)->begin();
    int setCounter = 1;
    while (it != (&result)->end())
    {
      lua_pushnumber(L, setCounter++);
      lua_pushstring(L, (*it).c_str()); 
      lua_settable(L, -3);
      
      it++;
    }
    
    SWIG_arg += 1; 
  }
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_TagCollection(void *obj) {
TagCollection *arg1 = (TagCollection *) obj;
delete arg1;
}
static swig_lua_method swig_TagCollection_methods[] = {
    {"GetObjectsTagged", _wrap_TagCollection_GetObjectsTagged}, 
    {"GetTagList", _wrap_TagCollection_GetTagList}, 
    {0,0}
};
static swig_lua_attribute swig_TagCollection_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TagCollection_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TagCollection_cls_methods[] = {
    {"GetInstance", _wrap_TagCollection_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_TagCollection_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TagCollection_bases[] = {0};
static const char *swig_TagCollection_base_names[] = {0};
static swig_lua_class _wrap_class_TagCollection = { "TagCollection", &SWIGTYPE_p_TagCollection,0, swig_delete_TagCollection, swig_TagCollection_methods, swig_TagCollection_attributes, { "TagCollection", swig_TagCollection_cls_methods, swig_TagCollection_cls_attributes, swig_TagCollection_cls_constants }, swig_TagCollection_bases, swig_TagCollection_base_names };

static int _wrap_Camera_GetInstance(lua_State* L) {
  int SWIG_arg = 0;
  Camera *result = 0 ;
  
  SWIG_check_num_args("Camera::GetInstance",0,0)
  result = (Camera *) &Camera::GetInstance();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Camera,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_Reset(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  
  SWIG_check_num_args("Camera::Reset",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::Reset",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_Reset",1,SWIGTYPE_p_Camera);
  }
  
  (arg1)->Reset();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_LockTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Actor *arg2 = (Actor *) 0 ;
  bool arg3 ;
  bool arg4 ;
  bool arg5 ;
  
  SWIG_check_num_args("Camera::LockTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::LockTo",1,"Camera *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Camera::LockTo",2,"Actor *");
  if(!lua_isboolean(L,3)) SWIG_fail_arg("Camera::LockTo",3,"bool");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Camera::LockTo",4,"bool");
  if(!lua_isboolean(L,5)) SWIG_fail_arg("Camera::LockTo",5,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_LockTo",1,SWIGTYPE_p_Camera);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Camera_LockTo",2,SWIGTYPE_p_Actor);
  }
  
  arg3 = (lua_toboolean(L, 3)!=0);
  arg4 = (lua_toboolean(L, 4)!=0);
  arg5 = (lua_toboolean(L, 5)!=0);
  (arg1)->LockTo(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_LockTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Actor *arg2 = (Actor *) 0 ;
  bool arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Camera::LockTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::LockTo",1,"Camera *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Camera::LockTo",2,"Actor *");
  if(!lua_isboolean(L,3)) SWIG_fail_arg("Camera::LockTo",3,"bool");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Camera::LockTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_LockTo",1,SWIGTYPE_p_Camera);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Camera_LockTo",2,SWIGTYPE_p_Actor);
  }
  
  arg3 = (lua_toboolean(L, 3)!=0);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->LockTo(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_LockTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Actor *arg2 = (Actor *) 0 ;
  bool arg3 ;
  
  SWIG_check_num_args("Camera::LockTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::LockTo",1,"Camera *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Camera::LockTo",2,"Actor *");
  if(!lua_isboolean(L,3)) SWIG_fail_arg("Camera::LockTo",3,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_LockTo",1,SWIGTYPE_p_Camera);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Camera_LockTo",2,SWIGTYPE_p_Actor);
  }
  
  arg3 = (lua_toboolean(L, 3)!=0);
  (arg1)->LockTo(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_LockTo__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Actor *arg2 = (Actor *) 0 ;
  
  SWIG_check_num_args("Camera::LockTo",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::LockTo",1,"Camera *");
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("Camera::LockTo",2,"Actor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_LockTo",1,SWIGTYPE_p_Camera);
  }
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Actor,0))){
    SWIG_fail_ptr("Camera_LockTo",2,SWIGTYPE_p_Actor);
  }
  
  (arg1)->LockTo(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_LockTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        return _wrap_Camera_LockTo__SWIG_3(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isboolean(L,argv[2]);
        }
        if (_v) {
          return _wrap_Camera_LockTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isboolean(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Camera_LockTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        void *ptr;
        if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Actor, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          _v = lua_isboolean(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isboolean(L,argv[4]);
            }
            if (_v) {
              return _wrap_Camera_LockTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Camera_LockTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Camera::LockTo(Actor *,bool,bool,bool)\n"
    "    Camera::LockTo(Actor *,bool,bool)\n"
    "    Camera::LockTo(Actor *,bool)\n"
    "    Camera::LockTo(Actor *)\n");
  lua_error(L);return 0;
}


static int _wrap_Camera_GetLockedActor(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Actor *result = 0 ;
  
  SWIG_check_num_args("Camera::GetLockedActor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetLockedActor",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetLockedActor",1,SWIGTYPE_p_Camera);
  }
  
  result = (Actor *)(arg1)->GetLockedActor();
  {
    int dcast = 0;
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,200,%formacro@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      TextActor *dobj = dynamic_cast<TextActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_TextActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      HUDActor *dobj = dynamic_cast<HUDActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_HUDActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      FullScreenActor *dobj = dynamic_cast<FullScreenActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_FullScreenActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      Camera *dobj = dynamic_cast<Camera *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_Camera, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      PhysicsActor *dobj = dynamic_cast<PhysicsActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_PhysicsActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    /*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\typemaps\swigmacros.swg,192,%_formacro_1@*//*@SWIG:..\..\Angel\Libraries\swig\angelSwig\swiglib\lua\factory.i,7,%_factory_dispatch@*/ 
    if (!dcast) {
      ParticleActor *dobj = dynamic_cast<ParticleActor *>(result);
      if (dobj) {
        dcast = 1;
        SWIG_NewPointerObj(L, dobj, SWIGTYPE_p_ParticleActor, 0); SWIG_arg++;
      }   
    }/*@SWIG@*/
    
    
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*/
    
    /*@SWIG@*//*@SWIG@*/
    if (!dcast) {
      SWIG_NewPointerObj(L, result, SWIGTYPE_p_Actor, 0); SWIG_arg++;
    }
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetWindowHeight(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  int result;
  
  SWIG_check_num_args("Camera::GetWindowHeight",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetWindowHeight",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetWindowHeight",1,SWIGTYPE_p_Camera);
  }
  
  result = (int)(arg1)->GetWindowHeight();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetWindowWidth(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  int result;
  
  SWIG_check_num_args("Camera::GetWindowWidth",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetWindowWidth",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetWindowWidth",1,SWIGTYPE_p_Camera);
  }
  
  result = (int)(arg1)->GetWindowWidth();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetViewRadius(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  double result;
  
  SWIG_check_num_args("Camera::GetViewRadius",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetViewRadius",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetViewRadius",1,SWIGTYPE_p_Camera);
  }
  
  result = (double)(arg1)->GetViewRadius();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetWorldMaxVertex(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Camera::GetWorldMaxVertex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetWorldMaxVertex",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetWorldMaxVertex",1,SWIGTYPE_p_Camera);
  }
  
  result = (arg1)->GetWorldMaxVertex();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetWorldMinVertex(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("Camera::GetWorldMinVertex",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetWorldMinVertex",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetWorldMinVertex",1,SWIGTYPE_p_Camera);
  }
  
  result = (arg1)->GetWorldMinVertex();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetPosition__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  
  SWIG_check_num_args("Camera::SetPosition",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetPosition",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::SetPosition",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Camera::SetPosition",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetPosition",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  (arg1)->SetPosition(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetPosition__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("Camera::SetPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetPosition",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::SetPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetPosition",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetPosition(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetPosition__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector3 *arg2 = 0 ;
  
  SWIG_check_num_args("Camera::SetPosition",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetPosition",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetPosition",1,SWIGTYPE_p_Camera);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  (arg1)->SetPosition((Vector3 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetPosition__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("Camera::SetPosition",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetPosition",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetPosition",1,SWIGTYPE_p_Camera);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetPosition((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetPosition(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_Camera_SetPosition__SWIG_2(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_Camera_SetPosition__SWIG_3(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Camera_SetPosition__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_Camera_SetPosition__SWIG_0(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Camera_SetPosition'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Camera::SetPosition(float,float,float)\n"
    "    Camera::SetPosition(float,float)\n"
    "    Camera::SetPosition(Vector3 const &)\n"
    "    Camera::SetPosition(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_Camera_SetRotation(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Camera::SetRotation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetRotation",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetRotation",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetRotation",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetRotation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_MoveTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector3 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("Camera::MoveTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::MoveTo",1,"Camera *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Camera::MoveTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("Camera::MoveTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_MoveTo",1,SWIGTYPE_p_Camera);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->MoveTo((Vector3 const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_MoveTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector3 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("Camera::MoveTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::MoveTo",1,"Camera *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("Camera::MoveTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_MoveTo",1,SWIGTYPE_p_Camera);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->MoveTo((Vector3 const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_MoveTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector3 *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("Camera::MoveTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::MoveTo",1,"Camera *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::MoveTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_MoveTo",1,SWIGTYPE_p_Camera);
  }
  
  {
    // const Vector3& conversion
    Vector3 *vecPtr;
    Vector3 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector3,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float z = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      vec.Z = z;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->MoveTo((Vector3 const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_MoveTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_Camera_MoveTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_Camera_MoveTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Camera, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector3 / const Vector3& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector3);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_Camera_MoveTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'Camera_MoveTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    Camera::MoveTo(Vector3 const &,float,bool,String)\n"
    "    Camera::MoveTo(Vector3 const &,float,bool)\n"
    "    Camera::MoveTo(Vector3 const &,float)\n");
  lua_error(L);return 0;
}


static int _wrap_Camera_GetZ(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float result;
  
  SWIG_check_num_args("Camera::GetZ",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetZ",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetZ",1,SWIGTYPE_p_Camera);
  }
  
  result = (float)(arg1)->GetZ();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetZForViewRadius(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  float result;
  
  SWIG_check_num_args("Camera::GetZForViewRadius",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetZForViewRadius",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::GetZForViewRadius",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetZForViewRadius",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  result = (float)(arg1)->GetZForViewRadius(arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetNearClipDist(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float result;
  
  SWIG_check_num_args("Camera::GetNearClipDist",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetNearClipDist",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetNearClipDist",1,SWIGTYPE_p_Camera);
  }
  
  result = (float)(arg1)->GetNearClipDist();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetFarClipDist(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float result;
  
  SWIG_check_num_args("Camera::GetFarClipDist",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetFarClipDist",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetFarClipDist",1,SWIGTYPE_p_Camera);
  }
  
  result = (float)(arg1)->GetFarClipDist();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetZByViewRadius(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Camera::SetZByViewRadius",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetZByViewRadius",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetZByViewRadius",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetZByViewRadius",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetZByViewRadius(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetNearClipDist(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Camera::SetNearClipDist",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetNearClipDist",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetNearClipDist",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetNearClipDist",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetNearClipDist(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetFarClipDist(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("Camera::SetFarClipDist",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetFarClipDist",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetFarClipDist",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetFarClipDist",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetFarClipDist(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_SetViewCenter(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  
  SWIG_check_num_args("Camera::SetViewCenter",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::SetViewCenter",1,"Camera *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("Camera::SetViewCenter",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("Camera::SetViewCenter",3,"float");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("Camera::SetViewCenter",4,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_SetViewCenter",1,SWIGTYPE_p_Camera);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (float)lua_tonumber(L, 4);
  (arg1)->SetViewCenter(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetViewCenter(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  Vector3 *result = 0 ;
  
  SWIG_check_num_args("Camera::GetViewCenter",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetViewCenter",1,"Camera *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetViewCenter",1,SWIGTYPE_p_Camera);
  }
  
  result = (Vector3 *) &(arg1)->GetViewCenter();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Vector3,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_Camera_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  Camera *arg1 = (Camera *) 0 ;
  String result;
  
  SWIG_check_num_args("Camera::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Camera::GetClassName",1,"Camera const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Camera,0))){
    SWIG_fail_ptr("Camera_GetClassName",1,SWIGTYPE_p_Camera);
  }
  
  result = ((Camera const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_Camera(void *obj) {
Camera *arg1 = (Camera *) obj;
delete arg1;
}
static swig_lua_method swig_Camera_methods[] = {
    {"Reset", _wrap_Camera_Reset}, 
    {"LockTo", _wrap_Camera_LockTo}, 
    {"GetLockedActor", _wrap_Camera_GetLockedActor}, 
    {"GetWindowHeight", _wrap_Camera_GetWindowHeight}, 
    {"GetWindowWidth", _wrap_Camera_GetWindowWidth}, 
    {"GetViewRadius", _wrap_Camera_GetViewRadius}, 
    {"GetWorldMaxVertex", _wrap_Camera_GetWorldMaxVertex}, 
    {"GetWorldMinVertex", _wrap_Camera_GetWorldMinVertex}, 
    {"SetPosition", _wrap_Camera_SetPosition}, 
    {"SetRotation", _wrap_Camera_SetRotation}, 
    {"MoveTo", _wrap_Camera_MoveTo}, 
    {"GetZ", _wrap_Camera_GetZ}, 
    {"GetZForViewRadius", _wrap_Camera_GetZForViewRadius}, 
    {"GetNearClipDist", _wrap_Camera_GetNearClipDist}, 
    {"GetFarClipDist", _wrap_Camera_GetFarClipDist}, 
    {"SetZByViewRadius", _wrap_Camera_SetZByViewRadius}, 
    {"SetNearClipDist", _wrap_Camera_SetNearClipDist}, 
    {"SetFarClipDist", _wrap_Camera_SetFarClipDist}, 
    {"SetViewCenter", _wrap_Camera_SetViewCenter}, 
    {"GetViewCenter", _wrap_Camera_GetViewCenter}, 
    {"GetClassName", _wrap_Camera_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_Camera_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_Camera_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_Camera_cls_methods[] = {
    {"GetInstance", _wrap_Camera_GetInstance}, 
    {0,0}
};
static swig_lua_const_info swig_Camera_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_Camera_bases[] = {0,0};
static const char *swig_Camera_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_Camera = { "Camera", &SWIGTYPE_p_Camera,0, swig_delete_Camera, swig_Camera_methods, swig_Camera_attributes, { "Camera", swig_Camera_cls_methods, swig_Camera_cls_attributes, swig_Camera_cls_constants }, swig_Camera_bases, swig_Camera_base_names };

static int _wrap_new_PhysicsActor(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *result = 0 ;
  
  SWIG_check_num_args("PhysicsActor::PhysicsActor",0,0)
  result = (PhysicsActor *)new PhysicsActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PhysicsActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetDensity(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetDensity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetDensity",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetDensity",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetDensity",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetDensity(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetFriction(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetFriction",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetFriction",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetFriction",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetFriction",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetFriction(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetRestitution(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetRestitution",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetRestitution",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetRestitution",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetRestitution",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetRestitution(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetShapeType(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  PhysicsActor::eShapeType arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetShapeType",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetShapeType",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetShapeType",2,"PhysicsActor::eShapeType");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetShapeType",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (PhysicsActor::eShapeType)(int)lua_tonumber(L, 2);
  (arg1)->SetShapeType(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetIsSensor(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetIsSensor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetIsSensor",1,"PhysicsActor *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("PhysicsActor::SetIsSensor",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetIsSensor",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->SetIsSensor(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetGroupIndex(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetGroupIndex",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetGroupIndex",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetGroupIndex",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetGroupIndex",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->SetGroupIndex(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetFixedRotation(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetFixedRotation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetFixedRotation",1,"PhysicsActor *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("PhysicsActor::SetFixedRotation",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetFixedRotation",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->SetFixedRotation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_InitPhysics(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  
  SWIG_check_num_args("PhysicsActor::InitPhysics",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::InitPhysics",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_InitPhysics",1,SWIGTYPE_p_PhysicsActor);
  }
  
  (arg1)->InitPhysics();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_CustomInitPhysics(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  
  SWIG_check_num_args("PhysicsActor::CustomInitPhysics",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::CustomInitPhysics",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_CustomInitPhysics",1,SWIGTYPE_p_PhysicsActor);
  }
  
  (arg1)->CustomInitPhysics();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ApplyForce(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("PhysicsActor::ApplyForce",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ApplyForce",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ApplyForce",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->ApplyForce((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ApplyLocalForce(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("PhysicsActor::ApplyLocalForce",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ApplyLocalForce",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ApplyLocalForce",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->ApplyLocalForce((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ApplyTorque(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::ApplyTorque",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ApplyTorque",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::ApplyTorque",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ApplyTorque",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->ApplyTorque(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ApplyLinearImpulse(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  Vector2 *arg3 = 0 ;
  
  SWIG_check_num_args("PhysicsActor::ApplyLinearImpulse",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ApplyLinearImpulse",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ApplyLinearImpulse",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg3 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 3);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 3);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg3 = &vec;
    }
  }
  (arg1)->ApplyLinearImpulse((Vector2 const &)*arg2,(Vector2 const &)*arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ApplyAngularImpulse(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::ApplyAngularImpulse",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ApplyAngularImpulse",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::ApplyAngularImpulse",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ApplyAngularImpulse",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->ApplyAngularImpulse(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetSize__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::SetSize",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetSize",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetSize",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::SetSize",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetSize",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetSize(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetSize__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetSize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetSize",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetSize",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetSize",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetSize(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetSize__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("PhysicsActor::SetSize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetSize",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetSize",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetSize((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetSize(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_PhysicsActor_SetSize__SWIG_2(L);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_PhysicsActor_SetSize__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_SetSize__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_SetSize'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::SetSize(float,float)\n"
    "    PhysicsActor::SetSize(float)\n"
    "    PhysicsActor::SetSize(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_SetDrawSize__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::SetDrawSize",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetDrawSize",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetDrawSize",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::SetDrawSize",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetDrawSize",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetDrawSize(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetDrawSize__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetDrawSize",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetDrawSize",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetDrawSize",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetDrawSize",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetDrawSize(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetDrawSize(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        return _wrap_PhysicsActor_SetDrawSize__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_SetDrawSize__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_SetDrawSize'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::SetDrawSize(float,float)\n"
    "    PhysicsActor::SetDrawSize(float)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_SetPosition__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::SetPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetPosition",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::SetPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetPosition",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetPosition(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetPosition__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("PhysicsActor::SetPosition",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetPosition",1,"PhysicsActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetPosition",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetPosition((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_SetPosition(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_PhysicsActor_SetPosition__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_SetPosition__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_SetPosition'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::SetPosition(float,float)\n"
    "    PhysicsActor::SetPosition(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_SetRotation(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("PhysicsActor::SetRotation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::SetRotation",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::SetRotation",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_SetRotation",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetRotation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_MoveTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("PhysicsActor::MoveTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::MoveTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::MoveTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("PhysicsActor::MoveTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_MoveTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_MoveTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("PhysicsActor::MoveTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::MoveTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::MoveTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::MoveTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_MoveTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_MoveTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::MoveTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::MoveTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::MoveTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_MoveTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->MoveTo((Vector2 const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_MoveTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_MoveTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_PhysicsActor_MoveTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_PhysicsActor_MoveTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_MoveTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::MoveTo(Vector2 const &,float,bool,String)\n"
    "    PhysicsActor::MoveTo(Vector2 const &,float,bool)\n"
    "    PhysicsActor::MoveTo(Vector2 const &,float)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_RotateTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("PhysicsActor::RotateTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::RotateTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::RotateTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::RotateTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("PhysicsActor::RotateTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_RotateTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->RotateTo(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_RotateTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("PhysicsActor::RotateTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::RotateTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::RotateTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::RotateTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_RotateTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->RotateTo(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_RotateTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::RotateTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::RotateTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::RotateTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::RotateTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_RotateTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->RotateTo(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_RotateTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_RotateTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_PhysicsActor_RotateTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_PhysicsActor_RotateTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_RotateTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::RotateTo(float,float,bool,String)\n"
    "    PhysicsActor::RotateTo(float,float,bool)\n"
    "    PhysicsActor::RotateTo(float,float)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  Vector2 *arg2 = 0 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->ChangeSizeTo((Vector2 const &)*arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  String arg5 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",5,5)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",4,"bool");
  if(!lua_isstring(L,5)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",5,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (&arg5)->assign(lua_tostring(L,5),lua_rawlen(L,5));
  (arg1)->ChangeSizeTo(arg2,arg3,arg4,arg5);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  bool arg4 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",4,4)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",4,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  arg4 = (lua_toboolean(L, 4)!=0);
  (arg1)->ChangeSizeTo(arg2,arg3,arg4);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo__SWIG_5(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("PhysicsActor::ChangeSizeTo",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",1,"PhysicsActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("PhysicsActor::ChangeSizeTo",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_ChangeSizeTo",1,SWIGTYPE_p_PhysicsActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->ChangeSizeTo(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PhysicsActor_ChangeSizeTo(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_ChangeSizeTo__SWIG_2(L);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_PhysicsActor_ChangeSizeTo__SWIG_5(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_PhysicsActor_ChangeSizeTo__SWIG_1(L);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_PhysicsActor_ChangeSizeTo__SWIG_4(L);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_PhysicsActor_ChangeSizeTo__SWIG_0(L);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_PhysicsActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            {
              _v = lua_isstring(L,argv[4]);
            }
            if (_v) {
              return _wrap_PhysicsActor_ChangeSizeTo__SWIG_3(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'PhysicsActor_ChangeSizeTo'\n"
    "  Possible C/C++ prototypes are:\n"
    "    PhysicsActor::ChangeSizeTo(Vector2 const &,float,bool,String)\n"
    "    PhysicsActor::ChangeSizeTo(Vector2 const &,float,bool)\n"
    "    PhysicsActor::ChangeSizeTo(Vector2 const &,float)\n"
    "    PhysicsActor::ChangeSizeTo(float,float,bool,String)\n"
    "    PhysicsActor::ChangeSizeTo(float,float,bool)\n"
    "    PhysicsActor::ChangeSizeTo(float,float)\n");
  lua_error(L);return 0;
}


static int _wrap_PhysicsActor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  PhysicsActor *arg1 = (PhysicsActor *) 0 ;
  String result;
  
  SWIG_check_num_args("PhysicsActor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PhysicsActor::GetClassName",1,"PhysicsActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PhysicsActor,0))){
    SWIG_fail_ptr("PhysicsActor_GetClassName",1,SWIGTYPE_p_PhysicsActor);
  }
  
  result = ((PhysicsActor const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_PhysicsActor(void *obj) {
PhysicsActor *arg1 = (PhysicsActor *) obj;
delete arg1;
}
static swig_lua_method swig_PhysicsActor_methods[] = {
    {"SetDensity", _wrap_PhysicsActor_SetDensity}, 
    {"SetFriction", _wrap_PhysicsActor_SetFriction}, 
    {"SetRestitution", _wrap_PhysicsActor_SetRestitution}, 
    {"SetShapeType", _wrap_PhysicsActor_SetShapeType}, 
    {"SetIsSensor", _wrap_PhysicsActor_SetIsSensor}, 
    {"SetGroupIndex", _wrap_PhysicsActor_SetGroupIndex}, 
    {"SetFixedRotation", _wrap_PhysicsActor_SetFixedRotation}, 
    {"InitPhysics", _wrap_PhysicsActor_InitPhysics}, 
    {"CustomInitPhysics", _wrap_PhysicsActor_CustomInitPhysics}, 
    {"ApplyForce", _wrap_PhysicsActor_ApplyForce}, 
    {"ApplyLocalForce", _wrap_PhysicsActor_ApplyLocalForce}, 
    {"ApplyTorque", _wrap_PhysicsActor_ApplyTorque}, 
    {"ApplyLinearImpulse", _wrap_PhysicsActor_ApplyLinearImpulse}, 
    {"ApplyAngularImpulse", _wrap_PhysicsActor_ApplyAngularImpulse}, 
    {"SetSize", _wrap_PhysicsActor_SetSize}, 
    {"SetDrawSize", _wrap_PhysicsActor_SetDrawSize}, 
    {"SetPosition", _wrap_PhysicsActor_SetPosition}, 
    {"SetRotation", _wrap_PhysicsActor_SetRotation}, 
    {"MoveTo", _wrap_PhysicsActor_MoveTo}, 
    {"RotateTo", _wrap_PhysicsActor_RotateTo}, 
    {"ChangeSizeTo", _wrap_PhysicsActor_ChangeSizeTo}, 
    {"GetClassName", _wrap_PhysicsActor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_PhysicsActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_PhysicsActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_PhysicsActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_PhysicsActor_cls_constants[] = {
    {SWIG_LUA_CONSTTAB_INT("SHAPETYPE_BOX", PhysicsActor::SHAPETYPE_BOX)},
    {SWIG_LUA_CONSTTAB_INT("SHAPETYPE_CIRCLE", PhysicsActor::SHAPETYPE_CIRCLE)},
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_PhysicsActor_bases[] = {0,0};
static const char *swig_PhysicsActor_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_PhysicsActor = { "PhysicsActor", &SWIGTYPE_p_PhysicsActor,_wrap_new_PhysicsActor, swig_delete_PhysicsActor, swig_PhysicsActor_methods, swig_PhysicsActor_attributes, { "PhysicsActor", swig_PhysicsActor_cls_methods, swig_PhysicsActor_cls_attributes, swig_PhysicsActor_cls_constants }, swig_PhysicsActor_bases, swig_PhysicsActor_base_names };

static int _wrap_new_ParticleActor(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *result = 0 ;
  
  SWIG_check_num_args("ParticleActor::ParticleActor",0,0)
  result = (ParticleActor *)new ParticleActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_ParticleActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetParticlesPerSecond(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetParticlesPerSecond",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetParticlesPerSecond",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetParticlesPerSecond",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetParticlesPerSecond",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetParticlesPerSecond(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetSystemLifetime(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetSystemLifetime",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetSystemLifetime",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetSystemLifetime",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetSystemLifetime",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetSystemLifetime(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetParticleLifetime(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetParticleLifetime",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetParticleLifetime",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetParticleLifetime",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetParticleLifetime",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetParticleLifetime(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetSpread(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetSpread",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetSpread",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetSpread",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetSpread",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetSpread(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetEndScale(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetEndScale",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetEndScale",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetEndScale",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetEndScale",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetEndScale(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetEndColor(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  Color arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetEndColor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetEndColor",1,"ParticleActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetEndColor",1,SWIGTYPE_p_ParticleActor);
  }
  
  {
    // Color conversion
    Color *colPtr;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = *colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      arg2 = Color(r, g, b, a);
    }
  }
  (arg1)->SetEndColor(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetSpeedRange(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("ParticleActor::SetSpeedRange",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetSpeedRange",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetSpeedRange",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("ParticleActor::SetSpeedRange",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetSpeedRange",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetSpeedRange(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetMinSpeed(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetMinSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetMinSpeed",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetMinSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetMinSpeed",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetMinSpeed(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetMaxSpeed(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetMaxSpeed",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetMaxSpeed",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetMaxSpeed",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetMaxSpeed",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetMaxSpeed(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetGravity(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("ParticleActor::SetGravity",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetGravity",1,"ParticleActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetGravity",1,SWIGTYPE_p_ParticleActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetGravity((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetAttractor(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("ParticleActor::SetAttractor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetAttractor",1,"ParticleActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetAttractor",1,SWIGTYPE_p_ParticleActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetAttractor((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetAttractorStrength(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetAttractorStrength",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetAttractorStrength",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetAttractorStrength",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetAttractorStrength",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetAttractorStrength(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_SetMaxParticles(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("ParticleActor::SetMaxParticles",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::SetMaxParticles",1,"ParticleActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("ParticleActor::SetMaxParticles",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_SetMaxParticles",1,SWIGTYPE_p_ParticleActor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->SetMaxParticles(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_ParticleActor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  ParticleActor *arg1 = (ParticleActor *) 0 ;
  String result;
  
  SWIG_check_num_args("ParticleActor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ParticleActor::GetClassName",1,"ParticleActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ParticleActor,0))){
    SWIG_fail_ptr("ParticleActor_GetClassName",1,SWIGTYPE_p_ParticleActor);
  }
  
  result = ((ParticleActor const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_ParticleActor(void *obj) {
ParticleActor *arg1 = (ParticleActor *) obj;
delete arg1;
}
static swig_lua_method swig_ParticleActor_methods[] = {
    {"SetParticlesPerSecond", _wrap_ParticleActor_SetParticlesPerSecond}, 
    {"SetSystemLifetime", _wrap_ParticleActor_SetSystemLifetime}, 
    {"SetParticleLifetime", _wrap_ParticleActor_SetParticleLifetime}, 
    {"SetSpread", _wrap_ParticleActor_SetSpread}, 
    {"SetEndScale", _wrap_ParticleActor_SetEndScale}, 
    {"SetEndColor", _wrap_ParticleActor_SetEndColor}, 
    {"SetSpeedRange", _wrap_ParticleActor_SetSpeedRange}, 
    {"SetMinSpeed", _wrap_ParticleActor_SetMinSpeed}, 
    {"SetMaxSpeed", _wrap_ParticleActor_SetMaxSpeed}, 
    {"SetGravity", _wrap_ParticleActor_SetGravity}, 
    {"SetAttractor", _wrap_ParticleActor_SetAttractor}, 
    {"SetAttractorStrength", _wrap_ParticleActor_SetAttractorStrength}, 
    {"SetMaxParticles", _wrap_ParticleActor_SetMaxParticles}, 
    {"GetClassName", _wrap_ParticleActor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_ParticleActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_ParticleActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_ParticleActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_ParticleActor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_ParticleActor_bases[] = {0,0};
static const char *swig_ParticleActor_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_ParticleActor = { "ParticleActor", &SWIGTYPE_p_ParticleActor,_wrap_new_ParticleActor, swig_delete_ParticleActor, swig_ParticleActor_methods, swig_ParticleActor_attributes, { "ParticleActor", swig_ParticleActor_cls_methods, swig_ParticleActor_cls_attributes, swig_ParticleActor_cls_constants }, swig_ParticleActor_bases, swig_ParticleActor_base_names };

static int _wrap_new_TextActor__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  String arg2 ;
  TextAlignment arg3 ;
  int arg4 ;
  TextActor *result = 0 ;
  
  SWIG_check_num_args("TextActor::TextActor",4,4)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TextActor::TextActor",1,"String");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TextActor::TextActor",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("TextActor::TextActor",3,"TextAlignment");
  if(!lua_isnumber(L,4)) SWIG_fail_arg("TextActor::TextActor",4,"int");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (TextAlignment)(int)lua_tonumber(L, 3);
  arg4 = (int)lua_tonumber(L, 4);
  result = (TextActor *)new TextActor(arg1,arg2,arg3,arg4);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TextActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_TextActor__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  String arg2 ;
  TextAlignment arg3 ;
  TextActor *result = 0 ;
  
  SWIG_check_num_args("TextActor::TextActor",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TextActor::TextActor",1,"String");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TextActor::TextActor",2,"String");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("TextActor::TextActor",3,"TextAlignment");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  arg3 = (TextAlignment)(int)lua_tonumber(L, 3);
  result = (TextActor *)new TextActor(arg1,arg2,arg3);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TextActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_TextActor__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  String arg2 ;
  TextActor *result = 0 ;
  
  SWIG_check_num_args("TextActor::TextActor",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TextActor::TextActor",1,"String");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TextActor::TextActor",2,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  result = (TextActor *)new TextActor(arg1,arg2);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TextActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_TextActor__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  String arg1 ;
  TextActor *result = 0 ;
  
  SWIG_check_num_args("TextActor::TextActor",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("TextActor::TextActor",1,"String");
  (&arg1)->assign(lua_tostring(L,1),lua_rawlen(L,1));
  result = (TextActor *)new TextActor(arg1);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TextActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_TextActor__SWIG_4(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *result = 0 ;
  
  SWIG_check_num_args("TextActor::TextActor",0,0)
  result = (TextActor *)new TextActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_TextActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_TextActor(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_TextActor__SWIG_4(L);
  }
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_new_TextActor__SWIG_3(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        return _wrap_new_TextActor__SWIG_2(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_new_TextActor__SWIG_1(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isstring(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            _v = lua_isnumber(L,argv[3]);
          }
          if (_v) {
            return _wrap_new_TextActor__SWIG_0(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_TextActor'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TextActor::TextActor(String,String,TextAlignment,int)\n"
    "    TextActor::TextActor(String,String,TextAlignment)\n"
    "    TextActor::TextActor(String,String)\n"
    "    TextActor::TextActor(String)\n"
    "    TextActor::TextActor()\n");
  lua_error(L);return 0;
}


static int _wrap_TextActor_GetFont(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  String result;
  
  SWIG_check_num_args("TextActor::GetFont",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::GetFont",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_GetFont",1,SWIGTYPE_p_TextActor);
  }
  
  result = (arg1)->GetFont();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetFont(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("TextActor::SetFont",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetFont",1,"TextActor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TextActor::SetFont",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetFont",1,SWIGTYPE_p_TextActor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->SetFont(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_GetDisplayString(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  String result;
  
  SWIG_check_num_args("TextActor::GetDisplayString",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::GetDisplayString",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_GetDisplayString",1,SWIGTYPE_p_TextActor);
  }
  
  result = (arg1)->GetDisplayString();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetDisplayString(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  String arg2 ;
  
  SWIG_check_num_args("TextActor::SetDisplayString",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetDisplayString",1,"TextActor *");
  if(!lua_isstring(L,2)) SWIG_fail_arg("TextActor::SetDisplayString",2,"String");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetDisplayString",1,SWIGTYPE_p_TextActor);
  }
  
  (&arg2)->assign(lua_tostring(L,2),lua_rawlen(L,2));
  (arg1)->SetDisplayString(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_GetAlignment(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  TextAlignment result;
  
  SWIG_check_num_args("TextActor::GetAlignment",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::GetAlignment",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_GetAlignment",1,SWIGTYPE_p_TextActor);
  }
  
  result = (TextAlignment)(arg1)->GetAlignment();
  lua_pushnumber(L, (lua_Number)(int)(result)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetAlignment(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  TextAlignment arg2 ;
  
  SWIG_check_num_args("TextActor::SetAlignment",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetAlignment",1,"TextActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TextActor::SetAlignment",2,"TextAlignment");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetAlignment",1,SWIGTYPE_p_TextActor);
  }
  
  arg2 = (TextAlignment)(int)lua_tonumber(L, 2);
  (arg1)->SetAlignment(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_GetLineSpacing(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  int result;
  
  SWIG_check_num_args("TextActor::GetLineSpacing",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::GetLineSpacing",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_GetLineSpacing",1,SWIGTYPE_p_TextActor);
  }
  
  result = (int)(arg1)->GetLineSpacing();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetLineSpacing(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  int arg2 ;
  
  SWIG_check_num_args("TextActor::SetLineSpacing",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetLineSpacing",1,"TextActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TextActor::SetLineSpacing",2,"int");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetLineSpacing",1,SWIGTYPE_p_TextActor);
  }
  
  arg2 = (int)lua_tonumber(L, 2);
  (arg1)->SetLineSpacing(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetPosition__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  float arg2 ;
  float arg3 ;
  
  SWIG_check_num_args("TextActor::SetPosition",3,3)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetPosition",1,"TextActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TextActor::SetPosition",2,"float");
  if(!lua_isnumber(L,3)) SWIG_fail_arg("TextActor::SetPosition",3,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetPosition",1,SWIGTYPE_p_TextActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  arg3 = (float)lua_tonumber(L, 3);
  (arg1)->SetPosition(arg2,arg3);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetPosition__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("TextActor::SetPosition",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetPosition",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetPosition",1,SWIGTYPE_p_TextActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetPosition((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_SetPosition(lua_State* L) {
  int argc;
  int argv[4]={
    1,2,3,4
  };
  
  argc = lua_gettop(L);
  if (argc == 2) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_TextActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        // Vector2 / const Vector2& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 2))
          {
            // verify that at least the first two elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        return _wrap_TextActor_SetPosition__SWIG_1(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *ptr;
      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_TextActor, 0)) {
        _v = 0;
      } else {
        _v = 1;
      }
    }
    if (_v) {
      {
        _v = lua_isnumber(L,argv[1]);
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          return _wrap_TextActor_SetPosition__SWIG_0(L);
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'TextActor_SetPosition'\n"
    "  Possible C/C++ prototypes are:\n"
    "    TextActor::SetPosition(float,float)\n"
    "    TextActor::SetPosition(Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_TextActor_SetRotation(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("TextActor::SetRotation",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::SetRotation",1,"TextActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("TextActor::SetRotation",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_SetRotation",1,SWIGTYPE_p_TextActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetRotation(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_TextActor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  TextActor *arg1 = (TextActor *) 0 ;
  String result;
  
  SWIG_check_num_args("TextActor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("TextActor::GetClassName",1,"TextActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_TextActor,0))){
    SWIG_fail_ptr("TextActor_GetClassName",1,SWIGTYPE_p_TextActor);
  }
  
  result = (arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_TextActor(void *obj) {
TextActor *arg1 = (TextActor *) obj;
delete arg1;
}
static swig_lua_method swig_TextActor_methods[] = {
    {"GetFont", _wrap_TextActor_GetFont}, 
    {"SetFont", _wrap_TextActor_SetFont}, 
    {"GetDisplayString", _wrap_TextActor_GetDisplayString}, 
    {"SetDisplayString", _wrap_TextActor_SetDisplayString}, 
    {"GetAlignment", _wrap_TextActor_GetAlignment}, 
    {"SetAlignment", _wrap_TextActor_SetAlignment}, 
    {"GetLineSpacing", _wrap_TextActor_GetLineSpacing}, 
    {"SetLineSpacing", _wrap_TextActor_SetLineSpacing}, 
    {"SetPosition", _wrap_TextActor_SetPosition}, 
    {"SetRotation", _wrap_TextActor_SetRotation}, 
    {"GetClassName", _wrap_TextActor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_TextActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_TextActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_TextActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_TextActor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_TextActor_bases[] = {0,0};
static const char *swig_TextActor_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_TextActor = { "TextActor", &SWIGTYPE_p_TextActor,_wrap_new_TextActor, swig_delete_TextActor, swig_TextActor_methods, swig_TextActor_attributes, { "TextActor", swig_TextActor_cls_methods, swig_TextActor_cls_attributes, swig_TextActor_cls_constants }, swig_TextActor_bases, swig_TextActor_base_names };

static int _wrap_new_GridActor__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *result = 0 ;
  
  SWIG_check_num_args("GridActor::GridActor",0,0)
  result = (GridActor *)new GridActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_GridActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_GridActor__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  Color *arg1 = 0 ;
  Color *arg2 = 0 ;
  float arg3 ;
  Vector2 *arg4 = 0 ;
  Vector2 *arg5 = 0 ;
  GridActor *result = 0 ;
  
  SWIG_check_num_args("GridActor::GridActor",5,5)
  if(!lua_isnumber(L,3)) SWIG_fail_arg("GridActor::GridActor",3,"float");
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg1 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 1);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 1);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 1);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 1) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 1);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg1 = &col;
    }
  }
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  arg3 = (float)lua_tonumber(L, 3);
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,4,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg4 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 4);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 4);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg4 = &vec;
    }
  }
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,5,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg5 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 5);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 5);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg5 = &vec;
    }
  }
  result = (GridActor *)new GridActor((Color const &)*arg1,(Color const &)*arg2,arg3,(Vector2 const &)*arg4,(Vector2 const &)*arg5);
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_GridActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_GridActor(lua_State* L) {
  int argc;
  int argv[6]={
    1,2,3,4,5,6
  };
  
  argc = lua_gettop(L);
  if (argc == 0) {
    return _wrap_new_GridActor__SWIG_0(L);
  }
  if (argc == 5) {
    int _v;
    {
      // Color / const Color& typecheck
      _v = 0;
      swig_lua_userdata* usr;
      swig_cast_info *cast;
      usr=(swig_lua_userdata*)lua_touserdata(L,argv[0]);
      if (usr != NULL)
      {
        cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
        if (cast)
        {
          _v = 1;
        }
      }
      
      if (!_v)
      {
        if (lua_istable(L, argv[0]) && (lua_rawlen(L, argv[0]) >= 3))
        {
          // verify that at least the first three elements of the table contain numbers
          lua_pushinteger(L, 1);
          lua_gettable(L, argv[0]);
          int v1 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 2);
          lua_gettable(L, argv[0]);
          int v2 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          lua_pushinteger(L, 3);
          lua_gettable(L, argv[0]);
          int v3 = lua_isnumber(L, -1);
          lua_pop(L, 1);
          _v = (v1 && v2 && v3);
        }
        else
        {
          _v = 0;
        }
      }
    }
    if (_v) {
      {
        // Color / const Color& typecheck
        _v = 0;
        swig_lua_userdata* usr;
        swig_cast_info *cast;
        usr=(swig_lua_userdata*)lua_touserdata(L,argv[1]);
        if (usr != NULL)
        {
          cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Color);
          if (cast)
          {
            _v = 1;
          }
        }
        
        if (!_v)
        {
          if (lua_istable(L, argv[1]) && (lua_rawlen(L, argv[1]) >= 3))
          {
            // verify that at least the first three elements of the table contain numbers
            lua_pushinteger(L, 1);
            lua_gettable(L, argv[1]);
            int v1 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 2);
            lua_gettable(L, argv[1]);
            int v2 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            lua_pushinteger(L, 3);
            lua_gettable(L, argv[1]);
            int v3 = lua_isnumber(L, -1);
            lua_pop(L, 1);
            _v = (v1 && v2 && v3);
          }
          else
          {
            _v = 0;
          }
        }
      }
      if (_v) {
        {
          _v = lua_isnumber(L,argv[2]);
        }
        if (_v) {
          {
            // Vector2 / const Vector2& typecheck
            _v = 0;
            swig_lua_userdata* usr;
            swig_cast_info *cast;
            usr=(swig_lua_userdata*)lua_touserdata(L,argv[3]);
            if (usr != NULL)
            {
              cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
              if (cast)
              {
                _v = 1;
              }
            }
            
            if (!_v)
            {
              if (lua_istable(L, argv[3]) && (lua_rawlen(L, argv[3]) >= 2))
              {
                // verify that at least the first two elements of the table contain numbers
                lua_pushinteger(L, 1);
                lua_gettable(L, argv[3]);
                int v1 = lua_isnumber(L, -1);
                lua_pop(L, 1);
                lua_pushinteger(L, 2);
                lua_gettable(L, argv[3]);
                int v2 = lua_isnumber(L, -1);
                lua_pop(L, 1);
                _v = (v1 && v2);
              }
              else
              {
                _v = 0;
              }
            }
          }
          if (_v) {
            {
              // Vector2 / const Vector2& typecheck
              _v = 0;
              swig_lua_userdata* usr;
              swig_cast_info *cast;
              usr=(swig_lua_userdata*)lua_touserdata(L,argv[4]);
              if (usr != NULL)
              {
                cast=SWIG_TypeCheckStruct(usr->type, SWIGTYPE_p_Vector2);
                if (cast)
                {
                  _v = 1;
                }
              }
              
              if (!_v)
              {
                if (lua_istable(L, argv[4]) && (lua_rawlen(L, argv[4]) >= 2))
                {
                  // verify that at least the first two elements of the table contain numbers
                  lua_pushinteger(L, 1);
                  lua_gettable(L, argv[4]);
                  int v1 = lua_isnumber(L, -1);
                  lua_pop(L, 1);
                  lua_pushinteger(L, 2);
                  lua_gettable(L, argv[4]);
                  int v2 = lua_isnumber(L, -1);
                  lua_pop(L, 1);
                  _v = (v1 && v2);
                }
                else
                {
                  _v = 0;
                }
              }
            }
            if (_v) {
              return _wrap_new_GridActor__SWIG_1(L);
            }
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_GridActor'\n"
    "  Possible C/C++ prototypes are:\n"
    "    GridActor::GridActor()\n"
    "    GridActor::GridActor(Color const &,Color const &,float,Vector2 const &,Vector2 const &)\n");
  lua_error(L);return 0;
}


static int _wrap_GridActor_SetLineColor(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Color *arg2 = 0 ;
  
  SWIG_check_num_args("GridActor::SetLineColor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::SetLineColor",1,"GridActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_SetLineColor",1,SWIGTYPE_p_GridActor);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  (arg1)->SetLineColor((Color const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_GetLineColor(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("GridActor::GetLineColor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::GetLineColor",1,"GridActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_GetLineColor",1,SWIGTYPE_p_GridActor);
  }
  
  result = (Color *) &((GridActor const *)arg1)->GetLineColor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_SetAxisColor(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Color *arg2 = 0 ;
  
  SWIG_check_num_args("GridActor::SetAxisColor",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::SetAxisColor",1,"GridActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_SetAxisColor",1,SWIGTYPE_p_GridActor);
  }
  
  {
    // const Color& conversion
    Color *colPtr;
    Color col;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&colPtr,SWIGTYPE_p_Color,0))) 
    {
      arg2 = colPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float r = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float g = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 3);
      lua_gettable(L, 2);
      float b = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      float a = 1.0f;
      if (lua_rawlen(L, 2) >= 4)
      {
        lua_pushinteger(L, 4);
        lua_gettable(L, 2);
        if (lua_isnumber(L, -1))
        {
          a = lua_tonumber(L, -1);
        }
        lua_pop(L, 1);
      }
      
      // build the color
      col.R = r;
      col.G = g;
      col.B = b;
      col.A = a;
      arg2 = &col;
    }
  }
  (arg1)->SetAxisColor((Color const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_GetAxisColor(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Color *result = 0 ;
  
  SWIG_check_num_args("GridActor::GetAxisColor",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::GetAxisColor",1,"GridActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_GetAxisColor",1,SWIGTYPE_p_GridActor);
  }
  
  result = (Color *) &((GridActor const *)arg1)->GetAxisColor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_Color,0); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_SetInterval(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  float arg2 ;
  
  SWIG_check_num_args("GridActor::SetInterval",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::SetInterval",1,"GridActor *");
  if(!lua_isnumber(L,2)) SWIG_fail_arg("GridActor::SetInterval",2,"float");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_SetInterval",1,SWIGTYPE_p_GridActor);
  }
  
  arg2 = (float)lua_tonumber(L, 2);
  (arg1)->SetInterval(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_GetInterval(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  float result;
  
  SWIG_check_num_args("GridActor::GetInterval",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::GetInterval",1,"GridActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_GetInterval",1,SWIGTYPE_p_GridActor);
  }
  
  result = (float)((GridActor const *)arg1)->GetInterval();
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_SetMinCoord(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("GridActor::SetMinCoord",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::SetMinCoord",1,"GridActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_SetMinCoord",1,SWIGTYPE_p_GridActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetMinCoord((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_GetMinCoord(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("GridActor::GetMinCoord",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::GetMinCoord",1,"GridActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_GetMinCoord",1,SWIGTYPE_p_GridActor);
  }
  
  result = ((GridActor const *)arg1)->GetMinCoord();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_SetMaxCoord(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Vector2 *arg2 = 0 ;
  
  SWIG_check_num_args("GridActor::SetMaxCoord",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::SetMaxCoord",1,"GridActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_SetMaxCoord",1,SWIGTYPE_p_GridActor);
  }
  
  {
    // const Vector2& conversion
    Vector2 *vecPtr;
    Vector2 vec;
    if (SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&vecPtr,SWIGTYPE_p_Vector2,0))) 
    {
      arg2 = vecPtr;
    }
    else
    {
      // convert table parameters to floats
      lua_pushinteger(L, 1);
      lua_gettable(L, 2);
      float x = lua_tonumber(L, -1);
      lua_pop(L, 1);
      lua_pushinteger(L, 2);
      lua_gettable(L, 2);
      float y = lua_tonumber(L, -1);
      lua_pop(L, 1);
      
      // build the vector
      vec.X = x;
      vec.Y = y;
      arg2 = &vec;
    }
  }
  (arg1)->SetMaxCoord((Vector2 const &)*arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GridActor_GetMaxCoord(lua_State* L) {
  int SWIG_arg = 0;
  GridActor *arg1 = (GridActor *) 0 ;
  Vector2 result;
  
  SWIG_check_num_args("GridActor::GetMaxCoord",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("GridActor::GetMaxCoord",1,"GridActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_GridActor,0))){
    SWIG_fail_ptr("GridActor_GetMaxCoord",1,SWIGTYPE_p_GridActor);
  }
  
  result = ((GridActor const *)arg1)->GetMaxCoord();
  {
    Vector2 * resultptr = new Vector2((const Vector2 &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vector2,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_GridActor(void *obj) {
GridActor *arg1 = (GridActor *) obj;
delete arg1;
}
static swig_lua_method swig_GridActor_methods[] = {
    {"SetLineColor", _wrap_GridActor_SetLineColor}, 
    {"GetLineColor", _wrap_GridActor_GetLineColor}, 
    {"SetAxisColor", _wrap_GridActor_SetAxisColor}, 
    {"GetAxisColor", _wrap_GridActor_GetAxisColor}, 
    {"SetInterval", _wrap_GridActor_SetInterval}, 
    {"GetInterval", _wrap_GridActor_GetInterval}, 
    {"SetMinCoord", _wrap_GridActor_SetMinCoord}, 
    {"GetMinCoord", _wrap_GridActor_GetMinCoord}, 
    {"SetMaxCoord", _wrap_GridActor_SetMaxCoord}, 
    {"GetMaxCoord", _wrap_GridActor_GetMaxCoord}, 
    {0,0}
};
static swig_lua_attribute swig_GridActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_GridActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_GridActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_GridActor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_GridActor_bases[] = {0,0};
static const char *swig_GridActor_base_names[] = {"Renderable *",0};
static swig_lua_class _wrap_class_GridActor = { "GridActor", &SWIGTYPE_p_GridActor,_wrap_new_GridActor, swig_delete_GridActor, swig_GridActor_methods, swig_GridActor_attributes, { "GridActor", swig_GridActor_cls_methods, swig_GridActor_cls_attributes, swig_GridActor_cls_constants }, swig_GridActor_bases, swig_GridActor_base_names };

static int _wrap_new_FullScreenActor(lua_State* L) {
  int SWIG_arg = 0;
  FullScreenActor *result = 0 ;
  
  SWIG_check_num_args("FullScreenActor::FullScreenActor",0,0)
  result = (FullScreenActor *)new FullScreenActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_FullScreenActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_FullScreenActor_SetLock(lua_State* L) {
  int SWIG_arg = 0;
  FullScreenActor *arg1 = (FullScreenActor *) 0 ;
  bool arg2 ;
  
  SWIG_check_num_args("FullScreenActor::SetLock",2,2)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("FullScreenActor::SetLock",1,"FullScreenActor *");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("FullScreenActor::SetLock",2,"bool");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FullScreenActor,0))){
    SWIG_fail_ptr("FullScreenActor_SetLock",1,SWIGTYPE_p_FullScreenActor);
  }
  
  arg2 = (lua_toboolean(L, 2)!=0);
  (arg1)->SetLock(arg2);
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_FullScreenActor_IsLocked(lua_State* L) {
  int SWIG_arg = 0;
  FullScreenActor *arg1 = (FullScreenActor *) 0 ;
  bool result;
  
  SWIG_check_num_args("FullScreenActor::IsLocked",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("FullScreenActor::IsLocked",1,"FullScreenActor *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FullScreenActor,0))){
    SWIG_fail_ptr("FullScreenActor_IsLocked",1,SWIGTYPE_p_FullScreenActor);
  }
  
  result = (bool)(arg1)->IsLocked();
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_FullScreenActor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  FullScreenActor *arg1 = (FullScreenActor *) 0 ;
  String result;
  
  SWIG_check_num_args("FullScreenActor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("FullScreenActor::GetClassName",1,"FullScreenActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FullScreenActor,0))){
    SWIG_fail_ptr("FullScreenActor_GetClassName",1,SWIGTYPE_p_FullScreenActor);
  }
  
  result = ((FullScreenActor const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_FullScreenActor(void *obj) {
FullScreenActor *arg1 = (FullScreenActor *) obj;
delete arg1;
}
static swig_lua_method swig_FullScreenActor_methods[] = {
    {"SetLock", _wrap_FullScreenActor_SetLock}, 
    {"IsLocked", _wrap_FullScreenActor_IsLocked}, 
    {"GetClassName", _wrap_FullScreenActor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_FullScreenActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_FullScreenActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_FullScreenActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_FullScreenActor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_FullScreenActor_bases[] = {0,0};
static const char *swig_FullScreenActor_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_FullScreenActor = { "FullScreenActor", &SWIGTYPE_p_FullScreenActor,_wrap_new_FullScreenActor, swig_delete_FullScreenActor, swig_FullScreenActor_methods, swig_FullScreenActor_attributes, { "FullScreenActor", swig_FullScreenActor_cls_methods, swig_FullScreenActor_cls_attributes, swig_FullScreenActor_cls_constants }, swig_FullScreenActor_bases, swig_FullScreenActor_base_names };

static int _wrap_HUDActor_GetClassName(lua_State* L) {
  int SWIG_arg = 0;
  HUDActor *arg1 = (HUDActor *) 0 ;
  String result;
  
  SWIG_check_num_args("HUDActor::GetClassName",1,1)
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("HUDActor::GetClassName",1,"HUDActor const *");
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_HUDActor,0))){
    SWIG_fail_ptr("HUDActor_GetClassName",1,SWIGTYPE_p_HUDActor);
  }
  
  result = ((HUDActor const *)arg1)->GetClassName();
  lua_pushlstring(L,(&result)->data(),(&result)->size()); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_new_HUDActor(lua_State* L) {
  int SWIG_arg = 0;
  HUDActor *result = 0 ;
  
  SWIG_check_num_args("HUDActor::HUDActor",0,0)
  result = (HUDActor *)new HUDActor();
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_HUDActor,1); SWIG_arg++; 
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static void swig_delete_HUDActor(void *obj) {
HUDActor *arg1 = (HUDActor *) obj;
delete arg1;
}
static swig_lua_method swig_HUDActor_methods[] = {
    {"GetClassName", _wrap_HUDActor_GetClassName}, 
    {0,0}
};
static swig_lua_attribute swig_HUDActor_attributes[] = {
    {0,0,0}
};
static swig_lua_attribute swig_HUDActor_cls_attributes[] = {
    {0,0,0}
};
static swig_lua_method swig_HUDActor_cls_methods[] = {
    {0,0}
};
static swig_lua_const_info swig_HUDActor_cls_constants[] = {
    {0,0,0,0,0,0}
};
static swig_lua_class *swig_HUDActor_bases[] = {0,0};
static const char *swig_HUDActor_base_names[] = {"Actor *",0};
static swig_lua_class _wrap_class_HUDActor = { "HUDActor", &SWIGTYPE_p_HUDActor,_wrap_new_HUDActor, swig_delete_HUDActor, swig_HUDActor_methods, swig_HUDActor_attributes, { "HUDActor", swig_HUDActor_cls_methods, swig_HUDActor_cls_attributes, swig_HUDActor_cls_constants }, swig_HUDActor_bases, swig_HUDActor_base_names };

static int _wrap_FlushTextureCache(lua_State* L) {
  int SWIG_arg = 0;
  
  SWIG_check_num_args("FlushTextureCache",0,0)
  FlushTextureCache();
  
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GetTextureReference__SWIG_0(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  bool arg2 ;
  String temp1 ;
  int result;
  
  SWIG_check_num_args("GetTextureReference",2,2)
  if(!lua_isstring(L,1)) SWIG_fail_arg("GetTextureReference",1,"String const &");
  if(!lua_isboolean(L,2)) SWIG_fail_arg("GetTextureReference",2,"bool");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  arg2 = (lua_toboolean(L, 2)!=0);
  result = (int)GetTextureReference((std::string const &)*arg1,arg2);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GetTextureReference__SWIG_1(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  String temp1 ;
  int result;
  
  SWIG_check_num_args("GetTextureReference",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("GetTextureReference",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  result = (int)GetTextureReference((std::string const &)*arg1);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GetTextureReference__SWIG_2(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  GLint arg2 ;
  GLint arg3 ;
  bool arg4 ;
  String temp1 ;
  GLint *argp2 ;
  GLint *argp3 ;
  int result;
  
  SWIG_check_num_args("GetTextureReference",4,4)
  if(!lua_isstring(L,1)) SWIG_fail_arg("GetTextureReference",1,"String const &");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("GetTextureReference",2,"GLint");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("GetTextureReference",3,"GLint");
  if(!lua_isboolean(L,4)) SWIG_fail_arg("GetTextureReference",4,"bool");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("GetTextureReference",2,SWIGTYPE_p_GLint);
  }
  arg2 = *argp2;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("GetTextureReference",3,SWIGTYPE_p_GLint);
  }
  arg3 = *argp3;
  
  arg4 = (lua_toboolean(L, 4)!=0);
  result = (int)GetTextureReference((std::string const &)*arg1,arg2,arg3,arg4);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GetTextureReference__SWIG_3(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  GLint arg2 ;
  GLint arg3 ;
  String temp1 ;
  GLint *argp2 ;
  GLint *argp3 ;
  int result;
  
  SWIG_check_num_args("GetTextureReference",3,3)
  if(!lua_isstring(L,1)) SWIG_fail_arg("GetTextureReference",1,"String const &");
  if(!lua_isuserdata(L,2)) SWIG_fail_arg("GetTextureReference",2,"GLint");
  if(!lua_isuserdata(L,3)) SWIG_fail_arg("GetTextureReference",3,"GLint");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("GetTextureReference",2,SWIGTYPE_p_GLint);
  }
  arg2 = *argp2;
  
  
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_GLint,0))){
    SWIG_fail_ptr("GetTextureReference",3,SWIGTYPE_p_GLint);
  }
  arg3 = *argp3;
  
  result = (int)GetTextureReference((std::string const &)*arg1,arg2,arg3);
  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_GetTextureReference(lua_State* L) {
  int argc;
  int argv[5]={
    1,2,3,4,5
  };
  
  argc = lua_gettop(L);
  if (argc == 1) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      return _wrap_GetTextureReference__SWIG_1(L);
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        _v = lua_isboolean(L,argv[1]);
      }
      if (_v) {
        return _wrap_GetTextureReference__SWIG_0(L);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          return _wrap_GetTextureReference__SWIG_3(L);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = lua_isstring(L,argv[0]);
    }
    if (_v) {
      {
        void *ptr;
        if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
          _v = 0;
        } else {
          _v = 1;
        }
      }
      if (_v) {
        {
          void *ptr;
          if (lua_isuserdata(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_GLint, 0)) {
            _v = 0;
          } else {
            _v = 1;
          }
        }
        if (_v) {
          {
            _v = lua_isboolean(L,argv[3]);
          }
          if (_v) {
            return _wrap_GetTextureReference__SWIG_2(L);
          }
        }
      }
    }
  }
  
  SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'GetTextureReference'\n"
    "  Possible C/C++ prototypes are:\n"
    "    GetTextureReference(String const &,bool)\n"
    "    GetTextureReference(String const &)\n"
    "    GetTextureReference(String const &,GLint,GLint,bool)\n"
    "    GetTextureReference(String const &,GLint,GLint)\n");
  lua_error(L);return 0;
}


static int _wrap_GetTextureSize(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  String temp1 ;
  Vec2i result;
  
  SWIG_check_num_args("GetTextureSize",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("GetTextureSize",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  result = GetTextureSize((std::string const &)*arg1);
  {
    Vec2i * resultptr = new Vec2i((const Vec2i &) result);
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_Vec2i,1); SWIG_arg++;
  }
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


static int _wrap_PurgeTexture(lua_State* L) {
  int SWIG_arg = 0;
  String *arg1 = 0 ;
  String temp1 ;
  bool result;
  
  SWIG_check_num_args("PurgeTexture",1,1)
  if(!lua_isstring(L,1)) SWIG_fail_arg("PurgeTexture",1,"String const &");
  temp1.assign(lua_tostring(L,1),lua_rawlen(L,1)); arg1=&temp1;
  result = (bool)PurgeTexture((std::string const &)*arg1);
  lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
  return SWIG_arg;
  
  if(0) SWIG_fail;
  
fail:
  lua_error(L);
  return SWIG_arg;
}


#ifdef __cplusplus
}
#endif

static const struct luaL_Reg swig_commands[] = {
    { "Vector2_Distance", _wrap_Vector2_Distance},
    { "Vector2_DistanceSquared", _wrap_Vector2_DistanceSquared},
    { "Vector2_Dot", _wrap_Vector2_Dot},
    { "Vector2_Reflect", _wrap_Vector2_Reflect},
    { "Vector2_Min", _wrap_Vector2_Min},
    { "Vector2_Max", _wrap_Vector2_Max},
    { "Vector2_Clamp", _wrap_Vector2_Clamp},
    { "Vector2_Lerp", _wrap_Vector2_Lerp},
    { "Vector2_Negate", _wrap_Vector2_Negate},
    { "Vector2_Rotate", _wrap_Vector2_Rotate},
    { "Vector3_Distance", _wrap_Vector3_Distance},
    { "Vector3_DistanceSquared", _wrap_Vector3_DistanceSquared},
    { "Vector3_Dot", _wrap_Vector3_Dot},
    { "Vector3_Reflect", _wrap_Vector3_Reflect},
    { "Vector3_Min", _wrap_Vector3_Min},
    { "Vector3_Max", _wrap_Vector3_Max},
    { "Vector3_Clamp", _wrap_Vector3_Clamp},
    { "Vector3_Lerp", _wrap_Vector3_Lerp},
    { "Vector3_Negate", _wrap_Vector3_Negate},
    { "Color_FromInts",_wrap_Color_FromInts},
    { "Color_FromHexString", _wrap_Color_FromHexString},
    { "Switchboard_GetInstance", _wrap_Switchboard_GetInstance},
    { "MathUtil_ToDegrees", _wrap_MathUtil_ToDegrees},
    { "MathUtil_ToRadians", _wrap_MathUtil_ToRadians},
    { "MathUtil_VectorFromAngle", _wrap_MathUtil_VectorFromAngle},
    { "MathUtil_AngleFromVector", _wrap_MathUtil_AngleFromVector},
    { "MathUtil_AngleFromVectors", _wrap_MathUtil_AngleFromVectors},
    { "MathUtil_RoundToInt", _wrap_MathUtil_RoundToInt},
    { "MathUtil_RandomInt", _wrap_MathUtil_RandomInt},
    { "MathUtil_RandomIntInRange", _wrap_MathUtil_RandomIntInRange},
    { "MathUtil_RandomIntWithError", _wrap_MathUtil_RandomIntWithError},
    { "MathUtil_RandomFloat",_wrap_MathUtil_RandomFloat},
    { "MathUtil_RandomFloatInRange", _wrap_MathUtil_RandomFloatInRange},
    { "MathUtil_RandomFloatWithError", _wrap_MathUtil_RandomFloatWithError},
    { "MathUtil_RandomBool", _wrap_MathUtil_RandomBool},
    { "MathUtil_RandomVector",_wrap_MathUtil_RandomVector},
    { "MathUtil_RandomPointField",_wrap_MathUtil_RandomPointField},
    { "MathUtil_FuzzyEquals",_wrap_MathUtil_FuzzyEquals},
    { "MathUtil_ScreenToWorld",_wrap_MathUtil_ScreenToWorld},
    { "MathUtil_WorldToScreen",_wrap_MathUtil_WorldToScreen},
    { "MathUtil_GetWorldDimensions", _wrap_MathUtil_GetWorldDimensions},
    { "MathUtil_PixelsToWorldUnits", _wrap_MathUtil_PixelsToWorldUnits},
    { "MathUtil_WorldUnitsToPixels", _wrap_MathUtil_WorldUnitsToPixels},
    { "MathUtil_DeltaAngle", _wrap_MathUtil_DeltaAngle},
    { "MathUtil_VectorDeltaAngle", _wrap_MathUtil_VectorDeltaAngle},
    { "World_GetInstance", _wrap_World_GetInstance},
    { "FileLog_MakeLogFileName", _wrap_FileLog_MakeLogFileName},
    { "CompoundLog_GetSystemLog", _wrap_CompoundLog_GetSystemLog},
    { "Tuning_GetInstance", _wrap_Tuning_GetInstance},
    { "Preferences_GetInstance", _wrap_Preferences_GetInstance},
    { "SoundDevice_GetInstance", _wrap_SoundDevice_GetInstance},
    { "LuaWrite", _wrap_LuaWrite},
    { "ControllerManager_GetInstance", _wrap_ControllerManager_GetInstance},
    { "TouchListener_GetTouchList", _wrap_TouchListener_GetTouchList},
    { "Accelerometer_GetInstance", _wrap_Accelerometer_GetInstance},
    { "Actor_GetNamed", _wrap_Actor_GetNamed},
    { "Actor_SetScriptCreatedActor", _wrap_Actor_SetScriptCreatedActor},
    { "TagCollection_GetInstance", _wrap_TagCollection_GetInstance},
    { "Camera_GetInstance", _wrap_Camera_GetInstance},
    { "FlushTextureCache", _wrap_FlushTextureCache},
    { "GetTextureReference",_wrap_GetTextureReference},
    { "GetTextureSize", _wrap_GetTextureSize},
    { "PurgeTexture", _wrap_PurgeTexture},
    {0,0}
};

static swig_lua_var_info swig_variables[] = {
    { "Vector2_Zero", _wrap_Vector2_Zero_get, _wrap_Vector2_Zero_set },
    { "Vector2_One", _wrap_Vector2_One_get, _wrap_Vector2_One_set },
    { "Vector2_UnitX", _wrap_Vector2_UnitX_get, _wrap_Vector2_UnitX_set },
    { "Vector2_UnitY", _wrap_Vector2_UnitY_get, _wrap_Vector2_UnitY_set },
    { "Vector3_Zero", _wrap_Vector3_Zero_get, _wrap_Vector3_Zero_set },
    { "Vector3_One", _wrap_Vector3_One_get, _wrap_Vector3_One_set },
    { "Vector3_UnitX", _wrap_Vector3_UnitX_get, _wrap_Vector3_UnitX_set },
    { "Vector3_UnitY", _wrap_Vector3_UnitY_get, _wrap_Vector3_UnitY_set },
    { "Vector3_UnitZ", _wrap_Vector3_UnitZ_get, _wrap_Vector3_UnitZ_set },
    { "MathUtil_E", _wrap_MathUtil_E_get, SWIG_Lua_set_immutable },
    { "MathUtil_Log10E", _wrap_MathUtil_Log10E_get, SWIG_Lua_set_immutable },
    { "MathUtil_Log2E", _wrap_MathUtil_Log2E_get, SWIG_Lua_set_immutable },
    { "MathUtil_Pi", _wrap_MathUtil_Pi_get, SWIG_Lua_set_immutable },
    { "MathUtil_PiOver2", _wrap_MathUtil_PiOver2_get, SWIG_Lua_set_immutable },
    { "MathUtil_PiOver4", _wrap_MathUtil_PiOver4_get, SWIG_Lua_set_immutable },
    { "MathUtil_TwoPi", _wrap_MathUtil_TwoPi_get, SWIG_Lua_set_immutable },
    { "MathUtil_MaxFloat", _wrap_MathUtil_MaxFloat_get, SWIG_Lua_set_immutable },
    { "MathUtil_MinFloat", _wrap_MathUtil_MinFloat_get, SWIG_Lua_set_immutable },
    { "MathUtil_Epsilon", _wrap_MathUtil_Epsilon_get, SWIG_Lua_set_immutable },
    {0,0,0}
};

static swig_lua_const_info swig_constants[] = {
    {SWIG_LUA_CONSTTAB_INT("MOUSE_LEFT", MOUSE_LEFT)},
    {SWIG_LUA_CONSTTAB_INT("MOUSE_MIDDLE", MOUSE_MIDDLE)},
    {SWIG_LUA_CONSTTAB_INT("MOUSE_RIGHT", MOUSE_RIGHT)},
    {SWIG_LUA_CONSTTAB_INT("TOUCH_START", TOUCH_START)},
    {SWIG_LUA_CONSTTAB_INT("TOUCH_END", TOUCH_END)},
    {SWIG_LUA_CONSTTAB_INT("TOUCH_MOVE", TOUCH_MOVE)},
    {SWIG_LUA_CONSTTAB_INT("SAT_None", SAT_None)},
    {SWIG_LUA_CONSTTAB_INT("SAT_Loop", SAT_Loop)},
    {SWIG_LUA_CONSTTAB_INT("SAT_PingPong", SAT_PingPong)},
    {SWIG_LUA_CONSTTAB_INT("SAT_OneShot", SAT_OneShot)},
    {SWIG_LUA_CONSTTAB_INT("ADS_Square", ADS_Square)},
    {SWIG_LUA_CONSTTAB_INT("ADS_Circle", ADS_Circle)},
    {SWIG_LUA_CONSTTAB_INT("PhysicsActor_SHAPETYPE_BOX", PhysicsActor::SHAPETYPE_BOX)},
    {SWIG_LUA_CONSTTAB_INT("PhysicsActor_SHAPETYPE_CIRCLE", PhysicsActor::SHAPETYPE_CIRCLE)},
    {SWIG_LUA_CONSTTAB_INT("TXT_Left", TXT_Left)},
    {SWIG_LUA_CONSTTAB_INT("TXT_Center", TXT_Center)},
    {SWIG_LUA_CONSTTAB_INT("TXT_Right", TXT_Right)},
    {0,0,0,0,0,0}
};

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_TextActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((TextActor *) x));
}
static void *_p_ActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *)  ((Actor *) x));
}
static void *_p_FullScreenActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((FullScreenActor *) x));
}
static void *_p_GridActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *)  ((GridActor *) x));
}
static void *_p_HUDActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((HUDActor *) x));
}
static void *_p_PhysicsActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((PhysicsActor *) x));
}
static void *_p_CameraTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((Camera *) x));
}
static void *_p_ParticleActorTo_p_Renderable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Renderable *) (Actor *) ((ParticleActor *) x));
}
static void *_p_CompoundLogTo_p_DeveloperLog(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DeveloperLog *)  ((CompoundLog *) x));
}
static void *_p_ConsoleLogTo_p_DeveloperLog(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DeveloperLog *)  ((ConsoleLog *) x));
}
static void *_p_FileLogTo_p_DeveloperLog(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DeveloperLog *)  ((FileLog *) x));
}
static void *_p_SystemLogTo_p_DeveloperLog(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DeveloperLog *)  ((SystemLog *) x));
}
static void *_p_TextActorTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((TextActor *) x));
}
static void *_p_FullScreenActorTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((FullScreenActor *) x));
}
static void *_p_HUDActorTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((HUDActor *) x));
}
static void *_p_PhysicsActorTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((PhysicsActor *) x));
}
static void *_p_CameraTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((Camera *) x));
}
static void *_p_ParticleActorTo_p_Actor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Actor *)  ((ParticleActor *) x));
}
static void *_p_TypedMessageT_Vector2_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vector2 > *) x));
}
static void *_p_TypedMessageT_Vec3ui_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vec3ui > *) x));
}
static void *_p_TypedMessageT_float_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< float > *) x));
}
static void *_p_TypedMessageT_Vector3_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vector3 > *) x));
}
static void *_p_TypedMessageT_Vec2ui_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vec2ui > *) x));
}
static void *_p_TypedMessageT_int_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< int > *) x));
}
static void *_p_TypedMessageT_Vec2i_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vec2i > *) x));
}
static void *_p_TypedMessageT_std__string_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< std::string > *) x));
}
static void *_p_TypedMessageT_Vec3i_tTo_p_Message(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Message *)  ((TypedMessage< Vec3i > *) x));
}
static void *_p_TextActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((TextActor *) x));
}
static void *_p_ActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *)  ((Actor *) x));
}
static void *_p_FullScreenActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((FullScreenActor *) x));
}
static void *_p_HUDActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((HUDActor *) x));
}
static void *_p_PhysicsActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((PhysicsActor *) x));
}
static void *_p_CameraTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((Camera *) x));
}
static void *_p_ParticleActorTo_p_MessageListener(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MessageListener *) (Actor *) ((ParticleActor *) x));
}
static swig_type_info _swigt__p_Accelerometer = {"_p_Accelerometer", "Accelerometer *", 0, 0, (void*)&_wrap_class_Accelerometer, 0};
static swig_type_info _swigt__p_Actor = {"_p_Actor", "Actor *", 0, 0, (void*)&_wrap_class_Actor, 0};
static swig_type_info _swigt__p_AngelSampleHandle = {"_p_AngelSampleHandle", "AngelSampleHandle *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_AngelSoundHandle = {"_p_AngelSoundHandle", "AngelSoundHandle *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Camera = {"_p_Camera", "Camera *", 0, 0, (void*)&_wrap_class_Camera, 0};
static swig_type_info _swigt__p_Color = {"_p_Color", "Color *", 0, 0, (void*)&_wrap_class_Color, 0};
static swig_type_info _swigt__p_CompoundLog = {"_p_CompoundLog", "CompoundLog *", 0, 0, (void*)&_wrap_class_CompoundLog, 0};
static swig_type_info _swigt__p_Console = {"_p_Console", "Console *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ConsoleLog = {"_p_ConsoleLog", "ConsoleLog *", 0, 0, (void*)&_wrap_class_ConsoleLog, 0};
static swig_type_info _swigt__p_Controller = {"_p_Controller", "Controller *", 0, 0, (void*)&_wrap_class_Controller, 0};
static swig_type_info _swigt__p_ControllerInput = {"_p_ControllerInput", "ControllerInput *", 0, 0, (void*)&_wrap_class_ControllerInput, 0};
static swig_type_info _swigt__p_ControllerManager = {"_p_ControllerManager", "ControllerManager *", 0, 0, (void*)&_wrap_class_ControllerManager, 0};
static swig_type_info _swigt__p_DeveloperLog = {"_p_DeveloperLog", "DeveloperLog *", 0, 0, (void*)&_wrap_class_DeveloperLog, 0};
static swig_type_info _swigt__p_FileLog = {"_p_FileLog", "FileLog *", 0, 0, (void*)&_wrap_class_FileLog, 0};
static swig_type_info _swigt__p_FullScreenActor = {"_p_FullScreenActor", "FullScreenActor *", 0, 0, (void*)&_wrap_class_FullScreenActor, 0};
static swig_type_info _swigt__p_GLint = {"_p_GLint", "GLint *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GestureData = {"_p_GestureData", "GestureData *", 0, 0, (void*)&_wrap_class_GestureData, 0};
static swig_type_info _swigt__p_GridActor = {"_p_GridActor", "GridActor *", 0, 0, (void*)&_wrap_class_GridActor, 0};
static swig_type_info _swigt__p_HUDActor = {"_p_HUDActor", "HUDActor *", 0, 0, (void*)&_wrap_class_HUDActor, 0};
static swig_type_info _swigt__p_MathUtil = {"_p_MathUtil", "MathUtil *", 0, 0, (void*)&_wrap_class_MathUtil, 0};
static swig_type_info _swigt__p_Message = {"_p_Message", "Message *", 0, 0, (void*)&_wrap_class_Message, 0};
static swig_type_info _swigt__p_MessageListener = {"_p_MessageListener", "MessageListener *", 0, 0, (void*)&_wrap_class_MessageListener, 0};
static swig_type_info _swigt__p_MouseListener = {"_p_MouseListener", "MouseListener *", 0, 0, (void*)&_wrap_class_MouseListener, 0};
static swig_type_info _swigt__p_ParticleActor = {"_p_ParticleActor", "ParticleActor *", 0, 0, (void*)&_wrap_class_ParticleActor, 0};
static swig_type_info _swigt__p_PhysicsActor = {"_p_PhysicsActor", "PhysicsActor *", 0, 0, (void*)&_wrap_class_PhysicsActor, 0};
static swig_type_info _swigt__p_Preferences = {"_p_Preferences", "Preferences *", 0, 0, (void*)&_wrap_class_Preferences, 0};
static swig_type_info _swigt__p_Renderable = {"_p_Renderable", "Renderable *", 0, 0, (void*)&_wrap_class_Renderable, 0};
static swig_type_info _swigt__p_SoundDevice = {"_p_SoundDevice", "SoundDevice *", 0, 0, (void*)&_wrap_class_SoundDevice, 0};
static swig_type_info _swigt__p_Switchboard = {"_p_Switchboard", "Switchboard *", 0, 0, (void*)&_wrap_class_Switchboard, 0};
static swig_type_info _swigt__p_SystemLog = {"_p_SystemLog", "SystemLog *", 0, 0, (void*)&_wrap_class_SystemLog, 0};
static swig_type_info _swigt__p_TagCollection = {"_p_TagCollection", "TagCollection *", 0, 0, (void*)&_wrap_class_TagCollection, 0};
static swig_type_info _swigt__p_TextActor = {"_p_TextActor", "TextActor *", 0, 0, (void*)&_wrap_class_TextActor, 0};
static swig_type_info _swigt__p_Touch = {"_p_Touch", "Touch *", 0, 0, (void*)&_wrap_class_Touch, 0};
static swig_type_info _swigt__p_TouchListener = {"_p_TouchListener", "TouchListener *", 0, 0, (void*)&_wrap_class_TouchListener, 0};
static swig_type_info _swigt__p_Tuning = {"_p_Tuning", "Tuning *", 0, 0, (void*)&_wrap_class_Tuning, 0};
static swig_type_info _swigt__p_TypedMessageT_Vec2i_t = {"_p_TypedMessageT_Vec2i_t", "TypedMessage< Vec2i > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vec2i_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_Vec2ui_t = {"_p_TypedMessageT_Vec2ui_t", "TypedMessage< Vec2ui > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vec2ui_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_Vec3i_t = {"_p_TypedMessageT_Vec3i_t", "TypedMessage< Vec3i > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vec3i_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_Vec3ui_t = {"_p_TypedMessageT_Vec3ui_t", "TypedMessage< Vec3ui > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vec3ui_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_Vector2_t = {"_p_TypedMessageT_Vector2_t", "TypedMessage< Vector2 > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vector2_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_Vector3_t = {"_p_TypedMessageT_Vector3_t", "TypedMessage< Vector3 > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_Vector3_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_float_t = {"_p_TypedMessageT_float_t", "TypedMessage< float > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_float_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_int_t = {"_p_TypedMessageT_int_t", "TypedMessage< int > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_int_Sg_, 0};
static swig_type_info _swigt__p_TypedMessageT_std__string_t = {"_p_TypedMessageT_std__string_t", "TypedMessage< std::string > *|TypedMessage< String > *", 0, 0, (void*)&_wrap_class_TypedMessage_Sl_String_Sg_, 0};
static swig_type_info _swigt__p_Vec2i = {"_p_Vec2i", "Vec2i *", 0, 0, (void*)&_wrap_class_Vec2i, 0};
static swig_type_info _swigt__p_Vec2ui = {"_p_Vec2ui", "Vec2ui *", 0, 0, (void*)&_wrap_class_Vec2ui, 0};
static swig_type_info _swigt__p_Vec3i = {"_p_Vec3i", "Vec3i *", 0, 0, (void*)&_wrap_class_Vec3i, 0};
static swig_type_info _swigt__p_Vec3ui = {"_p_Vec3ui", "Vec3ui *", 0, 0, (void*)&_wrap_class_Vec3ui, 0};
static swig_type_info _swigt__p_Vector2 = {"_p_Vector2", "Vector2 *", 0, 0, (void*)&_wrap_class_Vector2, 0};
static swig_type_info _swigt__p_Vector2List = {"_p_Vector2List", "Vector2List *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Vector3 = {"_p_Vector3", "Vector3 *", 0, 0, (void*)&_wrap_class_Vector3, 0};
static swig_type_info _swigt__p_World = {"_p_World", "World *", 0, 0, (void*)&_wrap_class_World, 0};
static swig_type_info _swigt__p_std__setT_Actor_p_t = {"_p_std__setT_Actor_p_t", "ActorSet *|std::set< Actor * > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__setT_MessageListener_p_t = {"_p_std__setT_MessageListener_p_t", "std::set< MessageListener * > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__setT_std__string_t = {"_p_std__setT_std__string_t", "std::set< std::string > *|StringSet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *|String *", 0, 0, (void*)&_wrap_class_std_string, 0};
static swig_type_info _swigt__p_std__vectorT_Actor_p_t = {"_p_std__vectorT_Actor_p_t", "ActorList *|std::vector< Actor * > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Touch_p_t = {"_p_std__vectorT_Touch_p_t", "TouchList *|std::vector< Touch * > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Vec3ui_t = {"_p_std__vectorT_Vec3ui_t", "std::vector< Vec3ui > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "std::vector< std::string > *|StringList *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Accelerometer,
  &_swigt__p_Actor,
  &_swigt__p_AngelSampleHandle,
  &_swigt__p_AngelSoundHandle,
  &_swigt__p_Camera,
  &_swigt__p_Color,
  &_swigt__p_CompoundLog,
  &_swigt__p_Console,
  &_swigt__p_ConsoleLog,
  &_swigt__p_Controller,
  &_swigt__p_ControllerInput,
  &_swigt__p_ControllerManager,
  &_swigt__p_DeveloperLog,
  &_swigt__p_FileLog,
  &_swigt__p_FullScreenActor,
  &_swigt__p_GLint,
  &_swigt__p_GestureData,
  &_swigt__p_GridActor,
  &_swigt__p_HUDActor,
  &_swigt__p_MathUtil,
  &_swigt__p_Message,
  &_swigt__p_MessageListener,
  &_swigt__p_MouseListener,
  &_swigt__p_ParticleActor,
  &_swigt__p_PhysicsActor,
  &_swigt__p_Preferences,
  &_swigt__p_Renderable,
  &_swigt__p_SoundDevice,
  &_swigt__p_Switchboard,
  &_swigt__p_SystemLog,
  &_swigt__p_TagCollection,
  &_swigt__p_TextActor,
  &_swigt__p_Touch,
  &_swigt__p_TouchListener,
  &_swigt__p_Tuning,
  &_swigt__p_TypedMessageT_Vec2i_t,
  &_swigt__p_TypedMessageT_Vec2ui_t,
  &_swigt__p_TypedMessageT_Vec3i_t,
  &_swigt__p_TypedMessageT_Vec3ui_t,
  &_swigt__p_TypedMessageT_Vector2_t,
  &_swigt__p_TypedMessageT_Vector3_t,
  &_swigt__p_TypedMessageT_float_t,
  &_swigt__p_TypedMessageT_int_t,
  &_swigt__p_TypedMessageT_std__string_t,
  &_swigt__p_Vec2i,
  &_swigt__p_Vec2ui,
  &_swigt__p_Vec3i,
  &_swigt__p_Vec3ui,
  &_swigt__p_Vector2,
  &_swigt__p_Vector2List,
  &_swigt__p_Vector3,
  &_swigt__p_World,
  &_swigt__p_std__setT_Actor_p_t,
  &_swigt__p_std__setT_MessageListener_p_t,
  &_swigt__p_std__setT_std__string_t,
  &_swigt__p_std__string,
  &_swigt__p_std__vectorT_Actor_p_t,
  &_swigt__p_std__vectorT_Touch_p_t,
  &_swigt__p_std__vectorT_Vec3ui_t,
  &_swigt__p_std__vectorT_std__string_t,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_Accelerometer[] = {  {&_swigt__p_Accelerometer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Actor[] = {  {&_swigt__p_Actor, 0, 0, 0},  {&_swigt__p_TextActor, _p_TextActorTo_p_Actor, 0, 0},  {&_swigt__p_FullScreenActor, _p_FullScreenActorTo_p_Actor, 0, 0},  {&_swigt__p_HUDActor, _p_HUDActorTo_p_Actor, 0, 0},  {&_swigt__p_PhysicsActor, _p_PhysicsActorTo_p_Actor, 0, 0},  {&_swigt__p_ParticleActor, _p_ParticleActorTo_p_Actor, 0, 0},  {&_swigt__p_Camera, _p_CameraTo_p_Actor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AngelSampleHandle[] = {  {&_swigt__p_AngelSampleHandle, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AngelSoundHandle[] = {  {&_swigt__p_AngelSoundHandle, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Camera[] = {  {&_swigt__p_Camera, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Color[] = {  {&_swigt__p_Color, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CompoundLog[] = {  {&_swigt__p_CompoundLog, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Console[] = {  {&_swigt__p_Console, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConsoleLog[] = {  {&_swigt__p_ConsoleLog, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Controller[] = {  {&_swigt__p_Controller, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ControllerInput[] = {  {&_swigt__p_ControllerInput, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ControllerManager[] = {  {&_swigt__p_ControllerManager, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DeveloperLog[] = {  {&_swigt__p_CompoundLog, _p_CompoundLogTo_p_DeveloperLog, 0, 0},  {&_swigt__p_ConsoleLog, _p_ConsoleLogTo_p_DeveloperLog, 0, 0},  {&_swigt__p_DeveloperLog, 0, 0, 0},  {&_swigt__p_FileLog, _p_FileLogTo_p_DeveloperLog, 0, 0},  {&_swigt__p_SystemLog, _p_SystemLogTo_p_DeveloperLog, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FileLog[] = {  {&_swigt__p_FileLog, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FullScreenActor[] = {  {&_swigt__p_FullScreenActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GLint[] = {  {&_swigt__p_GLint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GestureData[] = {  {&_swigt__p_GestureData, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GridActor[] = {  {&_swigt__p_GridActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HUDActor[] = {  {&_swigt__p_HUDActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MathUtil[] = {  {&_swigt__p_MathUtil, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Message[] = {  {&_swigt__p_TypedMessageT_Vec2ui_t, _p_TypedMessageT_Vec2ui_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_Vec2i_t, _p_TypedMessageT_Vec2i_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_std__string_t, _p_TypedMessageT_std__string_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_Vec3i_t, _p_TypedMessageT_Vec3i_tTo_p_Message, 0, 0},  {&_swigt__p_Message, 0, 0, 0},  {&_swigt__p_TypedMessageT_Vector2_t, _p_TypedMessageT_Vector2_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_Vec3ui_t, _p_TypedMessageT_Vec3ui_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_int_t, _p_TypedMessageT_int_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_float_t, _p_TypedMessageT_float_tTo_p_Message, 0, 0},  {&_swigt__p_TypedMessageT_Vector3_t, _p_TypedMessageT_Vector3_tTo_p_Message, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MessageListener[] = {  {&_swigt__p_TextActor, _p_TextActorTo_p_MessageListener, 0, 0},  {&_swigt__p_Actor, _p_ActorTo_p_MessageListener, 0, 0},  {&_swigt__p_FullScreenActor, _p_FullScreenActorTo_p_MessageListener, 0, 0},  {&_swigt__p_HUDActor, _p_HUDActorTo_p_MessageListener, 0, 0},  {&_swigt__p_MessageListener, 0, 0, 0},  {&_swigt__p_PhysicsActor, _p_PhysicsActorTo_p_MessageListener, 0, 0},  {&_swigt__p_ParticleActor, _p_ParticleActorTo_p_MessageListener, 0, 0},  {&_swigt__p_Camera, _p_CameraTo_p_MessageListener, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MouseListener[] = {  {&_swigt__p_MouseListener, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ParticleActor[] = {  {&_swigt__p_ParticleActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PhysicsActor[] = {  {&_swigt__p_PhysicsActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Preferences[] = {  {&_swigt__p_Preferences, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Renderable[] = {  {&_swigt__p_TextActor, _p_TextActorTo_p_Renderable, 0, 0},  {&_swigt__p_Actor, _p_ActorTo_p_Renderable, 0, 0},  {&_swigt__p_FullScreenActor, _p_FullScreenActorTo_p_Renderable, 0, 0},  {&_swigt__p_GridActor, _p_GridActorTo_p_Renderable, 0, 0},  {&_swigt__p_HUDActor, _p_HUDActorTo_p_Renderable, 0, 0},  {&_swigt__p_PhysicsActor, _p_PhysicsActorTo_p_Renderable, 0, 0},  {&_swigt__p_Renderable, 0, 0, 0},  {&_swigt__p_ParticleActor, _p_ParticleActorTo_p_Renderable, 0, 0},  {&_swigt__p_Camera, _p_CameraTo_p_Renderable, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SoundDevice[] = {  {&_swigt__p_SoundDevice, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Switchboard[] = {  {&_swigt__p_Switchboard, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SystemLog[] = {  {&_swigt__p_SystemLog, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TagCollection[] = {  {&_swigt__p_TagCollection, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TextActor[] = {  {&_swigt__p_TextActor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Touch[] = {  {&_swigt__p_Touch, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TouchListener[] = {  {&_swigt__p_TouchListener, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Tuning[] = {  {&_swigt__p_Tuning, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vec2i_t[] = {  {&_swigt__p_TypedMessageT_Vec2i_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vec2ui_t[] = {  {&_swigt__p_TypedMessageT_Vec2ui_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vec3i_t[] = {  {&_swigt__p_TypedMessageT_Vec3i_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vec3ui_t[] = {  {&_swigt__p_TypedMessageT_Vec3ui_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vector2_t[] = {  {&_swigt__p_TypedMessageT_Vector2_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_Vector3_t[] = {  {&_swigt__p_TypedMessageT_Vector3_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_float_t[] = {  {&_swigt__p_TypedMessageT_float_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_int_t[] = {  {&_swigt__p_TypedMessageT_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TypedMessageT_std__string_t[] = {  {&_swigt__p_TypedMessageT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vec2i[] = {  {&_swigt__p_Vec2i, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vec2ui[] = {  {&_swigt__p_Vec2ui, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vec3i[] = {  {&_swigt__p_Vec3i, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vec3ui[] = {  {&_swigt__p_Vec3ui, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vector2[] = {  {&_swigt__p_Vector2, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vector2List[] = {  {&_swigt__p_Vector2List, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Vector3[] = {  {&_swigt__p_Vector3, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_World[] = {  {&_swigt__p_World, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__setT_Actor_p_t[] = {  {&_swigt__p_std__setT_Actor_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__setT_MessageListener_p_t[] = {  {&_swigt__p_std__setT_MessageListener_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__setT_std__string_t[] = {  {&_swigt__p_std__setT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Actor_p_t[] = {  {&_swigt__p_std__vectorT_Actor_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Touch_p_t[] = {  {&_swigt__p_std__vectorT_Touch_p_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Vec3ui_t[] = {  {&_swigt__p_std__vectorT_Vec3ui_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = {  {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Accelerometer,
  _swigc__p_Actor,
  _swigc__p_AngelSampleHandle,
  _swigc__p_AngelSoundHandle,
  _swigc__p_Camera,
  _swigc__p_Color,
  _swigc__p_CompoundLog,
  _swigc__p_Console,
  _swigc__p_ConsoleLog,
  _swigc__p_Controller,
  _swigc__p_ControllerInput,
  _swigc__p_ControllerManager,
  _swigc__p_DeveloperLog,
  _swigc__p_FileLog,
  _swigc__p_FullScreenActor,
  _swigc__p_GLint,
  _swigc__p_GestureData,
  _swigc__p_GridActor,
  _swigc__p_HUDActor,
  _swigc__p_MathUtil,
  _swigc__p_Message,
  _swigc__p_MessageListener,
  _swigc__p_MouseListener,
  _swigc__p_ParticleActor,
  _swigc__p_PhysicsActor,
  _swigc__p_Preferences,
  _swigc__p_Renderable,
  _swigc__p_SoundDevice,
  _swigc__p_Switchboard,
  _swigc__p_SystemLog,
  _swigc__p_TagCollection,
  _swigc__p_TextActor,
  _swigc__p_Touch,
  _swigc__p_TouchListener,
  _swigc__p_Tuning,
  _swigc__p_TypedMessageT_Vec2i_t,
  _swigc__p_TypedMessageT_Vec2ui_t,
  _swigc__p_TypedMessageT_Vec3i_t,
  _swigc__p_TypedMessageT_Vec3ui_t,
  _swigc__p_TypedMessageT_Vector2_t,
  _swigc__p_TypedMessageT_Vector3_t,
  _swigc__p_TypedMessageT_float_t,
  _swigc__p_TypedMessageT_int_t,
  _swigc__p_TypedMessageT_std__string_t,
  _swigc__p_Vec2i,
  _swigc__p_Vec2ui,
  _swigc__p_Vec3i,
  _swigc__p_Vec3ui,
  _swigc__p_Vector2,
  _swigc__p_Vector2List,
  _swigc__p_Vector3,
  _swigc__p_World,
  _swigc__p_std__setT_Actor_p_t,
  _swigc__p_std__setT_MessageListener_p_t,
  _swigc__p_std__setT_std__string_t,
  _swigc__p_std__string,
  _swigc__p_std__vectorT_Actor_p_t,
  _swigc__p_std__vectorT_Touch_p_t,
  _swigc__p_std__vectorT_Vec3ui_t,
  _swigc__p_std__vectorT_std__string_t,
  _swigc__p_void,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpreters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;

#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {

      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif



/* Forward declaration of where the user's %init{} gets inserted */
void SWIG_init_user(lua_State* L );
    
#ifdef __cplusplus
extern "C" {
#endif
/* this is the initialization function
  added at the very end of the code
  the function is always called SWIG_init, but an earlier #define will rename it
*/
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
LUALIB_API int SWIG_init(lua_State* L)
#else
SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
#endif
{
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
  int i;
  /* start with global table */
  lua_pushglobaltable (L);
  /* SWIG's internal initalisation */
  SWIG_InitializeModule((void*)L);
  SWIG_PropagateClientData();
#endif

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
  /* add a global fn */
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
  /* begin the module (its a table with the same name as the module) */
  SWIG_Lua_module_begin(L,SWIG_name);
  /* add commands/functions */
  for (i = 0; swig_commands[i].name; i++){
    SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
  }
  /* add variables */
  for (i = 0; swig_variables[i].name; i++){
    SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
  }
#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* set up base class pointers (the hierarchy) */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
  /* additional registration structs & classes in lua */
  for (i = 0; swig_types[i]; i++){
    if (swig_types[i]->clientdata){
      SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
    }
  }
#endif

#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
  /* constants */
  SWIG_Lua_InstallConstants(L,swig_constants);
#endif

#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
  /* invoke user-specific initialization */
  SWIG_init_user(L);
  /* end module */
  /* Note: We do not clean up the stack here (Lua will do this for us). At this
     point, we have the globals table and out module table on the stack. Returning
     one value makes the module table the result of the require command. */
  return 1;
#else
  return 0;
#endif
}

#ifdef __cplusplus
}
#endif


const char* SWIG_LUACODE=
  "";

void SWIG_init_user(lua_State* L)
{
  /* exec Lua code if applicable */
  SWIG_Lua_dostring(L,SWIG_LUACODE);
}

