Inheritance: VisionTrackerBase
Example #1
0
        VisionTrackerBase GetVisionTrackerInternal(EnvironmentObject env)
        {
            if (m_seeAll)
            {
                return(AdminVisionTracker.Tracker);
            }

            VisionTrackerBase tracker;

            if (m_visionTrackers.TryGetValue(env, out tracker) == false)
            {
                switch (env.VisibilityMode)
                {
                case VisibilityMode.AllVisible:
                    tracker = new AllVisibleVisionTracker(this, env);
                    break;

                case VisibilityMode.GlobalFOV:
                    tracker = new VisionTrackerGlobalFOV(this, env);
                    break;

                case VisibilityMode.LivingLOS:
                    tracker = new VisionTrackerLOS(this, env);
                    break;

                default:
                    throw new NotImplementedException();
                }

                m_visionTrackers[env] = tracker;
            }

            return(tracker);
        }
Example #2
0
        VisionTrackerBase GetVisionTrackerInternal(EnvironmentObject env)
        {
            if (m_seeAll)
                return AdminVisionTracker.Tracker;

            VisionTrackerBase tracker;

            if (m_visionTrackers.TryGetValue(env, out tracker) == false)
            {
                switch (env.VisibilityMode)
                {
                    case VisibilityMode.AllVisible:
                        tracker = new AllVisibleVisionTracker(this, env);
                        break;

                    case VisibilityMode.GlobalFOV:
                        tracker = new VisionTrackerGlobalFOV(this, env);
                        break;

                    case VisibilityMode.LivingLOS:
                        tracker = new VisionTrackerLOS(this, env);
                        break;

                    default:
                        throw new NotImplementedException();
                }

                m_visionTrackers[env] = tracker;
            }

            return tracker;
        }