def __init__(self): CairoDrawingArea.__init__(self) self.inhabitants = [] # set up physics engine #self.ode = ode.World() #self.ode.setGravity( (0,0.1,0) ) #self.ode.setERP(0.8) # ? #self.ode.setCFM(1E-5) # ? #self.ode_space = ode.Space(type=1) # hashspace #self.ode_floor = ode.GeomPlane(self.ode_space, (0, -1, 0), -1.0) #self.ode_wall_right = ode.GeomPlane(self.ode_space, (-1, 0, 0), -1.0) #self.ode_wall_left = ode.GeomPlane(self.ode_space, (1, 0, 0), -1.0) #self.ode_celing = ode.GeomPlane(self.ode_space, (0, 1, 0), -1.0) #self.ode_contactgroup = ode.JointGroup() self.show_grid = True self.focus = None # TODO Abstract into generic Input object self.paused = False TheMouse.set_world(self)
def do_button_release_event(self, event): TheMouse.do_button_release_event(self.context, event)
def do_motion_notify_event(self, event): TheMouse.do_motion_notify_event(self.context, event)
def do_button_press_event(self, event): TheMouse.do_button_press_event(self, self.context, event)