Package com.indooratlas.android.sdk
Class IARoute.Leg
- java.lang.Object
-
- com.indooratlas.android.sdk.IARoute.Leg
-
- All Implemented Interfaces:
Parcelable
- Enclosing class:
- IARoute
public static class IARoute.Leg extends Object implements Parcelable
Object representing the line segment between twoIARoute.Points. Includes the distance and direction of the segment as well as the start and end points.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<IARoute.Leg>CREATOR-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description Leg(Parcel in)Leg(IARoute.Point begin, IARoute.Point end, double length, double direction, Integer index)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()IARoute.PointgetBegin()Get theIARoute.Pointrepresenting the beginning of this leg.doublegetDirection()Get the direction of the line segment in ENU coordinates in degrees.IntegergetEdgeIndex()Get the zero-based index of the edge corresponding to this leg in the original JSON graph.IARoute.PointgetEnd()Get theIARoute.Pointrepresenting the end of this leg.doublegetLength()Get the length of the line segment in meters.voidwriteToParcel(Parcel parcel, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<IARoute.Leg> CREATOR
-
-
Constructor Detail
-
Leg
public Leg(IARoute.Point begin, IARoute.Point end, double length, double direction, Integer index)
Constructor
-
Leg
public Leg(Parcel in)
-
-
Method Detail
-
getLength
public double getLength()
Get the length of the line segment in meters.
-
getDirection
public double getDirection()
Get the direction of the line segment in ENU coordinates in degrees. 0 is North and 90 is East.
-
getBegin
public IARoute.Point getBegin()
Get theIARoute.Pointrepresenting the beginning of this leg.
-
getEnd
public IARoute.Point getEnd()
Get theIARoute.Pointrepresenting the end of this leg.
-
getEdgeIndex
public Integer getEdgeIndex()
Get the zero-based index of the edge corresponding to this leg in the original JSON graph. If this is a virtual leg, for example, a segment connecting an off-graph starting point to the graph, returns null.
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel parcel, int flags)
- Specified by:
writeToParcelin interfaceParcelable
-
-