/* Obstruction.cpp * * Definition of the Obstruction class. */ #include "Obstruction.h" const double Obstruction::EPSILON = 0.000001; const double Obstruction::BUFFER = 0.001; const double Obstruction::DEF_DAMPING = 0.3; const double Obstruction::DEF_FRICTION = 0.9; Obstruction::Obstruction(double damping, double friction) : damping_(damping), friction_(friction) { // Nothing (more) to do } Obstruction::~Obstruction() { // Nothing to do } /* draw * * Draw the obstruction at the given coordinates. */ void Obstruction::draw(bool light) const { // To be handled virtually (void)light; } /* pathIntersect * * Determines if this obstruction is on the given path and returns the Beta value, * (the percent of path completed before collision). */ const double Obstruction::pathIntersect( const Path& path, double radius) const { // To be handled virtually (void)path; (void)radius; return 1.0 + EPSILON; } /* calcNormal * * Returns the normal of the given obstruction relative to a given point * (certain obstructions have fixed normals; others depend on where you are). */ const Tuple Obstruction::calcNormal(const Tuple& point) const { // To be handled virtually (void)point; return Tuple(); }