hydra-hs-1.0.0.2: Haskell binding to the Sixense SDK for the Razer Hydra

Safe HaskellNone

System.Hardware.Hydra

Contents

Description

A wrapper for the Sixense SDK, based on the C SDK.

Synopsis

Initialization

sixenseInit :: IO SixenseSuccessSource

Initialize the Sixense library. This function initializes the Sixense library. It must be called at least one time per application. Subsequent calls will have no effect. Once initialized, the other Sixense function calls will work as described until sixenseExit() is called.

sixenseExit :: IO SixenseSuccessSource

Shut down the Sixense library. This shuts down the Sixense library. After this function call, all Sixense API calls will return failure, until sixenseInit() is called again.

autoEnableHemisphereTracking :: ControllerID -> IO SixenseSuccessSource

Shut down the Sixense library. This shuts down the Sixense library. After this function call, all Sixense API calls will return failure, until sixenseInit() is called again.

General information

controllerEnabled :: ControllerID -> IO BoolSource

Returns true if the referenced controller is currently connected to the Control Unit. This call is used to determine whether or not a given controller is powered on and connected to the system. The argument is an index between 0 and the maximum number of supported controllers.

Types

data Button Source

Instances

Obtaining data

getDataSource

Arguments

:: ControllerID

The ID of the desired controller. Valid values are from 0 to 3. If the desired controller is not connected, an empty data packet is returned. Empty data packets are initialized to a zero position and the identity rotation matrix.

-> Int

length of the history to obtain. 0-9

-> IO (Maybe ControllerData) 

Get state of one of the controllers, selecting how far back into a history of the last 10 updates.

getAllDataSource

Arguments

:: Int

length of the history to obtain. 0-9

-> IO (Maybe AllControllerData) 

Get state of all of the controllers, selecting how far back into a history of the last 10 updates.

getNewestData :: ControllerID -> IO (Maybe ControllerData)Source

Get the most recent state of one of the controllers.

getAllNewestData :: IO (Maybe AllControllerData)Source

Get the most recent state of all of the controllers.

Miscellaneous

setFilterEnabled :: Bool -> IO SixenseSuccessSource

Turn the internal position and orientation filtering on or off.

getFilterEnabled :: IO BoolSource

Returns the enable status of the internal position and orientation filtering.