/// <summary> /// Returns an instance of the requested motion model (using new). Returns null if there was no match. /// </summary> /// <param name="type"></param> /// <returns></returns> public override Motion_Model create_model(String type) { // Try creating each model that we can and see if the name is the same // std::cout << "Creating a " << type << " motion model" << std::endl; Motion_Model pModel; pModel = new ZeroOrder_ThreeD_Motion_Model(); if (pModel.motion_model_type == type) { return(pModel); } else { pModel = null; } pModel = new Impulse_ThreeD_Motion_Model(); if (pModel.motion_model_type == type) { return(pModel); } else { pModel = null; } return(null); }
/// <summary> /// Returns an instance of the requested motion model (using new). Returns null if there was no match. /// </summary> /// <param name="type"></param> /// <returns></returns> public override Motion_Model create_model(String type) { // Try creating each model that we can and see if the name is the same // std::cout << "Creating a " << type << " motion model" << std::endl; Motion_Model pModel; pModel = new ZeroOrder_ThreeD_Motion_Model(); if (pModel.motion_model_type == type) return pModel; else pModel = null; pModel = new Impulse_ThreeD_Motion_Model(); if (pModel.motion_model_type == type) return pModel; else pModel = null; return null; }