Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/hud/RadarObject.cc @ 1373

Last change on this file since 1373 was 1362, checked in by scheusso, 16 years ago

merged hud3 branch into trunk and changed camera orientation

File size: 1.9 KB
Line 
1/*
2*   ORXONOX - the hottest 3D action shooter ever to exist
3*
4*
5*   License notice:
6*
7*   This program is free software; you can redistribute it and/or
8*   modify it under the terms of the GNU General Public License
9*   as published by the Free Software Foundation; either version 2
10*   of the License, or (at your option) any later version.
11*
12*   This program 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*   GNU General Public License for more details.
16*
17*   You should have received a copy of the GNU General Public License
18*   along with this program; if not, write to the Free Software
19*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20*
21*   Author:
22*      Felix Schulthess
23*   Co-authors:
24*      ...
25*
26*/
27
28#include "RadarObject.h"
29
30namespace orxonox
31{
32    using namespace Ogre;
33
34        int RadarObject::count = 0;             // initialize static variable
35
36        RadarObject::RadarObject(Ogre::OverlayContainer* container){
37                container_ = container;
38                pos_ = Vector3(0.0, 0.0, 0.0);
39                init();
40        }
41
42        RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
43                container_ = container;
44                pos_ = pos;
45                init();
46        }
47
48        RadarObject::~RadarObject(){}
49
50        void RadarObject::init(){
51            next = NULL;
52                om = &Ogre::OverlayManager::getSingleton();
53                panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
54                        "Object"+Ogre::StringConverter::toString(count)));
55                panel_->setMaterialName("Orxonox/RedDot");
56                panel_->setDimensions(3,3);
57        panel_->setMetricsMode(Ogre::GMM_PIXELS);
58        panel_->show();
59        index_ = count;
60        count++;
61        container_->addChild(panel_);
62        }
63}
64
65/* my local clipboard...
66COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
67COUT(3) << firstRadarObject_->radius_ << "  " << firstRadarObject_->phi_ << std::endl;
68COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
69*/
Note: See TracBrowser for help on using the repository browser.