The same may happen if your application is started within a development environment like Visual Studio. And there can arise a problem because another application may be in the foreground as you might expect: If you start your program from within a console the console is the foreground process and not your application! If the parameter is set to false your application will not receive the data therefore. If set to true the data is sent to all connected applications even if they are not in the foreground if set to false only the foreground application will get data. This mechanism is controlled by setting the first parameter of scConnect2() to true or false. Hint: The SC-Daemon monitors the desktop and is able to send data to all connected applications or to the one in the foreground only. Notice that scFetchStdData() will wait 30 ms (this delay can be configured with the user interface) and return with status SC_COMMUNICATION_ERROR if the cap is not moved or no key is pressed in this time. This is generated by some API's internal functions and could be configured with the spc_ctrlr_dll.ini file in your home directory. You may get some logging output besides the couts given above. If using Microsoft's Visual Studio you will need to generate library files for linking the SC-DLL. You just have to include the API's header file spc_ctrlr.h into your sources and link the SC-DLL (files "spc_ctrlr_32.dll" and "spc_ctrlr_64.dll" under Windows, or the shared library files "libspcctrlr32.so" and "libspcctrlr64.so" under Linux, or the dynamic library files "libspc_ctrlr_32.dylib" and "libspc_ctrlr_64.dylib" under OS X) to your application to have access to a set of functions described in this document. To enable other applications getting data from and writing data to the SpaceController the SC-Daemon provides an application programming interface, the SC-API. Furthermore it reads the configuration data from a file, sends the data to the device during the initializing process and configures the device when the user changes the parameters with the user interface ("SC-GUI"). Basically this is a background process (the "SC-Daemon") which fetches the data produced by the device and delivers it to the applications interested in the data. Necessary for operation is the SpaceControl software. Therefore the SpaceController is the ideal equipment for moving and rotating objects in virtual 3D environments like CAD applications or moving the camera in GoogleEarth e. In difference to a mouse the SpaceController has six degrees of freedom: translation in all three axes of space (x, y, z) and rotation around all of these axes. A SpaceController is a device like a mouse for manipulating objects on a computer screen.
0 Comments
Leave a Reply. |