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 "OrxonoxStableHeaders.h" |
---|
29 | #include "RadarObject.h" |
---|
30 | |
---|
31 | namespace orxonox |
---|
32 | { |
---|
33 | using namespace Ogre; |
---|
34 | |
---|
35 | int RadarObject::count = 0; // initialize static variable |
---|
36 | |
---|
37 | RadarObject::RadarObject(Ogre::OverlayContainer* container){ |
---|
38 | container_ = container; |
---|
39 | pos_ = Vector3(0.0, 0.0, 0.0); |
---|
40 | init(); |
---|
41 | } |
---|
42 | |
---|
43 | RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){ |
---|
44 | container_ = container; |
---|
45 | pos_ = pos; |
---|
46 | init(); |
---|
47 | } |
---|
48 | |
---|
49 | RadarObject::~RadarObject(){} |
---|
50 | |
---|
51 | void RadarObject::init(){ |
---|
52 | next = NULL; |
---|
53 | om = &Ogre::OverlayManager::getSingleton(); |
---|
54 | panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", |
---|
55 | "Object"+Ogre::StringConverter::toString(count))); |
---|
56 | panel_->setMaterialName("Orxonox/RedDot"); |
---|
57 | panel_->setDimensions(3,3); |
---|
58 | panel_->setMetricsMode(Ogre::GMM_PIXELS); |
---|
59 | panel_->show(); |
---|
60 | index_ = count; |
---|
61 | count++; |
---|
62 | container_->addChild(panel_); |
---|
63 | } |
---|
64 | } |
---|
65 | |
---|
66 | /* my local clipboard... |
---|
67 | COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n"; |
---|
68 | COUT(3) << firstRadarObject_->radius_ << " " << firstRadarObject_->phi_ << std::endl; |
---|
69 | COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n"; |
---|
70 | */ |
---|