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


C# DataSet.GetTrackable方法代码示例

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


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

示例1: DestroyTrackables

    private void DestroyTrackables(DataSet dataSet)
    {
        int numTrackables = dataSet.GetNumTrackables();

        for (int i = 0; i < numTrackables; ++i)
        {
            DataSetTrackableBehaviour objToDestroy = dataSet.GetTrackable(i);
            if (objToDestroy != null)
            {
                GameObject.Destroy(objToDestroy.gameObject);
            }
        }
    }
开发者ID:Bogdan-p,项目名称:ZXing.Net,代码行数:13,代码来源:ImageTracker.cs

示例2: ActivateDataSet

    // Activates the given dataset.
    // If another dataset is currently active, then this call fails as the
    // other dataset needs to be explicitly deactivated first.
    // Datasets can only be activated when the tracker is not working.
    public bool ActivateDataSet(DataSet dataSet)
    {
        if (dataSet == null)
        {
            Debug.LogError("Dataset is null.");
            return false;
        }

        if (imageTrackerActivateDataSet(dataSet.DataSetPtr) == 0)
        {
            Debug.LogError("Could not activate dataset.");
            return false;
        }

        QCARManager.Instance.Reinit();

        // Activate all Trackables.
        int numTrackables = dataSet.GetNumTrackables();
        for (int i = 0; i < numTrackables; ++i)
        {
            TrackableBehaviour trackable = dataSet.GetTrackable(i);
            if (trackable != null)
            {
                trackable.enabled = true;
            }
        }

        mActiveDataSet = dataSet;
        return true;
    }
开发者ID:Bogdan-p,项目名称:ZXing.Net,代码行数:34,代码来源:ImageTracker.cs

示例3: DeactivateDataSet

    // Deactivates the given dataset.
    // This can only be done when the tracker is not running.
    public bool DeactivateDataSet(DataSet dataSet)
    {
        if (dataSet == null)
        {
            Debug.LogError("Dataset is null.");
            return false;
        }

        if (imageTrackerDeactivateDataSet(dataSet.DataSetPtr) == 0)
        {
            Debug.LogError("Could not deactivate dataset.");
            return false;
        }

        // Deactivate all Trackables.
        int numTrackables = dataSet.GetNumTrackables();
        for (int i = 0; i < numTrackables; ++i)
        {
            TrackableBehaviour trackable = dataSet.GetTrackable(i);
            if (trackable != null)
            {
                trackable.enabled = false;
            }
        }

        mActiveDataSet = null;
        return true;
    }
开发者ID:Bogdan-p,项目名称:ZXing.Net,代码行数:30,代码来源:ImageTracker.cs


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