SuperTuxKart
shadow.hpp
1 //
2 // SuperTuxKart - a fun racing game with go-kart
3 // Copyright (C) 2009-2013 Joerg Henrichs
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_SHADOW_HPP
20 #define HEADER_SHADOW_HPP
21 
22 #include "utils/no_copy.hpp"
23 #include <memory>
24 
25 class AbstractKart;
26 class Material;
27 
28 namespace SP
29 {
30  class SPDynamicDrawCall;
31 }
32 
39 class Shadow : public NoCopy
40 {
41 private:
43  std::shared_ptr<SP::SPDynamicDrawCall> m_dy_dc;
44 
48 
51 
52 public:
53  Shadow(Material* shadow_mat, const AbstractKart& kart);
54  ~Shadow();
55  void update(bool enabled);
56 }; // Shadow
57 #endif
58 
59 /* EOF */
60 
void update(bool enabled)
Updates the simulated shadow.
Definition: shadow.cpp:64
bool m_shadow_enabled
If a kart is flying, the shadow is disabled (since it is stuck to the kart, i.e.
Definition: shadow.hpp:47
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:25
Definition: material.hpp:46
const AbstractKart & m_kart
A read-only kart object for accessing suspension length.
Definition: shadow.hpp:50
std::shared_ptr< SP::SPDynamicDrawCall > m_dy_dc
The dynamic draw call of the shadow.
Definition: shadow.hpp:43
This class is used to enable a shadow for a kart.
Definition: shadow.hpp:39
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61