コード例 #1
0
 //private Task task;
 //private Quad iconSpace;
 public PanelIcon(Game game, Task.MediaType _mediaType, Task.ManagerStatus _managerStatus, Task.ProgressStatus _progressStatus, String _mediaName, int _operatorID)
     : base(game)
 {
     Game.Components.Add(this);
     mediaType = _mediaType;
     managerStatus = _managerStatus;
     progressStatus = _progressStatus;
     mediaName = _mediaName;
     operatorID = _operatorID;
 }
コード例 #2
0
        /// Initializes a new instance of the AvateeringXNA class.
        public AvateeringXNA()
        {
            Window.Title = "Test1";
            IsFixedTimeStep = false;
            IsMouseVisible = true;

            //    Components.Add(new FrameRateCounter(this));  - откл. т.к. вызывает баг - меняет порядок отрисовки 3Д объектов

            // Setup the graphics device for rendering
            graphics = new GraphicsDeviceManager(this);
            presentationParameters = new PresentationParameters();
            SetScreenMode();
            graphics.PreparingDeviceSettings += GraphicsDevicePreparingDeviceSettings;
            graphics.SynchronizeWithVerticalRetrace = true;
            graphics.PreferMultiSampling = true;     // включили anti-aliasing
            graphics.SynchronizeWithVerticalRetrace = true;
              //  presentationParameters.MultiSampleCount = 4;

            Content.RootDirectory = "Content";

            // The Kinect sensor will use 640x480 for the color stream (default) and 640x480 for depth
            chooser = new KinectChooser(this, ColorImageFormat.RgbResolution640x480Fps30, DepthImageFormat.Resolution640x480Fps30);
            Services.AddService(typeof(KinectChooser), chooser);

            // Optionally set near mode for close range avateering (0.4m up to 3m)
            chooser.NearMode = true;

            // Optionally set seated mode for upper-body only tracking here (typically used with near mode for close to camera tracking)
            chooser.SeatedMode = true;

            // Adding these objects as XNA Game components enables automatic calls to the overridden LoadContent, Update, etc.. methods
            Components.Add(chooser);

            // Create a ground plane for the model to stand on
            //planarXzGrid = new GridXz(this, new Vector3(0, 0, 0), new Vector2(500, 500), new Vector2(10, 10), Color.Black);
            //Components.Add(planarXzGrid);
            //drawGrid = false;

            worldAxes = new CoordinateCross(this, 500);
            Components.Add(worldAxes);

            // Create the avatar animator
            //animator = new AvatarAnimator(this, RetargetMatrixHierarchyToAvatarMesh, AvateeringXNA.skeletonTranslationScaleFactor);
            //Components.Add(animator);

            // Drawing options

            skeletonDetected = true;

            // Setup the depth stream
            depthStream = new DepthStreamRenderer(this);

            // Setup the skeleton stream the same as depth stream
            skeletonStream = new SkeletonStreamRenderer(this, SkeletonToDepthMap);

            // Update Depth and Skeleton Stream size and location based on the back-buffer
            UpdateStreamSizeAndLocation();

            previousKeyboard = Keyboard.GetState();

            previousCollideResult2 = ContainmentType.Disjoint;

            CursorRight = new Cursor(this, "cursor_ball");

            CursorLeft = new Cursor(this, "cursor_ball");

              //  Video_box2 = new IconBoxVideo(this, "wildlife1");

              //  iconboxAudio1 = new IconBoxAudio(this, "Kalimba");

              //  iconboxPicture1 = new IconBoxPicture(this, "Lighthouse");

              //  iconboxText1 = new IconBoxText(this);

            BossPanel = new MainOperatorPanel(this);

            CurrentTask[0] = new Task(this, Task.MediaType.Audio, Task.ManagerStatus.Assigned, Task.ProgressStatus.New, Task.PresentationType.PanelIcon, "Kalimba", 12);
            CurrentTask[0].LoadContent(this);

            CurrentTask[1] = new Task(this, Task.MediaType.Video, Task.ManagerStatus.NotAssigned, Task.ProgressStatus.New, Task.PresentationType.PanelIcon, "wildlife1", 4);
            CurrentTask[1].LoadContent(this);

            CurrentTask[2] = new Task(this, Task.MediaType.Picture, Task.ManagerStatus.Finished, Task.ProgressStatus.New, Task.PresentationType.PanelIcon, "Lighthouse", 37);
            CurrentTask[2].LoadContent(this);
        }