helper: builde a NavSurface for a Surface More...
#include <NavSurfaceBuilder.h>
Public Member Functions | |
NavSurface * | build (const Surface &surface) const |
helper: builde a NavSurface for a Surface
Definition at line 8 of file NavSurfaceBuilder.h.
NavSurface * NavSurfaceBuilder::build | ( | const Surface & | surface | ) | const |
Definition at line 10 of file NavSurfaceBuilder.cc.
{ const Plane* plane = dynamic_cast<const Plane*>(&surface); if (plane != 0) { return new NavPlane( plane); } const Cylinder* cylinder = dynamic_cast<const Cylinder*>(&surface); if (cylinder != 0) { return new NavCylinder( cylinder); } const Cone* cone = dynamic_cast<const Cone*>(&surface); if (cone != 0) { return new NavCone( cone); } return 0; }