Example #1
0
 /// <summary>
 /// returns true if the given feature is visible
 /// </summary>
 /// <param name="feat"></param>
 /// <returns></returns>
 public bool featureVisible(Feature feat)
 {
     if (!((feat.get_successful_measurement_flag()) && (feat.get_feature_measurement_model().fully_initialised_flag)))
     {
         if (feat.get_feature_measurement_model().fully_initialised_flag)
         {
             reconstructFeaturePosition(feat);
             int screen_x = 0;
             int screen_y = 0;
             projectFeature(feat, ref screen_x, ref screen_y);
             if ((screen_x > 0) && (screen_y > 0) && (screen_x < image_width) && (screen_y < image_height))
             {
                 Vector v = new Vector(2);
                 v[0] = screen_x;
                 v[1] = screen_y;
                 feat.set_h(v);
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(true);
     }
 }