CMS 3D CMS Logo

Public Member Functions

NavSurfaceBuilder Class Reference

helper: builde a NavSurface for a Surface More...

#include <NavSurfaceBuilder.h>

List of all members.

Public Member Functions

NavSurfacebuild (const Surface &surface) const

Detailed Description

helper: builde a NavSurface for a Surface

Definition at line 8 of file NavSurfaceBuilder.h.


Member Function Documentation

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;
}