Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 4. Manipulating the View > Manipulating the view with joysticks

Manipulating the view with joysticks

In the last example of this chapter, we would like to add joystick support to the previous 2D manipulator, which means to use joysticks to pan and scale the scene in view. OSG doesn't provide native joystick functionalities so it is time to reply on some external libraries. This time we will choose the famous DirectInput library that belongs to DirectX 8 and higher versions. With some modifications to the last example's code, we can quickly add supports of DirectInput devices and make use of them in camera manipulators, callbacks, and event handlers.

Note that this recipe can only work under Windows systems.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial