]> Dogcows Code - chaz/yoink/blob - src/Scene.hh
sockets documentation and cleanup
[chaz/yoink] / src / Scene.hh
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #ifndef _SCENE_HH_
13 #define _SCENE_HH_
14
15 #include <list>
16 #include <string>
17
18 #include <boost/shared_ptr.hpp>
19
20 #include <Moof/Cullable.hh>
21 #include <Moof/Drawable.hh>
22 #include <Moof/Resource.hh>
23 #include <Moof/Script.hh>
24
25
26 class Character;
27
28
29 namespace Mf {
30 class Settings;
31 }
32
33 class Scene;
34 typedef boost::shared_ptr<Scene> SceneP;
35
36 class Scene : public Mf::Cullable, public Mf::Drawable, public Mf::Resource
37 {
38 class Impl;
39 boost::shared_ptr<Impl> mImpl;
40
41 public:
42
43 explicit Scene(const std::string& name);
44
45 static SceneP alloc(const std::string& name)
46 {
47 return SceneP(new Scene(name));
48 }
49
50 Mf::Script::Result load(Mf::Settings& settings, Mf::Script& script);
51
52 void draw(Mf::Scalar alpha) const;
53 void drawIfVisible(Mf::Scalar alpha, const Mf::Frustum& frustum) const;
54
55 Mf::Scalar getZCoord(const Mf::Vector2& position) const;
56
57 bool castRay(const Mf::Ray<2>& ray,
58 std::list<Mf::Ray<2>::Contact>& hits) const;
59 bool checkForCollision(Character& character);
60
61 static bool getPath(std::string& name);
62 };
63
64
65 #endif // _SCENE_HH_
66
This page took 0.030683 seconds and 4 git commands to generate.