# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.3
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('LeapPython', [dirname(__file__)])
except ImportError:
import LeapPython
return LeapPython
if fp is not None:
try:
_mod = imp.load_module('LeapPython', fp, pathname, description)
finally:
fp.close()
return _mod
LeapPython = swig_import_helper()
del swig_import_helper
else:
import LeapPython
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
object.__setattr__(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
try:
import weakref
weakref_proxy = weakref.proxy
except:
weakref_proxy = lambda x: x
class SwigPyIterator(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = LeapPython.delete_SwigPyIterator
__del__ = lambda self: None
def value(self):
return LeapPython.SwigPyIterator_value(self)
def incr(self, n=1):
return LeapPython.SwigPyIterator_incr(self, n)
def decr(self, n=1):
return LeapPython.SwigPyIterator_decr(self, n)
def distance(self, x):
return LeapPython.SwigPyIterator_distance(self, x)
def equal(self, x):
return LeapPython.SwigPyIterator_equal(self, x)
def copy(self):
return LeapPython.SwigPyIterator_copy(self)
def next(self):
return LeapPython.SwigPyIterator_next(self)
def __next__(self):
return LeapPython.SwigPyIterator___next__(self)
def previous(self):
return LeapPython.SwigPyIterator_previous(self)
def advance(self, n):
return LeapPython.SwigPyIterator_advance(self, n)
def __eq__(self, x):
return LeapPython.SwigPyIterator___eq__(self, x)
def __ne__(self, x):
return LeapPython.SwigPyIterator___ne__(self, x)
def __iadd__(self, n):
return LeapPython.SwigPyIterator___iadd__(self, n)
def __isub__(self, n):
return LeapPython.SwigPyIterator___isub__(self, n)
def __add__(self, n):
return LeapPython.SwigPyIterator___add__(self, n)
def __sub__(self, *args):
return LeapPython.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
SwigPyIterator_swigregister = LeapPython.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
class byte_array(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, byte_array, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, byte_array, name)
__repr__ = _swig_repr
def __init__(self, nelements):
this = LeapPython.new_byte_array(nelements)
try:
self.this.append(this)
except:
self.this = this
__swig_destroy__ = LeapPython.delete_byte_array
__del__ = lambda self: None
def __getitem__(self, index):
return LeapPython.byte_array___getitem__(self, index)
def __setitem__(self, index, value):
return LeapPython.byte_array___setitem__(self, index, value)
def cast(self):
return LeapPython.byte_array_cast(self)
__swig_getmethods__["frompointer"] = lambda x: LeapPython.byte_array_frompointer
if _newclass:
frompointer = staticmethod(LeapPython.byte_array_frompointer)
byte_array_swigregister = LeapPython.byte_array_swigregister
byte_array_swigregister(byte_array)
def byte_array_frompointer(t):
return LeapPython.byte_array_frompointer(t)
byte_array_frompointer = LeapPython.byte_array_frompointer
class float_array(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, float_array, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, float_array, name)
__repr__ = _swig_repr
def __init__(self, nelements):
this = LeapPython.new_float_array(nelements)
try:
self.this.append(this)
except:
self.this = this
__swig_destroy__ = LeapPython.delete_float_array
__del__ = lambda self: None
def __getitem__(self, index):
return LeapPython.float_array___getitem__(self, index)
def __setitem__(self, index, value):
return LeapPython.float_array___setitem__(self, index, value)
def cast(self):
return LeapPython.float_array_cast(self)
__swig_getmethods__["frompointer"] = lambda x: LeapPython.float_array_frompointer
if _newclass:
frompointer = staticmethod(LeapPython.float_array_frompointer)
float_array_swigregister = LeapPython.float_array_swigregister
float_array_swigregister(float_array)
def float_array_frompointer(t):
return LeapPython.float_array_frompointer(t)
float_array_frompointer = LeapPython.float_array_frompointer
class Vector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Vector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Vector, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = LeapPython.new_Vector(*args)
try:
self.this.append(this)
except:
self.this = this
def distance_to(self, other):
return LeapPython.Vector_distance_to(self, other)
def angle_to(self, other):
return LeapPython.Vector_angle_to(self, other)
def dot(self, other):
return LeapPython.Vector_dot(self, other)
def cross(self, other):
return LeapPython.Vector_cross(self, other)
def __neg__(self):
return LeapPython.Vector___neg__(self)
def __add__(self, other):
return LeapPython.Vector___add__(self, other)
def __sub__(self, other):
return LeapPython.Vector___sub__(self, other)
def __mul__(self, scalar):
return LeapPy
评论6