本文整理汇总了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);
}
}
}
示例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;
}
示例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;
}