--videomode = {800, 600}
--- Set this to make the cursor remain visible as you mouse over the view of
--- the game.
+-- Set this to make the cursor remain visible as you mouse over the video
+-- output of the game.
-showcursor = true
+showcursor = false
-- Set this to use double-buffering to improve animation quality. You
--- should usually leave this as true.
+-- really don't want to turn this off.
doublebuffer = true
-- Set this to sync with the refresh rate of your display. Your framerate
--- will be limited to the refresh rate, but you may experience fewer ugly
--- "artifacts" caused by the game animation.
+-- will be limited to the refresh rate, but you may experience less
+-- tearing caused by the display vertical refresh. On the other hand, you
+-- might experience worse tearing, depending on your setup. Try it both
+-- ways.
swapcontrol = true
// spring:
//mState.force += -15.0 * x - 1.5 * mState.velocity;
- force = SCALAR(-10.0) * (mag - d) * (x / mag) -
- SCALAR(2.0) * state.velocity;
+ force = SCALAR(-10.0) * (mag - d) * (x / mag);// - SCALAR(2.0) * state.velocity;
return force;
}
// forces
mState.force = Mf::Vector2(0.0, 0.0);
- //mState.forces.push_back(SpringForce(Mf::Vector2(20.0, 4.0)));
- mState.forces.push_back(ResistanceForce(2.0));
+ //mState.forces.push_back(SpringForce(Mf::Vector2(5.0, 4.0)));
+ //mState.forces.push_back(ResistanceForce(2.0));
//mState.forces.push_back(Mf::LinearState<2>::GravityForce(-9.8));
// starting position
}
-void GameLayer::pushedOntoEngine()
+void GameLayer::addedToCore()
{
Mf::core.push(mHud);
mLine.a.set(20, 10);
mLine.b.set(19, 14);
- mSphere.point.set(22, 5);
- mSphere.radius = 2;
+ mCircle.point.set(22, 5);
+ mCircle.radius = 2;
mRayTimer.init(boost::bind(&GameLayer::rayTimer, this),
1.0, Mf::Timer::REPEAT);
void GameLayer::rayTimer()
{
- Mf::Ray<2>::Intersection meh;
- std::list<Mf::Ray<2>::Intersection> hits;
+ Mf::Ray2::Contact meh;
+ std::list<Mf::Ray2::Contact> hits;
Mf::Vector2 point;
bool bam = mLine.intersectRay(mRay, meh);
hits.push_back(meh);
}
- bam = mSphere.intersectRay(mRay, meh);
+ bam = mCircle.intersectRay(mRay, meh);
if (bam)
{
meh.normal.normalize();
{
hits.front().normal.normalize();
mRay.solve(point, hits.front().distance);
- //Mf::logInfo << "scene: d = " << hits.front().distance << std::endl;
- //Mf::logInfo << " P = " << point << std::endl;
- //Mf::logInfo << " n = " << hits.front().normal << std::endl;
+ Mf::logInfo << "scene: d = " << hits.front().distance << std::endl;
+ Mf::logInfo << " P = " << point << std::endl;
+ Mf::logInfo << " n = " << hits.front().normal << std::endl;
}
}
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
mState.scene->drawIfVisible(alpha, mState.camera.getFrustum());
-
mState.heroine->draw(alpha);
mRay.draw();
mLine.draw();
- mSphere.draw();
+ mCircle.draw();
}
bool GameLayer::handleEvent(const Mf::Event& event)
return GameLayerP(new GameLayer);
}
- void pushedOntoEngine();
+ void addedToCore();
void update(Mf::Scalar t, Mf::Scalar dt);
void draw(Mf::Scalar alpha) const;
Mf::SoundStream mMusic;
Mf::Sound mPunchSound;
- Mf::Ray<2> mRay;
- Mf::Line<2> mLine;
- Mf::Sphere<2> mSphere;
+ Mf::Ray2 mRay;
+ Mf::Line2 mLine;
+ Mf::Circle mCircle;
Mf::Timer mRayTimer;
void rayTimer();
*
**************************************************************************/
+#include <Moof/Aabb.hh>
#include <Moof/Core.hh>
+#include <Moof/Log.hh>
#include <Moof/OpenGL.hh>
#include <Moof/Video.hh>
void ProgressBar::resize(const Mf::Rectangle& rect)
{
+ Mf::logInfo << "rect: " << rect.min << ", " << rect.max << std::endl;
Mf::Scalar height = rect.max[1] - rect.min[1];
Mf::Scalar halfHeight = height / 2.0;
mWidth = rect.max[0] - rect.min[0] - height;
- // assert width > 0
+ ASSERT(mWidth > 0);
mVertices[0] = rect.min;
mVertices[1] = Mf::Vector2(rect.min[0] + halfHeight, rect.min[1]);
SCALAR(1.0), SCALAR(-1.0), cml::z_clip_neg_one);
// position the two progress bars at the top-left of the screen
- mBar1.resize(Mf::Rectangle(20, height - 51,
- 0.7 * width, height - 3));
- mBar2.resize(Mf::Rectangle(20, height - 28,
- 0.7 * width, height - 70));
+ mBar1.resize(Mf::Rectangle(20, height - 51, 0.7 * width, height - 3));
+ mBar2.resize(Mf::Rectangle(20, height - 28, 0.7 * width, height - 70));
setBar1Progress(0.05);
setBar2Progress(0.0);
{
// don't want the hud anymore
Mf::core.pop(this);
+ Mf::logWarning("okay bye bye hud");
return true;
}
break;
#include <Moof/Drawable.hh>
#include <Moof/Layer.hh>
#include <Moof/Math.hh>
-#include <Moof/Rectangle.hh>
+//#include <Moof/Rectangle.hh>
#include <Moof/Texture.hh>
#include "GameState.hh"
+class Rectangle;
+
// TODO this stuff is still just hacked up
class ProgressBar : public Mf::Drawable
noinst_LIBRARIES = libmoof.a
libmoof_a_SOURCES = \
- Moof/Aabb.cc \
Moof/Aabb.hh \
Moof/Camera.cc \
Moof/Camera.hh \
Moof/Plane.cc \
Moof/Plane.hh \
Moof/Ray.hh \
- Moof/Rectangle.cc \
- Moof/Rectangle.hh \
Moof/Resource.cc \
Moof/Resource.hh \
Moof/RigidBody.hh \
+++ /dev/null
-
-/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
-**] All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#include "Aabb.hh"
-#include "Frustum.hh"
-#include "OpenGL.hh"
-#include "Texture.hh"
-
-
-namespace Mf {
-
-
- /*
-void Aabb::getOctant(Aabb& octant, int num) const
-{
- Vector3 mid = getCenter();
-
- switch (num)
- {
- case 0:
- octant.init(Vector3(min[0], min[1], mid[2]),
- Vector3(mid[0], mid[1], max[2]));
- break;
-
- case 1:
- octant.init(Vector3(mid[0], min[1], mid[2]),
- Vector3(max[0], mid[1], max[2]));
- break;
-
- case 2:
- octant.init(mid, max);
- break;
-
- case 3:
- octant.init(Vector3(min[0], mid[1], mid[2]),
- Vector3(mid[0], max[1], max[2]));
- break;
-
- case 4:
- octant.init(min, mid);
- break;
-
- case 5:
- octant.init(Vector3(mid[0], min[1], min[2]),
- Vector3(max[0], mid[1], mid[2]));
- break;
-
- case 6:
- octant.init(Vector3(mid[0], mid[1], min[2]),
- Vector3(max[0], max[1], mid[2]));
- break;
-
- case 7:
- octant.init(Vector3(min[0], mid[1], min[2]),
- Vector3(mid[0], max[1], mid[2]));
- break;
- }
-}
-*/
-
-
-} // namespace Mf
-
Vector min;
Vector max;
+
Aabb() {}
Aabb(const Vector& a, const Vector& b)
init(a, b);
}
- Aabb(Scalar ax, Scalar ay, Scalar az,
- Scalar bx, Scalar by, Scalar bz)
+ Aabb(Scalar x1, Scalar y1, Scalar x2, Scalar y2)
{
- Vector a(ax, ay, az);
- Vector b(bx, by, bz);
+ Vector a(x1, y1);
+ Vector b(x2, y2);
init(a, b);
}
- void init(const Vector& a, const Vector& b)
+ Aabb(Scalar x1, Scalar y1, Scalar z1, Scalar x2, Scalar y2, Scalar z2)
+ {
+ Vector a(x1, y1, z1);
+ Vector b(x2, y2, z2);
+
+ init(a, b);
+ }
+
+
+ void init(const Vector2& a, const Vector2& b)
+ {
+ if (a[0] < b[0])
+ {
+ min[0] = a[0];
+ max[0] = b[0];
+ }
+ else
+ {
+ min[0] = b[0];
+ max[0] = a[0];
+ }
+ if (a[1] < b[1])
+ {
+ min[1] = a[1];
+ max[1] = b[1];
+ }
+ else
+ {
+ min[1] = b[1];
+ max[1] = a[1];
+ }
+ }
+
+ void init(const Vector3& a, const Vector3& b)
{
if (a[0] < b[0])
{
}
}
+
Vector getCenter() const
{
- return Vector((min[0] + max[0]) / 2.0,
- (min[1] + max[1]) / 2.0,
- (min[2] + max[2]) / 2.0);
+ return (min + max) / 2.0;
}
- //void getOctant(Aabb& octant, int num) const;
Plane getPlaneXY() const
{
Plane plane;
- plane.normal = Vector(0.0, 0.0, 1.0);
+ plane.normal = Vector3(0.0, 0.0, 1.0);
plane.d = cml::dot(-plane.normal, getCenter());
return plane;
}
Plane getPlaneXZ() const
{
Plane plane;
- plane.normal = Vector(0.0, 1.0, 0.0);
+ plane.normal = Vector3(0.0, 1.0, 0.0);
plane.d = cml::dot(-plane.normal, getCenter());
return plane;
}
Plane getPlaneYZ() const
{
Plane plane;
- plane.normal = Vector(1.0, 0.0, 0.0);
+ plane.normal = Vector3(1.0, 0.0, 0.0);
plane.d = cml::dot(-plane.normal, getCenter());
return plane;
}
- /*
- void getCorners(Vector3 corners[8]) const;
-
- void encloseVertices(const Vector3 vertices[], unsigned count);
-
- void draw(Scalar alpha = 0.0) const;
- bool isVisible(const Frustum& frustum) const;
- */
+ void getCorners(Vector2 corners[4]) const
+ {
+ corners[0][0] = min[0]; corners[0][1] = min[1];
+ corners[1][0] = max[0]; corners[1][1] = min[1];
+ corners[2][0] = max[0]; corners[2][1] = max[1];
+ corners[3][0] = min[0]; corners[3][1] = max[1];
+ }
- void getCorners(Vector corners[8]) const
+ void getCorners(Vector3 corners[8]) const
{
corners[0][0] = min[0];
corners[0][1] = min[1];
void draw(Scalar alpha = 0.0) const
{
- Scalar vertices[] = {min[0], min[1], min[2],
- min[0], max[1], min[2],
- max[0], max[1], min[2],
- max[0], min[1], min[2],
- min[0], max[1], max[2],
- min[0], min[1], max[2],
- max[0], min[1], max[2],
- max[0], max[1], max[2]};
-
- GLubyte indices[] = {0, 1, 2, 3,
- 1, 2, 7, 4,
- 3, 0, 5, 6,
- 2, 3, 6, 7,
- 5, 0, 1, 4,
- 4, 5, 6, 7};
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glVertexPointer(3, GL_SCALAR, 0, vertices);
-
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- Texture::resetBind();
-
- glDrawElements(GL_QUADS, sizeof(indices), GL_UNSIGNED_BYTE,
- indices);
-
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- //glDisableClientState(GL_VERTEX_ARRAY);
-
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glRect(min[0], min[1], max[0], max[1]);
}
bool isVisible(const Frustum& frustum) const
{
- return frustum.contains(*this);
+ return true;
}
};
+template <>
+inline void Aabb<3>::draw(Scalar alpha) const
+{
+ Scalar vertices[] = {min[0], min[1], min[2],
+ min[0], max[1], min[2],
+ max[0], max[1], min[2],
+ max[0], min[1], min[2],
+ min[0], max[1], max[2],
+ min[0], min[1], max[2],
+ max[0], min[1], max[2],
+ max[0], max[1], max[2]};
+
+ GLubyte indices[] = {0, 1, 2, 3,
+ 1, 2, 7, 4,
+ 3, 0, 5, 6,
+ 2, 3, 6, 7,
+ 5, 0, 1, 4,
+ 4, 5, 6, 7};
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glVertexPointer(3, GL_SCALAR, 0, vertices);
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ Texture::resetBind();
+
+ glDrawElements(GL_QUADS, sizeof(indices), GL_UNSIGNED_BYTE,
+ indices);
+
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ //glDisableClientState(GL_VERTEX_ARRAY);
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+}
+
+template <>
+inline bool Aabb<3>::isVisible(const Frustum& frustum) const
+{
+ return frustum.contains(*this);
+}
+
+
+typedef Aabb<2> Aabb2;
+typedef Aabb2 Rectangle;
+typedef Aabb<3> Aabb3;
+
+
} // namespace Mf
#endif // _MOOF_AABB_HH_
void run()
{
init();
+ ASSERT(video && "cannot run core without a current video context");
Scalar totalTime = 0.0;
Scalar ticks = Timer::getTicks();
Scalar nextSecond = ticks + SCALAR(1.0);
mFps = 0;
- int frames = 0;
+ int frameCount = 0;
- const int MAX_FRAMESKIP = 15;
- const Scalar inverseTimestep = SCALAR(1.0) / mTimestep;
+ const Scalar timestep = mTimestep;
+ const Scalar framerate = mFramerate;
- ASSERT(video && "cannot run core without a current video context");
+ const int MAX_FRAMESKIP = 15;
+ const Scalar inverseTimestep = SCALAR(1.0) / timestep;
do
{
- Timer::fireIfExpired();
- dispatchEvents();
+ Timer::fireIfExpired(); // 1. fire timers
+ dispatchEvents(); // 2. dispatch events
int i = 0;
while (nextUpdate < Timer::getTicks() && i < MAX_FRAMESKIP)
{
- totalTime += mTimestep;
- update(totalTime, mTimestep);
+ totalTime += timestep;
+ update(totalTime, timestep); // 3. update state
- nextUpdate += mTimestep;
+ nextUpdate += timestep;
++i;
}
if (nextDraw < (ticks = Timer::getTicks()))
{
- ++frames;
- draw((ticks + mTimestep - nextUpdate) * inverseTimestep);
- video->swap();
+ draw((ticks + timestep - nextUpdate) * inverseTimestep);
+ video->swap(); // 4. draw state
- nextDraw += mFramerate;
+ nextDraw += framerate;
+ ++frameCount;
- if (mShowFps && nextSecond < ticks)
+ if (nextSecond < Timer::getTicks())
{
- mFps = frames;
- frames = 0;
+ mFps = frameCount;
+ frameCount = 0;
- logInfo << mFps << " fps" << std::endl;
+ if (mShowFps) logInfo << mFps << " fps" << std::endl;
nextSecond += SCALAR(1.0);
}
}
- // be a good citizen and give back what you don't need
- Timer::sleep(0.0);
+ ticks = Timer::getTicks(); // 5. yield timeslice
+ if (ticks < nextUpdate && ticks < nextDraw) Timer::sleep(0.0);
}
while (!mStack.empty());
{
init(modelview, fovy, aspect, abutting, distant);
}
-
+
void init(const Matrix4& modelview, const Matrix4& projection);
void init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
Scalar abutting, Scalar distant);
a(point1),
b(point2) {}
- bool intersectRay(const Ray<2>& ray, Ray<2>::Intersection& hit) const
+ bool intersectRay(const Ray<2>& ray, Ray<2>::Contact& hit) const
{
// solve: Cx + r*Dx = Ax + s(Bx - Ax)
// Cy + r*Dy = Ay + s(By - Ay)
hit.distance = -(a[0] * (ray.point[1] - b[1]) +
b[0] * (a[1] - ray.point[1]) +
ray.point[0] * (b[1] - a[1])) / denom;
+
+ // check if the intersection is behind the ray
if (hit.distance < SCALAR(0.0)) return false;
Vector normal = cml::perp(a - b);
};
+typedef Line<2> Line2;
+typedef Line<3> Line3;
+
+
template <int D, int N>
-struct Polygon : public Shape<D>
+struct Polygon : public Drawable, public Shape<D>
{
typedef cml::vector< Scalar, cml::fixed<D> > Vector;
Vector points[N];
+
+ Polygon() {}
+
+ bool intersectRay(const Ray<D>& ray, typename Ray<D>::Contact& hit)
+ {
+ return false;
+ }
+
+ void draw(Scalar alpha = 0.0) const
+ {
+ Mf::Texture::resetBind();
+ glBegin(GL_POLYGON);
+ for (int i = 0; i < D; ++i)
+ {
+ glVertex(points[0]);
+ }
+ glEnd();
+ }
};
+typedef Polygon<2,3> Triangle2;
+typedef Polygon<3,3> Triangle3;
+
+
} // namespace Mf
#endif // _MOOF_LINE_HH_
OPENGL_ORDINAL_FUNC(void, TexCoord, 3);
OPENGL_ORDINAL_FUNC(void, TexCoord, 4);
+OPENGL_GENERIC_FUNC(void, Rect, S4);
+OPENGL_GENERIC_FUNC(void, Rect, V4);
+
#if USE_DOUBLE_PRECISION
inline void glGetScalar(GLenum a, GLscalar* b) { glGetDoublev(a, b); }
d(scalar) {}
- bool intersectRay(const Ray<3>& ray, Ray<3>::Intersection& hit)
+ bool intersectRay(const Ray<3>& ray, Ray<3>::Contact& hit)
{
// solve: [(ray.point + t*ray.direction) dot normal] + d = 0
Vector point;
Vector direction;
- struct Intersection
+ struct Contact
{
Scalar distance; // distance from the origin to the nearest point
- Vector normal; // surface normal at intersection point
+ Vector normal; // surface normal at contact point
- bool operator < (const Intersection& rhs)
+ bool operator < (const Contact& rhs)
{
return distance < rhs.distance;
}
};
+typedef Ray<2> Ray2;
+typedef Ray<3> Ray3;
+
+
} // namespace Mf
#endif // _MOOF_RAY_HH_
+++ /dev/null
-
-/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
-**] All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#include "Rectangle.hh"
-
-
-namespace Mf {
-
-
-void Rectangle::getCorners(Vector2 corners[4]) const
-{
- corners[0][0] = min[0]; corners[0][1] = min[1];
- corners[1][0] = max[0]; corners[1][1] = min[1];
- corners[2][0] = max[0]; corners[2][1] = max[1];
- corners[3][0] = min[0]; corners[3][1] = max[1];
- corners[4][0] = min[0]; corners[4][1] = min[1];
- corners[5][0] = max[0]; corners[5][1] = min[1];
- corners[6][0] = max[0]; corners[6][1] = max[1];
- corners[7][0] = min[0]; corners[7][1] = max[1];
-}
-
-
-} // namespace Mf
-
+++ /dev/null
-
-/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
-**] All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#ifndef _MOOF_RECTANGLE_HH_
-#define _MOOF_RECTANGLE_HH_
-
-#include <Moof/Math.hh>
-
-
-namespace Mf {
-
-
-/**
- * Axis-aligned Bounding Box
- */
-
-struct Rectangle
-{
- Vector2 min;
- Vector2 max;
-
-
- Rectangle() {}
-
- Rectangle(const Vector2& a, const Vector2& b)
- {
- init(a, b);
- }
-
- Rectangle(Scalar ax, Scalar ay, Scalar bx, Scalar by)
- {
- Vector2 a(ax, ay);
- Vector2 b(bx, by);
-
- init(a, b);
- }
-
- void init(const Vector2& a, const Vector2& b)
- {
- if (a[0] < b[0])
- {
- min[0] = a[0];
- max[0] = b[0];
- }
- else
- {
- min[0] = b[0];
- max[0] = a[0];
- }
- if (a[1] < b[1])
- {
- min[1] = a[1];
- max[1] = b[1];
- }
- else
- {
- min[1] = b[1];
- max[1] = a[1];
- }
- }
-
- Vector2 getCenter() const
- {
- return Vector2((min[0] + max[0]) / 2.0,
- (min[1] + max[1]) / 2.0);
- }
-
- void getCorners(Vector2 corners[4]) const;
-};
-
-
-} // namespace Mf
-
-#endif // _MOOF_RECTANGLE_HH_
-
// Frustum
-// Plane (can construct from Triangle<3>)
+// Plane (can construct from Triangle3)
// Ray
// Shape<>
// +- Line<>
-// +- Ball<>
-// | Circle <- Ball<2>
-// | Sphere <- Ball<3>
-// +- Box<>
-// | Rectangle <- Box<2>
-// | Aabb <- Box<3>
+// - Line2 Line<2>
+// - Line3 Line<3>
+// +- Sphere<>
+// | Sphere2, Circle Sphere<2>
+// | Sphere3 Sphere<3>
+// +- Aabb<>
+// | Aabb2, Rectangle Aabb<2>
+// | Aabb3 Aabb<3>
// +- Polygon<>
-// | Triangle <- Polygon<3>
-// +- Cylinder
-// +- Cone
+// | Triangle2 Polygon<2,3>
+// | Triangle3 Polygon<3,3>
namespace Mf {
/**
* Checks if this shape is intersected by a given ray. If so, returns
* the distance from the start of the ray to the shape and information
- * about the intersection via the 2nd parameter. A negative value is
- * returned if there is no intersection.
+ * about the contact via the 2nd parameter. A negative value is
+ * returned if there is no contact.
*/
virtual bool intersectRay(const Ray<D>& ray,
- typename Ray<D>::Intersection& hit)
+ typename Ray<D>::Contact& hit)
{
- return SCALAR(-1.0);
+ return false;
}
};
// a ray inside the sphere will not intersect on its way out
- bool intersectRay(const Ray<D>& ray, typename Ray<D>::Intersection& hit)
+ bool intersectRay(const Ray<D>& ray, typename Ray<D>::Contact& hit)
{
Vector b = point - ray.point;
Scalar z = cml::dot(b, ray.direction);
}
+typedef Sphere<2> Sphere2;
+typedef Sphere2 Circle;
+typedef Sphere<3> Sphere3;
+
+
} // namespace Mf
#endif // _MOOF_SPHERE_HH_
bool Scene::castRay(const Mf::Ray<2>& ray,
- std::list<Mf::Ray<2>::Intersection>& hits) const
+ std::list<Mf::Ray<2>::Contact>& hits) const
{
std::list< Mf::Line<2> >& lines = mImpl->mLines;
std::list< Mf::Line<2> >::const_iterator it;
for (it = lines.begin(); it != lines.end(); ++it)
{
- Mf::Ray<2>::Intersection hit;
+ Mf::Ray<2>::Contact hit;
Mf::Scalar d = (*it).intersectRay(ray, hit);
if (d > 0.0)
{
Mf::Scalar getZCoord(const Mf::Vector2& position) const;
bool castRay(const Mf::Ray<2>& ray,
- std::list<Mf::Ray<2>::Intersection>& hits) const;
+ std::list<Mf::Ray<2>::Contact>& hits) const;
bool checkForCollision(Character& character);
static std::string getPath(const std::string& name);