Download Augmented Reality Device for First Response Scenarios
Transcript
functionality is not utilized in the prototype in its present form, but was included for demonstration purposes or future use. 4.3.7.2 Code Flow Overview In this section, the Reader is familiarized with the programmatic flow of the applications software. The following narrative describes in an approximately sequential manner the events taking place during the execution of the application code, the data structures involved and the methods operating on them. It is hoped that through this approach the Reader may gain a clearer understanding of the context in which the objects described above coexist and interact. The following sections should provide a good starting point for understanding, modifying and expanding the application’s code when need arises. As stated before, the ARApplication class provides the overall application framework. A single object of this class is instantiated within WinMain 33. From there, its go() method is invoked, which performs the necessary initialization of Ogre3D objects (including ARFrameListener) and parameters for the hierarchical scene manager (cameras, frame listeners, objects), spawns the thread for webcam image capture and processing (ARWebcamThread), and finally starts the rendering loop by invoking the startRendering() method of the topmost object in Ogre3D scene manager hierarchy. The startRendering() method, once called, doesn’t exit until the application is halted. Any subsequent processing of external inputs to the system from then on is provided by specialized callback functions defined within the ARFrameListener object, triggered by events such as keyboard or mouse input, beginning of frame rendering or end of frame rendering. 33 The WinMain function is called by the system as the initial entry point for a Windows-based application. Source: MSDN (Microsoft Developer Network) [msdn.microsoft.com]. 112