Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/skybox2/src/modules/designtools/CreateStars.h @ 6861

Last change on this file since 6861 was 6861, checked in by gionc, 14 years ago

Added StarCreator

File size: 2.2 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Gion-Andri Cantieni
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29
30#include "core/BaseObject.h"
31
32#include "graphics/Billboard.h"
33 
34 
35namespace orxonox
36{
37    class CreateStars : public BaseObject
38    {
39        public:
40            CreateStars(orxonox::BaseObject* creator);
41            virtual ~CreateStars();
42
43            void createBillboards();
44
45            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
46
47            void setNumStars(int num) {
48                this->numStars_ = num;
49            }
50
51            int getNumStars(){
52                return this->numStars_;
53            }
54
55            void setMaterial(const std::string& material) {
56                this->material_ = material;
57            }
58
59            std::string& getMaterial(){
60                return this->material_;
61            }
62
63            void setRadius(unsigned int dist) {
64                this->radius_ = dist;
65                this->createBillboards();
66            }
67
68            unsigned int getRadius(){
69                return this->radius_;
70            }
71           
72            Vector3 PolarToCartesian(float alpha, float beta, float radius);
73
74        private:
75            int numStars_;
76            std::string material_;
77            std::vector<Billboard*> billboards_;
78            unsigned int radius_;
79           
80    };
81}
Note: See TracBrowser for help on using the repository browser.