SuperTuxKart
Loading...
Searching...
No Matches
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
25class AbstractKart;
26class Material;
27
28namespace SP
29{
30 class SPDynamicDrawCall;
31}
32
33namespace irr
34{
35 namespace scene
36 {
37 class IMeshSceneNode;
38 }
39}
40
47class Shadow : public NoCopy
48{
49private:
51 std::shared_ptr<SP::SPDynamicDrawCall> m_dy_dc;
52
53 irr::scene::IMeshSceneNode* m_node;
54
58
61
62public:
63 Shadow(Material* shadow_mat, const AbstractKart& kart);
64 ~Shadow();
65 void update(bool enabled);
66}; // Shadow
67#endif
68
69/* EOF */
70
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Definition: material.hpp:48
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 enable a shadow for a kart.
Definition: shadow.hpp:48
void update(bool enabled)
Updates the simulated shadow.
Definition: shadow.cpp:119
const AbstractKart & m_kart
A read-only kart object for accessing suspension length.
Definition: shadow.hpp:60
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:57
std::shared_ptr< SP::SPDynamicDrawCall > m_dy_dc
The dynamic draw call of the shadow.
Definition: shadow.hpp:51