source: osgVisual/trunk/include/draw2D/visual_hud.h

Last change on this file was 221, checked in by Torben Dannhauer, 14 years ago

Updated copyright NOTICE
(No code changes)

File size: 2.2 KB
RevLine 
[32]1#pragma once
[221]2/* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer
[32]3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18#include <visual_draw2D.h>
19
20
21namespace osgVisual
22{
23
24/**
25 * \brief This class demonstrates how to build a Head Up Display.
26 *
27 * Replace addContent() to integrate own content.
28 *
29 * @todo : Check, if the update logic should be implemtented in draw2D or here in.
30 *
31 * @author Torben Dannhauer
32 * @date  Sep 2009
33 */ 
34class visual_hud : public osg::Geode
35{
[88]36        #include <leakDetection.h>
[32]37public:
38        /**
39         * \brief Empty Constructor.
40         *
41         */ 
42        visual_hud(void);
43
44        /**
45         * \brief Empty Destructor.
46         *
47         */ 
48        ~visual_hud(void);
49
50        /**
51         * \brief This function initializes the HUD.
52         *
53         * @param viewer_ : Pointer to the viewer instance to get screen size and screen width.
54         * @return : True if initialization was successful.
55         */ 
56        bool init(osgViewer::Viewer *viewer_ );
57
58private:
59        /**
60         * \brief This function contains the code to display in the HUD.
61         *
62         * Subclass this function to integrate own content.
63         *
64         * @return Pointer to the Geode which contains the HUD content.
65         */ 
66        osg::ref_ptr<osg::Geode> addContent();
67
68        /**
69         * This variable contains the width of the rendering screen during the initialization of this node.
70         */ 
71        int screen_width;
72
73        /**
74         * This variable contains the height of the rendering screen during the initialization of this node.
75         */ 
76        int screen_height;
77}; 
78
79}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.