1 /* 2 * Copyright (C) 2015 Alberto Irurueta Carro (alberto@irurueta.com) 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.irurueta.ar.sfm; 17 18 /** 19 * Listener to be notified of events such as when triangulation starts, ends or 20 * when progress changes. 21 */ 22 public interface RobustSinglePoint3DTriangulatorListener { 23 24 /** 25 * Called when triangulation starts. 26 * 27 * @param triangulator reference to robust triangulator. 28 */ 29 void onTriangulateStart(final RobustSinglePoint3DTriangulator triangulator); 30 31 /** 32 * Called when triangulation ends. 33 * 34 * @param triangulator reference to robust triangulator. 35 */ 36 void onTriangulateEnd(final RobustSinglePoint3DTriangulator triangulator); 37 38 /** 39 * Called when robust triangulator iterates to refine a possible solution. 40 * 41 * @param triangulator reference to robust triangulator. 42 * @param iteration current iteration. 43 */ 44 void onTriangulateNextIteration(final RobustSinglePoint3DTriangulator triangulator, final int iteration); 45 46 /** 47 * Called when estimation progress changes significantly. 48 * 49 * @param triangulator reference to robust triangulator. 50 * @param progress progress of estimation expressed as a value between 0.0 51 * and 1.0. 52 */ 53 void onTriangulateProgressChange(final RobustSinglePoint3DTriangulator triangulator, final float progress); 54 }