package app.brest.utils.app.brest.game;

import java.io.Serializable;

import app.brest.testmin3d.ARActivity;
import app.brest.utils.SensorsManager;
import app.brest.utils.geometry.GPSPoint;

/**
 * Created by ptitcois on 20/08/16.
 */
public class Player implements Serializable{
    protected transient SensorsManager mSensors;

    public Player(ARActivity sm)
    {
        mSensors=new SensorsManager(sm);
    }

    public void setSensorsManager(SensorsManager sm)
    {
        mSensors=sm;
    }

    public SensorsManager getSensorsManager()
    {
        return mSensors;
    }

    public void onPause()
    {
        mSensors.onPause();
    }


    public void onResume(ARActivity act)
    {
        mSensors.onResume();
    }

    public GPSPoint getPosition()
    {
        return mSensors.getPosition();
    }

    public float getOrientation()
    {
        return mSensors.getOrientation();
    }

    public float getOrientationX()
    {
        return mSensors.getAzimuth();
    }

    public float getOrientationY()
    {
        return mSensors.getAngleY();
    }


    public float getOrientationZ()
    {
        return mSensors.getAngleZ();
    }

    public void newSensorManager(ARActivity act)
    {
        mSensors = new SensorsManager(act);
    }
}
