Initial commit.
This commit is contained in:
commit
44b5f2392f
98 changed files with 11750 additions and 0 deletions
47
block.h
Normal file
47
block.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#ifndef MBOSTOCK_BLOCK_H
|
||||
#define MBOSTOCK_BLOCK_H
|
||||
|
||||
#include "model.h"
|
||||
#include "physics/shape.h"
|
||||
#include "room_object.h"
|
||||
|
||||
namespace mbostock {
|
||||
|
||||
class AxisAlignedBlock : public RoomObject {
|
||||
public:
|
||||
AxisAlignedBlock(const Vector& min, const Vector& max);
|
||||
|
||||
virtual Model& model();
|
||||
virtual const Shape& shape() const;
|
||||
virtual float slip() const;
|
||||
|
||||
void setMaterial(const Material& m);
|
||||
void setTopMaterial(const Material& m);
|
||||
|
||||
protected:
|
||||
const AxisAlignedBox box_;
|
||||
AxisAlignedBoxModel model_;
|
||||
};
|
||||
|
||||
class Block : public RoomObject {
|
||||
public:
|
||||
Block(const Vector& c, const Vector& x, const Vector& y, const Vector& z);
|
||||
|
||||
virtual Model& model();
|
||||
virtual const Shape& shape() const;
|
||||
virtual float slip() const;
|
||||
|
||||
void setMaterial(const Material& m);
|
||||
void setTopMaterial(const Material& m);
|
||||
|
||||
private:
|
||||
const Box box_;
|
||||
BoxModel model_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue