Tudat/Mathematics/GeometricShapes/conicalFrustum.cpp
//! Get parameter of conical frustum.
Get parameter of conical frustum.
Get parameter of conical frustum .
double ConicalFrustum::getParameter( const int index )
{
   switch( index )
   {
   case( 0 ):
       parameter_ = startRadius_;
       break;
   case( 1 ):
       parameter_ = length_;
       break;
   case( 2 ):
       parameter_ = coneHalfAngle_;
       break;
   default:
       std::string errorMessage = "Parameter " + std::to_string( index ) + "does not exist in ConicalFrustum.";
       throw std::runtime_error( errorMessage );
   }
   return parameter_;
}
double ConicalFrustum :: getParameter ( const int index ) { switch ( index ) { case ( 0 ) : parameter_ = startRadius_ ; break ; case ( 1 ) : parameter_ = length_ ; break ; case ( 2 ) : parameter_ = coneHalfAngle_ ; break ; default : std :: string errorMessage = " " + std :: to_string ( index ) + " " ; throw std :: runtime_error ( errorMessage ) ; } return parameter_ ; }
Get parameter of conical frustum.
Get parameter of conical frustum .
// Check which parameter is selected. // Return parameter.