public bool IsLaneChangingAllowedWhenGoingStraight() { if (straightLaneChangingAllowed == TernaryBool.Undefined) { return(defaultStraightLaneChangingAllowed); } return(TernaryBoolUtil.ToBool(straightLaneChangingAllowed)); }
public bool IsEnteringBlockedJunctionAllowed() { if (enterWhenBlockedAllowed == TernaryBool.Undefined) { return(defaultEnterWhenBlockedAllowed); } return(TernaryBoolUtil.ToBool(enterWhenBlockedAllowed)); }
public bool IsUturnAllowed() { if (uturnAllowed == TernaryBool.Undefined) { return(defaultUturnAllowed); } return(TernaryBoolUtil.ToBool(uturnAllowed)); }
public bool IsFarTurnOnRedAllowed() { if (farTurnOnRedAllowed == TernaryBool.Undefined) { return(defaultFarTurnOnRedAllowed); } return(TernaryBoolUtil.ToBool(farTurnOnRedAllowed)); }
public bool IsLaneChangingAllowedWhenGoingStraight() { if (straightLaneChangingAllowed == TernaryBool.Undefined) { return(Options.allowLaneChangesWhileGoingStraight); } return(TernaryBoolUtil.ToBool(straightLaneChangingAllowed)); }
public bool IsUturnAllowed() { if (uturnAllowed == TernaryBool.Undefined) { return(Options.allowUTurns); } return(TernaryBoolUtil.ToBool(uturnAllowed)); }
public bool IsEnteringBlockedJunctionAllowed() { //Log._Debug($"SegmentEndFlags.IsEnteringBlockedJunctionAllowed: this={this} enterWhenBlockedAllowed={enterWhenBlockedAllowed}"); if (enterWhenBlockedAllowed == TernaryBool.Undefined) { //Log._Debug($"SegmentEndFlags.IsEnteringBlockedJunctionAllowed: returning default: {GetDefaultEnteringBlockedJunctionAllowed()}"); return(GetDefaultEnteringBlockedJunctionAllowed()); } //Log._Debug($"SegmentEndFlags.IsEnteringBlockedJunctionAllowed: returning custom: {TernaryBoolUtil.ToBool(enterWhenBlockedAllowed)}"); return(TernaryBoolUtil.ToBool(enterWhenBlockedAllowed)); }
public bool IsDefault() { bool uturnIsDefault = uturnAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(uturnAllowed) == Options.allowUTurns; bool straightChangeIsDefault = straightLaneChangingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(straightLaneChangingAllowed) == Options.allowLaneChangesWhileGoingStraight; bool enterWhenBlockedIsDefault = enterWhenBlockedAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(enterWhenBlockedAllowed) == Options.allowEnterBlockedJunctions; bool pedCrossingIsDefault = pedestrianCrossingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(pedestrianCrossingAllowed); return(uturnIsDefault && straightChangeIsDefault && enterWhenBlockedIsDefault && pedCrossingIsDefault); }
public bool IsDefault() { bool uturnIsDefault = uturnAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(uturnAllowed) == GetDefaultUturnAllowed(); bool straightChangeIsDefault = straightLaneChangingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(straightLaneChangingAllowed) == GetDefaultLaneChangingAllowedWhenGoingStraight(); bool enterWhenBlockedIsDefault = enterWhenBlockedAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(enterWhenBlockedAllowed) == GetDefaultEnteringBlockedJunctionAllowed(); bool pedCrossingIsDefault = pedestrianCrossingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(pedestrianCrossingAllowed) == GetDefaultPedestrianCrossingAllowed(); return(uturnIsDefault && straightChangeIsDefault && enterWhenBlockedIsDefault && pedCrossingIsDefault); }