MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / __init__

Method __init__

dm_control/viewer/gui/glfw_gui.py:109–123  ·  view source on GitHub ↗
(self, context)

Source from the content-addressed store, hash-verified

107 """
108
109 def __init__(self, context):
110 super().__init__()
111 self.on_move = util.QuietSet()
112 self.on_click = util.QuietSet()
113 self.on_double_click = util.QuietSet()
114 self.on_scroll = util.QuietSet()
115 self._double_click_detector = base.DoubleClickDetector()
116 with context.make_current() as ctx:
117 framebuffer_width, window_width = ctx.call(
118 self._glfw_setup, context.window)
119
120 self._scale = framebuffer_width * 1.0 / window_width
121 self._last_mouse_pos = np.zeros(2, int)
122
123 self._double_clicks = {}
124
125 def _glfw_setup(self, window):
126 glfw.set_cursor_pos_callback(window, self._handle_move)

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

make_currentMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected