/* * BaseShapes_impl.cpp * * Created on: Jun 18, 2010 * Author: crueger */ #include "Shapes/BaseShapes.hpp" #include "Shapes/BaseShapes_impl.hpp" #include "vector.hpp" #include "Helpers/Assert.hpp" #include bool Sphere_impl::isInside(const Vector &point){ return point.NormSquared()<=1; } bool Sphere_impl::isOnSurface(const Vector &point){ return fabs(point.NormSquared()-1)=1 && res.NormSquared()<=3,"To many or to few sides found for this Vector"); res.Normalize(); return res; } string Cuboid_impl::toString(){ return "Cuboid()"; } Shape Cuboid(){ Shape::impl_ptr impl = Shape::impl_ptr(new Cuboid_impl()); return Shape(impl); }