Example #1
0
        public bool IsPedestrianCrossingAllowed()
        {
            if (pedestrianCrossingAllowed == TernaryBool.Undefined)
            {
                return(defaultPedestrianCrossingAllowed);
            }

            return(TernaryBoolUtil.ToBool(pedestrianCrossingAllowed));
        }
Example #2
0
        public bool IsLaneChangingAllowedWhenGoingStraight()
        {
            if (straightLaneChangingAllowed == TernaryBool.Undefined)
            {
                return(defaultStraightLaneChangingAllowed);
            }

            return(TernaryBoolUtil.ToBool(straightLaneChangingAllowed));
        }
Example #3
0
        public bool IsEnteringBlockedJunctionAllowed()
        {
            if (enterWhenBlockedAllowed == TernaryBool.Undefined)
            {
                return(defaultEnterWhenBlockedAllowed);
            }

            return(TernaryBoolUtil.ToBool(enterWhenBlockedAllowed));
        }
Example #4
0
        public bool IsUturnAllowed()
        {
            if (uturnAllowed == TernaryBool.Undefined)
            {
                return(defaultUturnAllowed);
            }

            return(TernaryBoolUtil.ToBool(uturnAllowed));
        }
Example #5
0
        public bool IsFarTurnOnRedAllowed()
        {
            if (farTurnOnRedAllowed == TernaryBool.Undefined)
            {
                return(defaultFarTurnOnRedAllowed);
            }

            return(TernaryBoolUtil.ToBool(farTurnOnRedAllowed));
        }
Example #6
0
        public bool IsLaneChangingAllowedWhenGoingStraight()
        {
            if (straightLaneChangingAllowed == TernaryBool.Undefined)
            {
                return(Options.allowLaneChangesWhileGoingStraight);
            }

            return(TernaryBoolUtil.ToBool(straightLaneChangingAllowed));
        }
Example #7
0
        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));
        }
Example #9
0
        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);
        }
Example #10
0
 public bool IsNearTurnOnRedAllowed()
 {
     return(nearTurnOnRedAllowed == TernaryBool.Undefined
                ? defaultNearTurnOnRedAllowed
                : TernaryBoolUtil.ToBool(nearTurnOnRedAllowed));
 }
Example #11
0
 public bool IsUturnAllowed()
 {
     return(uturnAllowed == TernaryBool.Undefined
                ? defaultUturnAllowed
                : TernaryBoolUtil.ToBool(uturnAllowed));
 }
Example #12
0
        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);
        }