def __init__(self, media_id, scene): """Create a new MediaObject from the media identified by `media_id`, and the parent Scene referenced by `scene`.""" PhysicalObject.__init__(self) self._media_id = media_id self._scene = scene
def step(self, t): """Step the scene and all contained `MediaObject`s forward `t` seconds in time. step(float) -> None """ with self.__objects_lock: for mediaobject in self.__objects: mediaobject.step(t) PhysicalObject.step(self, t)
def __init__(self): """Create a new scene.""" PhysicalObject.__init__(self) self.__objects = [] self.__objects_lock = RLock() self.__viewport_size = self.standard_viewport_size self.selection = None self.__logger = logging.getLogger("Scene")