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