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


Java TrackerManager类代码示例

本文整理汇总了Java中com.vuforia.TrackerManager的典型用法代码示例。如果您正苦于以下问题:Java TrackerManager类的具体用法?Java TrackerManager怎么用?Java TrackerManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TrackerManager类属于com.vuforia包,在下文中一共展示了TrackerManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doInitTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doInitTrackers() {
    // Indicate if the trackers were initialized correctly
    boolean result = true;

    // Initialize the image tracker:
    TrackerManager trackerManager = TrackerManager.getInstance();
    Tracker tracker = trackerManager.initTracker(ObjectTracker.getClassType());

    if (tracker == null) {
        Log.d(LOGTAG, "Failed to initialize ImageTracker.");
        result = false;
    }

    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:17,代码来源:ArActivity.java

示例2: onVuforiaUpdate

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public void onVuforiaUpdate(State state)
{
    if (mSwitchDatasetAsap)
    {
        mSwitchDatasetAsap = false;
        TrackerManager tm = TrackerManager.getInstance();
        ObjectTracker ot = (ObjectTracker) tm.getTracker(ObjectTracker
            .getClassType());
        if (ot == null || mCurrentDataset == null
            || ot.getActiveDataSet() == null)
        {
            Log.d(LOGTAG, "Failed to swap datasets");
            return;
        }

        doUnloadTrackersData();
        doLoadTrackersData();
    }
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:21,代码来源:ImageTargets.java

示例3: doInitTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doInitTrackers()
{
    // Indicate if the trackers were initialized correctly
    boolean result = true;

    TrackerManager tManager = TrackerManager.getInstance();
    Tracker tracker;

    // Trying to initialize the image tracker
    tracker = tManager.initTracker(ObjectTracker.getClassType());
    if (tracker == null)
    {
        Log.e(
            LOGTAG,
            "Tracker not initialized. Tracker already initialized or the camera is already started");
        result = false;
    } else
    {
        Log.i(LOGTAG, "Tracker successfully initialized");
    }
    return result;
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:24,代码来源:ImageTargets.java

示例4: doInitTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doInitTrackers()
{
    // Indicate if the trackers were initialized correctly
    boolean result = true;
    
    // Initialize the image tracker:
    TrackerManager trackerManager = TrackerManager.getInstance();
    Tracker tracker = trackerManager.initTracker(ObjectTracker
        .getClassType());
    if (tracker == null)
    {
        Log.d(LOGTAG, "Failed to initialize ObjectTracker.");
        result = false;
    }
    
    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaTransparentVideo,代码行数:19,代码来源:VideoPlayback.java

示例5: doStartTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStartTrackers()
{
    // Indicate if the trackers were started correctly
    boolean result = true;
    
    Tracker objectTracker = TrackerManager.getInstance().getTracker(
        ObjectTracker.getClassType());
    if (objectTracker != null)
    {
        objectTracker.start();
        Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);
    } else
        result = false;
    
    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaTransparentVideo,代码行数:18,代码来源:VideoPlayback.java

示例6: doLoadTrackersData

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doLoadTrackersData() {
    // Get the image tracker:
    TrackerManager trackerManager = TrackerManager.getInstance();
    ObjectTracker imageTracker = (ObjectTracker) trackerManager.getTracker(ObjectTracker.getClassType());

    if (imageTracker == null) {
        Log.d(LOGTAG, "Failed to load tracking data set because the ImageTracker has not been initialized.");
        return false;
    }

    // Create the data sets:
    posterDataSet = imageTracker.createDataSet();
    if (posterDataSet == null) {
        Log.d(LOGTAG, "Failed to create a new tracking data.");
        return false;
    }

    // Load the data sets:
    if (!posterDataSet.load("StonesAndChips.xml", STORAGE_TYPE.STORAGE_APPRESOURCE)) {
        Log.d(LOGTAG, "Failed to load data set.");
        return false;
    }

    // Activate the data set:
    if (!imageTracker.activateDataSet(posterDataSet)) {
        Log.d(LOGTAG, "Failed to activate data set.");
        return false;
    }

    Log.d(LOGTAG, "Successfully loaded and activated data set.");
    return true;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:34,代码来源:ArActivity.java

示例7: doStartTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStartTrackers() {
    // Indicate if the trackers were started correctly
    boolean result = true;

    Tracker imageTracker = TrackerManager.getInstance().getTracker(
            ObjectTracker.getClassType());
    if (imageTracker != null) {
        imageTracker.start();
        Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 1);
    } else
        result = false;

    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:16,代码来源:ArActivity.java

示例8: doStopTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStopTrackers() {
    // Indicate if the trackers were stopped correctly
    boolean result = true;

    Tracker imageTracker = TrackerManager.getInstance().getTracker(
            ObjectTracker.getClassType());
    if (imageTracker != null)
        imageTracker.stop();
    else
        result = false;

    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:15,代码来源:ArActivity.java

示例9: doUnloadTrackersData

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doUnloadTrackersData() {
    // Indicate if the trackers were unloaded correctly
    boolean result = true;

    // Get the image tracker:
    TrackerManager trackerManager = TrackerManager.getInstance();
    ObjectTracker imageTracker = (ObjectTracker) trackerManager
            .getTracker(ObjectTracker.getClassType());
    if (imageTracker == null) {
        Log.d(LOGTAG, "Failed to destroy the tracking data set because the ImageTracker has not been initialized.");
        return false;
    }

    if (posterDataSet != null) {
        if (imageTracker.getActiveDataSet() == posterDataSet && !imageTracker.deactivateDataSet(posterDataSet)) {
            Log.d(LOGTAG, "Failed to destroy the tracking data set StonesAndChips because the data set could not be deactivated.");
            result = false;
        } else if (!imageTracker.destroyDataSet(posterDataSet)) {
            Log.d(LOGTAG, "Failed to destroy the tracking data set StonesAndChips.");
            result = false;
        }

        posterDataSet = null;
    }

    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:29,代码来源:ArActivity.java

示例10: doDeinitTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doDeinitTrackers() {

    // Deinit the image tracker:
    TrackerManager trackerManager = TrackerManager.getInstance();
    trackerManager.deinitTracker(ObjectTracker.getClassType());

    return true;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:10,代码来源:ArActivity.java

示例11: doUnloadTrackersData

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doUnloadTrackersData()
{
    // Indicate if the trackers were unloaded correctly
    boolean result = true;

    TrackerManager tManager = TrackerManager.getInstance();
    ObjectTracker objectTracker = (ObjectTracker) tManager
        .getTracker(ObjectTracker.getClassType());
    if (objectTracker == null)
        return false;

    if (mCurrentDataset != null && mCurrentDataset.isActive())
    {
        if (objectTracker.getActiveDataSet().equals(mCurrentDataset)
            && !objectTracker.deactivateDataSet(mCurrentDataset))
        {
            result = false;
        } else if (!objectTracker.destroyDataSet(mCurrentDataset))
        {
            result = false;
        }

        mCurrentDataset = null;
    }

    return result;
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:29,代码来源:ImageTargets.java

示例12: doStartTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStartTrackers()
{
    // Indicate if the trackers were started correctly
    boolean result = true;

    Tracker objectTracker = TrackerManager.getInstance().getTracker(
        ObjectTracker.getClassType());
    if (objectTracker != null)
        objectTracker.start();

    return result;
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:14,代码来源:ImageTargets.java

示例13: doStopTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStopTrackers()
{
    // Indicate if the trackers were stopped correctly
    boolean result = true;

    Tracker objectTracker = TrackerManager.getInstance().getTracker(
        ObjectTracker.getClassType());
    if (objectTracker != null)
        objectTracker.stop();

    return result;
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:14,代码来源:ImageTargets.java

示例14: doDeinitTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doDeinitTrackers()
{
    // Indicate if the trackers were deinitialized correctly
    boolean result = true;

    TrackerManager tManager = TrackerManager.getInstance();
    tManager.deinitTracker(ObjectTracker.getClassType());

    return result;
}
 
开发者ID:mattrayner,项目名称:cordova-plugin-vuforia,代码行数:12,代码来源:ImageTargets.java

示例15: doStopTrackers

import com.vuforia.TrackerManager; //导入依赖的package包/类
@Override
public boolean doStopTrackers()
{
    // Indicate if the trackers were stopped correctly
    boolean result = true;
    
    Tracker objectTracker = TrackerManager.getInstance().getTracker(
        ObjectTracker.getClassType());
    if (objectTracker != null)
        objectTracker.stop();
    else
        result = false;
    
    return result;
}
 
开发者ID:daemontus,项目名称:VuforiaTransparentVideo,代码行数:16,代码来源:VideoPlayback.java


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