1 /* 2 * Copyright (C) 2016 The Android Open Source Project 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.android.cts.verifier.sensors.sixdof.Utils.Path.PathUtilityClasses; 17 18 import com.android.cts.verifier.sensors.sixdof.Utils.Manager; 19 20 /** 21 * Waypoint class used to give a waypoint a structure. 22 */ 23 public class Waypoint { 24 private final float[] mCoordinates; 25 private final boolean mUserGenerated; 26 private final Manager.Lap mLap; 27 28 /** 29 * Constructor for the class used to create the waypoint. 30 * 31 * @param coordinates the location of the new waypoint 32 * @param userGenerated indicates whether it is a marker or a path point 33 * @param lap the phase of the test the waypoint is in 34 */ Waypoint(float[] coordinates, boolean userGenerated, Manager.Lap lap)35 public Waypoint(float[] coordinates, boolean userGenerated, Manager.Lap lap) { 36 this.mCoordinates = coordinates; 37 this.mUserGenerated = userGenerated; 38 this.mLap = lap; 39 } 40 41 /** 42 * Returns the mCoordinates of the waypoint. 43 */ getCoordinates()44 public float[] getCoordinates() { 45 return mCoordinates; 46 } 47 48 /** 49 * Returns who placed the waypoint. 50 */ isUserGenerated()51 public boolean isUserGenerated() { 52 return mUserGenerated; 53 } 54 55 /** 56 * Returns the mLap the waypoint was placed on. 57 */ getLap()58 public Manager.Lap getLap() { 59 return mLap; 60 } 61 } 62