]> Dogcows Code - chaz/yoink/blob - src/Scene.hh
fixed documentation about where to find licenses
[chaz/yoink] / src / Scene.hh
1
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
4 *
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
7 *
8 *****************************************************************************/
9
10 #ifndef _SCENE_HH_
11 #define _SCENE_HH_
12
13 #include <list>
14 #include <string>
15
16 #include <boost/shared_ptr.hpp>
17
18 #include <moof/cullable.hh>
19 #include <moof/drawable.hh>
20 #include <moof/script.hh>
21
22
23 // forward declarations
24 namespace moof {
25 class settings;
26 }
27 class Character;
28
29 class Scene;
30 typedef boost::shared_ptr<Scene> SceneP;
31
32 class Scene : public moof::cullable, public moof::drawable
33 {
34 class impl;
35 boost::shared_ptr<impl> impl_;
36
37 public:
38
39 explicit Scene(const std::string& name);
40
41 static SceneP alloc(const std::string& name)
42 {
43 return SceneP(new Scene(name));
44 }
45
46 moof::script::status load(moof::settings& settings, moof::script& script);
47
48 void draw(moof::scalar alpha) const;
49 void draw_if_visible(moof::scalar alpha, const moof::frustum& frustum) const;
50
51 moof::scalar getZCoord(const moof::vector2& position) const;
52
53 bool castRay(const moof::ray<2>& ray,
54 std::list<moof::ray<2>::contact>& hits) const;
55 bool checkForCollision(Character& character);
56 };
57
58
59 #endif // _SCENE_HH_
60
This page took 0.034953 seconds and 4 git commands to generate.