Esempio n. 1
0
    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
Esempio n. 2
0
    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)
Esempio n. 3
0
    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")