SuperTuxKart
Loading...
Searching...
No Matches
stars.hpp
1// SuperTuxKart - a fun racing game with go-kart
2//
3// Copyright (C) 2012-2015 SuperTuxKart-Team
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef HEADER_STARS_HPP
20#define HEADER_STARS_HPP
21
22#include "utils/no_copy.hpp"
23
24#include "vector3d.h"
25
26#include <vector>
27
28class AbstractKart;
29
30namespace irr
31{
32 namespace scene { class ISceneNode; }
33}
34using namespace irr;
35
40class Stars : public NoCopy
41{
42private:
43
45 std::vector<scene::ISceneNode*> m_nodes;
46
48 scene::ISceneNode *m_parent_kart_node;
49
51 core::vector3df m_center;
52
55
56 float m_period;
57 float m_remaining_time;
58
59 public:
60 Stars (AbstractKart *kart);
61 ~Stars ();
62 void showFor(float time);
63 void reset();
64 void update (float delta_t);
65 bool isEnabled() const { return m_enabled; }
66};
67#endif
68
69/* EOF */
70
71
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
This class is used to display rotating stars around a kart's head.
Definition: stars.hpp:41
core::vector3df m_center
Center around which stars rotate.
Definition: stars.hpp:51
scene::ISceneNode * m_parent_kart_node
The scene node of the kart to which the stars belong.
Definition: stars.hpp:48
bool m_enabled
Whether stars are currently enabled.
Definition: stars.hpp:54
void reset()
Resets the stars, esp.
Definition: stars.cpp:94
std::vector< scene::ISceneNode * > m_nodes
Vector containing the stars.
Definition: stars.hpp:45