User Tools

Site Tools


keckcaves:wii_mote

Wiimote Fragments

The Wiimote requires multiple fragments: one to set up the low-level device, and one or more to specify button assignments. When there are multiple button assignments, the user can select the one they want for a given task.

Device Definition Fragment

VruiConfigurationFragmentType Device

section Vrui
    section "*"
        inputDeviceAdapterNames (DeviceDaemonAdapter)

        section DeviceDaemonAdapter
            inputDeviceNames (Wiimote)

            # Settings for Wiimote
            section Wiimote
                name Wiimote
                trackType 6D
                trackerIndex 1
                numButtons 11
                buttonIndexBase 0
                numValuators 0
                valuatorIndexBase 0
                deviceGlyphType Cone
            endsection
        endsection
    endsection
endsection

Button Definition Fragment

VruiConfigurationFragmentType Tool

section Vrui
    section "*"
        tools VruiConfigTools

        section VruiConfigTools
            toolNames (WiimoteNav,WiiMenuTool,WiiScreenMenuTool)

            section WiimoteNav
              toolClass WandNavigationTool
              deviceName0 Wiimote
              device0ButtonIndex0 5
              device0ButtonIndex1 4
            endsection

            section WiiMenuTool
              toolClass RayMenuTool
              deviceName0 Wiimote
              device0ButtonIndex0 3
            endsection

            section WiiScreenMenuTool
              toolClass RayScreenMenuTool
              deviceName0 Wiimote
              device0ButtonIndex0 10
            endsection
        endsection
    endsection
endsection

keckcaves/wii_mote.txt · Last modified: 2009/07/01 15:02 by sumner