Initial commit.
This commit is contained in:
commit
44b5f2392f
98 changed files with 11750 additions and 0 deletions
26
ball.cpp
Normal file
26
ball.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
#include "ball.h"
|
||||
#include "material.h"
|
||||
#include "model.h"
|
||||
#include "physics/shape.h"
|
||||
#include "physics/vector.h"
|
||||
#include "room.h"
|
||||
|
||||
using namespace mbostock;
|
||||
|
||||
Ball::Ball(const Vector& x, float radius)
|
||||
: sphere_(x, radius), model_(sphere_) {
|
||||
}
|
||||
|
||||
Model& Ball::model() {
|
||||
return model_;
|
||||
}
|
||||
|
||||
const Shape& Ball::shape() const {
|
||||
return sphere_;
|
||||
}
|
||||
|
||||
float Ball::slip() const {
|
||||
return model_.material().slip();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue