]> Dogcows Code - chaz/yoink/blob - src/Scene.hh
testing new non-autotools build system
[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 moof {
30 class settings;
31 }
32
33 class Scene;
34 typedef boost::shared_ptr<Scene> SceneP;
35
36 class Scene : public moof::cullable, public moof::drawable, public moof::resource
37 {
38 class impl;
39 boost::shared_ptr<impl> impl_;
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 moof::script::status load(moof::settings& settings, moof::script& script);
51
52 void draw(moof::scalar alpha) const;
53 void draw_if_visible(moof::scalar alpha, const moof::frustum& frustum) const;
54
55 moof::scalar getZCoord(const moof::vector2& position) const;
56
57 bool castRay(const moof::ray<2>& ray,
58 std::list<moof::ray<2>::contact>& hits) const;
59 bool checkForCollision(Character& character);
60 };
61
62
63 #endif // _SCENE_HH_
64
This page took 0.034062 seconds and 4 git commands to generate.