/*
MobileRobots Advanced Robotics Navigation and Localization (ARNL)
Version 1.7.1

Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc.

All Rights Reserved.

MobileRobots Inc does not make any representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

The license for this software is distributed as LICENSE.txt in the top
level directory.

robots@mobilerobots.com
MobileRobots
10 Columbia Drive
Amherst, NH 03031
800-639-9481

*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.29
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.BaseArnl;

  import com.mobilerobots.Aria.*;
  import com.mobilerobots.ArNetworking.*;

public class ArLocalizationManager extends ArBaseLocalizationTask {
  private long swigCPtr;

  /* for internal use by swig only */
  public ArLocalizationManager(long cPtr, boolean cMemoryOwn) {
    super(BaseArnlJavaJNI.SWIGArLocalizationManagerUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  /* for internal use by swig only */
  public static long getCPtr(ArLocalizationManager obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      BaseArnlJavaJNI.delete_ArLocalizationManager(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  public ArLocalizationManager(ArRobot robot, ArMapInterface ariaMap) {
    this(BaseArnlJavaJNI.new_ArLocalizationManager(ArRobot.getCPtr(robot), ArMapInterface.getCPtr(ariaMap)), true);
  }

  public boolean fuseTwoDistributions(ArPose m1, SWIGTYPE_p_ArMatrix V1, double s1, double threshold1, ArPose m2, SWIGTYPE_p_ArMatrix V2, double s2, double threshold2, ArPose mean, SWIGTYPE_p_ArMatrix Var, SWIGTYPE_p_double s, SWIGTYPE_p_double threshold) {
    return BaseArnlJavaJNI.ArLocalizationManager_fuseTwoDistributions(swigCPtr, ArPose.getCPtr(m1), SWIGTYPE_p_ArMatrix.getCPtr(V1), s1, threshold1, ArPose.getCPtr(m2), SWIGTYPE_p_ArMatrix.getCPtr(V2), s2, threshold2, ArPose.getCPtr(mean), SWIGTYPE_p_ArMatrix.getCPtr(Var), SWIGTYPE_p_double.getCPtr(s), SWIGTYPE_p_double.getCPtr(threshold));
  }

  public boolean addLocalizationTask(ArBaseLocalizationTask loca) {
    return BaseArnlJavaJNI.ArLocalizationManager_addLocalizationTask(swigCPtr, ArBaseLocalizationTask.getCPtr(loca));
  }

  public boolean removeLocalizationTask(ArBaseLocalizationTask loca) {
    return BaseArnlJavaJNI.ArLocalizationManager_removeLocalizationTask(swigCPtr, ArBaseLocalizationTask.getCPtr(loca));
  }

  public boolean findLocalizationMeanVar(ArPose mean, SWIGTYPE_p_ArMatrix Var) {
    return BaseArnlJavaJNI.ArLocalizationManager_findLocalizationMeanVar(swigCPtr, ArPose.getCPtr(mean), SWIGTYPE_p_ArMatrix.getCPtr(Var));
  }

  public void setCorrectRobotFlag(boolean a) {
    BaseArnlJavaJNI.ArLocalizationManager_setCorrectRobotFlag(swigCPtr, a);
  }

  public void setRobotPose(ArPose pose, ArPose spread, int nSam) {
    BaseArnlJavaJNI.ArLocalizationManager_setRobotPose__SWIG_0(swigCPtr, ArPose.getCPtr(pose), ArPose.getCPtr(spread), nSam);
  }

  public void setRobotPose(ArPose pose, ArPose spread) {
    BaseArnlJavaJNI.ArLocalizationManager_setRobotPose__SWIG_1(swigCPtr, ArPose.getCPtr(pose), ArPose.getCPtr(spread));
  }

  public void setRobotPose(ArPose pose) {
    BaseArnlJavaJNI.ArLocalizationManager_setRobotPose__SWIG_2(swigCPtr, ArPose.getCPtr(pose));
  }

  public boolean localizeRobotAtHomeBlocking(double distSpread, double angleSpread) {
    return BaseArnlJavaJNI.ArLocalizationManager_localizeRobotAtHomeBlocking(swigCPtr, distSpread, angleSpread);
  }

  public double getLocalizationScore() {
    return BaseArnlJavaJNI.ArLocalizationManager_getLocalizationScore(swigCPtr);
  }

  public void setLocalizationScore(double f) {
    BaseArnlJavaJNI.ArLocalizationManager_setLocalizationScore(swigCPtr, f);
  }

  public double getLocalizationThreshold() {
    return BaseArnlJavaJNI.ArLocalizationManager_getLocalizationThreshold(swigCPtr);
  }

  public void setLocalizationThreshold(double t) {
    BaseArnlJavaJNI.ArLocalizationManager_setLocalizationThreshold(swigCPtr, t);
  }

  public ArBaseLocalizationTask getLightLocalizationPtr() {
    long cPtr = BaseArnlJavaJNI.ArLocalizationManager_getLightLocalizationPtr(swigCPtr);
    return (cPtr == 0) ? null : new ArBaseLocalizationTask(cPtr, false);
  }

}
