コード例 #1
0
ファイル: model_creators.cs プロジェクト: williammc/sentience
        /// <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);
        }
コード例 #2
0
ファイル: model_creators.cs プロジェクト: iManbot/monoslam
        /// <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;
        }