Move source to src.

This commit is contained in:
Mike Bostock 2012-12-14 10:06:18 -08:00
parent 6f246722f9
commit 2442efc1a6
82 changed files with 13 additions and 236 deletions

View file

@ -1,45 +0,0 @@
// -*- C++ -*-
#ifndef MBOSTOCK_ROOM_FORCE_H
#define MBOSTOCK_ROOM_FORCE_H
#include "physics/force.h"
#include "physics/shape.h"
#include "physics/vector.h"
namespace mbostock {
class Particle;
class Shape;
/**
* Defines a force that applies to the player when the player intersects a
* given shape. For example, this can be used to represent a fan blowing on
* the player, which the force of the fan stronger near the fan blades,
* falling off to zero outside of the fan's stream.
*/
class RoomForce : public UnaryForce {
public:
virtual const Shape& shape() const = 0;
};
/**
* A simple room force that applies a constant force within an axis-aligned
* box. More elaborate forces can be approximated by composing multiple (even
* overlapping) constant room forces.
*/
class ConstantRoomForce : public RoomForce {
public:
ConstantRoomForce(const Vector& min, const Vector& max, const Vector& f);
virtual const Shape& shape() const;
virtual Vector force(const Particle& p);
private:
AxisAlignedBox box_;
Vector force_;
};
}
#endif