CCT.NUI.Core.OpenNI.OpenNIDataSourceFactory.CreateShapeDataSource C# (CSharp) Method

CreateShapeDataSource() public method

public CreateShapeDataSource ( ) : IShapeDataSource
return IShapeDataSource
        public IShapeDataSource CreateShapeDataSource()
        {
            return new ClusterShapeDataSource(this.CreateClusterDataSource());
        }

Same methods

OpenNIDataSourceFactory::CreateShapeDataSource ( ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings ) : IShapeDataSource
OpenNIDataSourceFactory::CreateShapeDataSource ( IClusterDataSource clusterdataSource ) : IShapeDataSource
OpenNIDataSourceFactory::CreateShapeDataSource ( IClusterDataSource clusterdataSource, ShapeDataSourceSettings shapeDataSourceSettings ) : IShapeDataSource

Usage Example

 private void StartDepthSource()
 {
     try
     {
         if (this.VideoSource == null)
         {
             Mouse.OverrideCursor = Cursors.Wait;
             this.dataSourceFactory = new OpenNIDataSourceFactory("config.xml");
             this.VideoSource = dataSourceFactory.CreateDepthImageDataSource();
             this.clusterdataSource = dataSourceFactory.CreateClusterDataSource(this.clusterDataSourceSettings);
             this.shapeDataSourceVideo = dataSourceFactory.CreateShapeDataSource(this.clusterdataSource, this.shapeDataSourceSettings);
             this.handDataSourceVideo = new HandDataSource(this.shapeDataSourceVideo, this.handDataSourceSettings);
             this.depthFrameFactory = new DepthDataFrameFactory(this.clusterdataSource.Size);
             this.VideoSource.Start();
             Mouse.OverrideCursor = Cursors.Arrow;
         }
         this.ToggleLayers();
     }
     catch (Exception exc)
     {
         MessageBox.Show("Error: " + exc.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }