]>
Dogcows Code - chaz/yoink/blob - src/Scene.hh
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
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.
10 **************************************************************************/
18 #include <boost/shared_ptr.hpp>
20 #include <Moof/Cullable.hh>
21 #include <Moof/Drawable.hh>
22 #include <Moof/Resource.hh>
23 #include <Moof/Script.hh>
30 typedef boost::shared_ptr
<Scene
> SceneP
;
32 class Scene
: public Mf::Cullable
, public Mf::Drawable
, public Mf::Resource
35 boost::shared_ptr
<Impl
> mImpl
;
39 explicit Scene(const std::string
& name
);
41 static SceneP
alloc(const std::string
& name
)
43 return SceneP(new Scene(name
));
46 Mf::Script::Result
load(Mf::Script
& script
);
48 void draw(Mf::Scalar alpha
) const;
49 void drawIfVisible(Mf::Scalar alpha
, const Mf::Frustum
& frustum
) const;
51 Mf::Scalar
getZCoord(const Mf::Vector2
& position
) const;
53 bool castRay(const Mf::Ray
<2>& ray
,
54 std::list
<Mf::Ray
<2>::Intersection
>& hits
) const;
55 bool checkForCollision(Character
& character
);
57 static std::string
getPath(const std::string
& name
);
This page took 0.039814 seconds and 5 git commands to generate.