public bool IsPedestrianCrossingAllowed() { if (pedestrianCrossingAllowed == TernaryBool.Undefined) { return(defaultPedestrianCrossingAllowed); } return(TernaryBoolUtil.ToBool(pedestrianCrossingAllowed)); }
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) == defaultUturnAllowed; bool nearTurnOnRedIsDefault = nearTurnOnRedAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(nearTurnOnRedAllowed) == defaultNearTurnOnRedAllowed; bool farTurnOnRedIsDefault = farTurnOnRedAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(farTurnOnRedAllowed) == defaultFarTurnOnRedAllowed; bool straightChangeIsDefault = straightLaneChangingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(straightLaneChangingAllowed) == defaultStraightLaneChangingAllowed; bool enterWhenBlockedIsDefault = enterWhenBlockedAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(enterWhenBlockedAllowed) == defaultEnterWhenBlockedAllowed; bool pedCrossingIsDefault = pedestrianCrossingAllowed == TernaryBool.Undefined || TernaryBoolUtil.ToBool(pedestrianCrossingAllowed) == defaultPedestrianCrossingAllowed; return(uturnIsDefault && nearTurnOnRedIsDefault && farTurnOnRedIsDefault && straightChangeIsDefault && enterWhenBlockedIsDefault && pedCrossingIsDefault); }
public bool IsNearTurnOnRedAllowed() { return(nearTurnOnRedAllowed == TernaryBool.Undefined ? defaultNearTurnOnRedAllowed : TernaryBoolUtil.ToBool(nearTurnOnRedAllowed)); }
public bool IsUturnAllowed() { return(uturnAllowed == TernaryBool.Undefined ? defaultUturnAllowed : TernaryBoolUtil.ToBool(uturnAllowed)); }
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); }