]> Dogcows Code - chaz/yoink/blob - src/Scene.hh
prep for runloop code
[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/script.hh>
23
24
25 class Character;
26
27
28 namespace moof {
29 class settings;
30 }
31
32 class Scene;
33 typedef boost::shared_ptr<Scene> SceneP;
34
35 class Scene : public moof::cullable, public moof::drawable
36 {
37 class impl;
38 boost::shared_ptr<impl> impl_;
39
40 public:
41
42 explicit Scene(const std::string& name);
43
44 static SceneP alloc(const std::string& name)
45 {
46 return SceneP(new Scene(name));
47 }
48
49 moof::script::status load(moof::settings& settings, moof::script& script);
50
51 void draw(moof::scalar alpha) const;
52 void draw_if_visible(moof::scalar alpha, const moof::frustum& frustum) const;
53
54 moof::scalar getZCoord(const moof::vector2& position) const;
55
56 bool castRay(const moof::ray<2>& ray,
57 std::list<moof::ray<2>::contact>& hits) const;
58 bool checkForCollision(Character& character);
59 };
60
61
62 #endif // _SCENE_HH_
63
This page took 0.034149 seconds and 4 git commands to generate.