當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。