- Leap Motion & the Disappearing User Interface
- The Leap controls your computer with a flick of a finger
- Leap Motion is an incredible motion controlling device
- World's Most Accurate 3-D Motion Control Technology for Computing
-
- Leap Motion
- Python & Leap & 3D
- Controller.frame()
- Listener.on_frame()
__builtin__.base = self
__builtin__.render2d = self.render2d
__builtin__.aspect2d = self.aspect2d
__builtin__.pixel2d = self.pixel2d
__builtin__.render = self.render
__builtin__.hidden = self.hidden
__builtin__.camera = self.camera
__builtin__.loader = self.loader
__builtin__.taskMgr = self.taskMgr
__builtin__.jobMgr = self.jobMgr
__builtin__.eventMgr = self.eventMgr
__builtin__.messenger = self.messenger
__builtin__.bboard = self.bboard
__builtin__.run = self.run
__builtin__.ostream = Notify.out()
__builtin__.directNotify = directNotify
__builtin__.giveNotify = giveNotify
__builtin__.globalClock = globalClock
__builtin__.vfs = vfs
__builtin__.cpMgr = ConfigPageManager.getGlobalPtr()
__builtin__.cvMgr = ConfigVariableManager.getGlobalPtr()
__builtin__.pandaSystem = PandaSystem.getGlobalPtr()
__builtin__.wantUberdog = base.config.GetBool('want-uberdog', 1)
if __debug__:
__builtin__.deltaProfiler = DeltaProfiler.DeltaProfiler("ShowBase")
__builtin__.onScreenDebug = OnScreenDebug.OnScreenDebug()
if self.wantRender2dp:
__builtin__.render2dp = self.render2dp
__builtin__.aspect2dp = self.aspect2dp
__builtin__.pixel2dp = self.pixel2dp
__builtin__.hidden = self.hidden
__builtin__.camera = self.camera
__builtin__.loader = self.loader
__builtin__.taskMgr = self.taskMgr
__builtin__.jobMgr = self.jobMgr
__builtin__.messenger = self.messenger
__builtin__.bboard = self.bboard
__builtin__.run = self.run
__builtin__.cpMgr = ConfigPageManager.getGlobalPtr()
__builtin__.cvMgr = ConfigVariableManager.getGlobalPtr()
__builtin__.wantUberdog = base.config.GetBool('want-uberdog', 1)
__builtin__.myApp = self
__builtin__.myObjectManager = ObjectManager()
__builtin__.myGui = MyGui()
__builtin__.myCamera = MyCamera()
__builtin__.myInputHandler = InputHandler()
__builtin__.render = self.render
__builtin__.render2d = self.render2d
__builtin__.aspect2d = self.aspect2d
__builtin__.pixel2d = self.pixel2d
m = loader.loadModel("mymodel.egg")
m.reparentTo(render)
self.buttonThrowers = []
for i in range(win.getNumInputDevices()):
name = win.getInputDeviceName(i)
mk = base.dataRoot.attachNewNode(MouseAndKeyboard(win, i, name))
mw = mk.attachNewNode(MouseWatcher(name))
bt = mw.attachNewNode(ButtonThrower(name))
if i != 0: bt.node().setPrefix('mousedev'+str(i)+'-')
mods = ModifierButtons()
bt.node().setModifierButtons(mods)
self.buttonThrowers.append(bt)
self.mouseWatcher = self.buttonThrowers[0].getParent()
self.mouseWatcherNode = self.mouseWatcher.node()
theTorus = glGenLists (1);
glNewList(theTorus, GL_COMPILE);
glVertex3f(...);
glNormal3f(...);
...
glEndList();
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_QUADS);
glCallList(theTorus);
glEnd(GL_QUADS);
...
glBegin(GL_QUADS);
glColor3f(2.0, 2.0, 2.0);
glCallList(theTorus);
glEnd(GL_QUADS);
b = Batch()
theTorus = b.add(8, GL_QUADS, ColorGroup(1.0, 1.0, 1.0),
('v3f', (v for v in ...)),
('n3f', (n for n in ...)))
theTorus.vertices[:] = (v for v in ...)
theTorus.normals[:] = (v for v in ...)
theTorus.delete()
GC
- unpredictable
- FPS drop
- optional (not with ctypes)
ctypes.cast((ctypes.u_uint*2)(),
ctypes.c_void_p)