当前位置: 首页>>代码示例>>C#>>正文


C# Context.AddLicense方法代码示例

本文整理汇总了C#中OpenNI.Context.AddLicense方法的典型用法代码示例。如果您正苦于以下问题:C# Context.AddLicense方法的具体用法?C# Context.AddLicense怎么用?C# Context.AddLicense使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenNI.Context的用法示例。


在下文中一共展示了Context.AddLicense方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OpenNIContext

    // private ctor for singleton
    private OpenNIContext()
    {
        this.context = new Context();
        if (null == context)
        {
            return;
        }

        if (oniFile != "") {
            context.OpenFileRecording(oniFile);
        }

        // NITE license from OpenNI.org
        License ll = new License();
        ll.Key = "0KOIk2JeIBYClPWVnMoRKn5cdY4=";
        ll.Vendor = "PrimeSense";
        context.AddLicense(ll);

        this.Depth = openNode(NodeType.Depth) as DepthGenerator;
        this.mirror = this.Depth.MirrorCapability;
        if (oniFile == "") {
            this.Mirror = true;
        }
    }
开发者ID:corybarr,项目名称:PlanetariumSwarm,代码行数:25,代码来源:OpenNIContext.cs

示例2: Awake

    public void Awake()
    {
        Debug.Log("Initing OpenNI" + (LoadFromXML ? "(" + XMLFilename + ")" : ""));
        try {
            this.context = LoadFromXML ? new Context(XMLFilename) : new Context();
        }
        catch (Exception ex) {
            Debug.LogError("Error opening OpenNI context: " + ex.Message);
            return;
        }

        // add license manually if not loading from XML
        if (!LoadFromXML) {
            License ll = new License();
            ll.Key = LicenseKey;
            ll.Vendor = LicenseVendor;
            context.AddLicense(ll);
        }

        if (LoadFromRecording)
        {
            context.OpenFileRecordingEx(RecordingFilename);
            Player player = openNode(NodeType.Player) as Player;
            player.PlaybackSpeed = 0.0;
            StartCoroutine(ReadNextFrameFromRecording(player));
        }

        this.Depth = openNode(NodeType.Depth) as DepthGenerator;
        this.mirrorCap = this.Depth.MirrorCapability;
        if (!LoadFromRecording) {
            this.mirrorCap.SetMirror(Mirror);
            mirrorState = Mirror;
        }
    }
开发者ID:CodeStrumpet,项目名称:Elemental,代码行数:34,代码来源:OpenNIContext.cs

示例3: Open

        void Open(int i)
		{
			try
			{
				Close(i);


                OpenNIState state = FState[i];
                var context = new Context();
				FState[i].Context = context;
                context.AddLicense(FLicense);
                context.GlobalMirror = false;


                NodeInfoList list = context.EnumerateProductionTrees(global::OpenNI.NodeType.Device, null);
                NodeInfo node = null;
                if (FPinInNodes[i] != "")
                {
                    foreach (NodeInfo nodeitem in list)
                    {
                        if (nodeitem.CreationInfo == FPinInNodes[i])
                        {
                            node = nodeitem;
                            break;
                        }
                    }

                    if (node == null)
                        throw (new Exception("This device is unavailable. Check upstream ListDevices node"));

                    context.CreateProductionTree(node);
                }

                state.DepthGenerator = new DepthGenerator(context);
                MapOutputMode depthMode = new MapOutputMode();
                depthMode.FPS = 30;
                depthMode.XRes = 640;
                depthMode.YRes = 480;
                state.DepthGenerator.MapOutputMode = depthMode;
                state.DepthGenerator.StartGenerating();

                state.Start();

                FPinOutContext[i] = state;
                FPinOutStatus[i] = "OK";
			}
			catch (Exception e)
			{
				Close(i);
				FPinOutStatus[i] = e.Message;
			}
		}
开发者ID:smakhtin,项目名称:VVVV.Nodes.Image,代码行数:52,代码来源:ContextNode.cs


注:本文中的OpenNI.Context.AddLicense方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。