Exemplo n.º 1
0
    def __init__(self, verbose=True):
        """
        Wrapper around pyopenvr to allow it to work with Panda3D.
        See the init() method below for the actual initialization.

        * verbose specifies if the library prints status information when running.
        """

        self.vr_system = None
        self.verbose = verbose
        self.vr_input = None
        self.compositor = None
        self.poses = None
        self.action_url = None
        self.action_path = None
        self.action_set_handle = None
        self.buffers = []
        self.nextsort = base.win.getSort() - 1000
        self.tracking_space = None
        self.hmd_anchor = None
        self.left_eye_anchor = None
        self.right_eye_anchor = None
        self.left_cam = None
        self.right_cam = None
        self.tracked_devices_anchors = {}
        self.empty_world = None
        self.coord_mat = LMatrix4.convert_mat(CS_yup_right, CS_default)
        self.coord_mat_inv = LMatrix4.convert_mat(CS_default, CS_yup_right)
        self.submit_together = True
Exemplo n.º 2
0
    def __init__(self, base=None, verbose=True):
        """
        Wrapper around pyopenvr to allow it to work with Panda3D.
        See the init() method below for the actual initialization.

        * verbose specifies if the library prints status information when running.
        """

        if base is None:
            base = __builtins__.get('base')
        self.base = base
        self.verbose = verbose
        self.vr_system = None
        self.vr_applications = None
        self.vr_input = None
        self.compositor = None
        self.poses = None
        self.action_set_handles = []
        self.buffers = []
        self.nextsort = self.base.win.getSort() - 1000
        self.tracking_space = None
        self.hmd_anchor = None
        self.left_eye_anchor = None
        self.right_eye_anchor = None
        self.left_cam = None
        self.right_cam = None
        self.ham_shader = None
        self.tracked_devices_anchors = {}
        self.empty_world = None
        self.coord_mat = LMatrix4.convert_mat(CS_yup_right, CS_default)
        self.coord_mat_inv = LMatrix4.convert_mat(CS_default, CS_yup_right)
        self.submit_together = True
        self.event_handlers = []
        self.submit_error_handler = None
        self.new_tracked_device_handler = None
        self.has_focus = False

        #Deprecation flags to avoid spamming
        self.process_vr_event_notified = False
        self.new_tracked_device_notified = False
        self.update_action_notified = False
        self.on_texture_submit_error_notified = False
Exemplo n.º 3
0
 def __init__(self):
     self.vr_system = None
     self.vr_input = None
     self.compositor = None
     self.poses = None
     self.action_url = None
     self.action_path = None
     self.action_set_handle = None
     self.buffers = []
     self.nextsort = base.win.getSort() - 1000
     self.tracking_space = None
     self.hmd_anchor = None
     self.left_eye_anchor = None
     self.right_eye_anchor = None
     self.left_cam = None
     self.right_cam = None
     self.tracked_devices_anchors = {}
     self.empty_world = None
     self.coord_mat = LMatrix4.convert_mat(CS_yup_right, CS_default)
     self.coord_mat_inv = LMatrix4.convert_mat(CS_default, CS_yup_right)