本文整理汇总了Java中com.vuforia.Vuforia.setHint方法的典型用法代码示例。如果您正苦于以下问题:Java Vuforia.setHint方法的具体用法?Java Vuforia.setHint怎么用?Java Vuforia.setHint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vuforia.Vuforia
的用法示例。
在下文中一共展示了Vuforia.setHint方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FtcVuforia
import com.vuforia.Vuforia; //导入方法依赖的package包/类
/**
* Constructor: Create an instance of this object. It initializes Vuforia with the specified target images and
* other parameters.
*
* @param licenseKey specifies the Vuforia license key.
* @param cameraViewId specifies the camera view ID on the activity, -1 if none given.
* @param cameraDir specifies which camera to use (front or back).
* @param trackablesFile specifies the XML file that contains the target info, can be null.
* @param numTargets specifies the number of simultaneous trackable targets.
* @param cameraMonitorFeedback specifies the feedback image showing the orientation of the target.
*/
public FtcVuforia(
String licenseKey, int cameraViewId, VuforiaLocalizer.CameraDirection cameraDir,
String trackablesFile, int numTargets,
VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback)
{
this.cameraDir = cameraDir;
//
// If no camera view ID, do not activate camera monitor view to save power.
//
VuforiaLocalizer.Parameters params =
cameraViewId == -1? new VuforiaLocalizer.Parameters(): new VuforiaLocalizer.Parameters(cameraViewId);
params.vuforiaLicenseKey = licenseKey;
params.cameraDirection = cameraDir;
params.cameraMonitorFeedback = cameraMonitorFeedback;
localizer = ClassFactory.createVuforiaLocalizer(params);
Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, numTargets);
if (trackablesFile != null)
{
targetList = localizer.loadTrackablesFromAsset(trackablesFile);
}
}
示例2: init
import com.vuforia.Vuforia; //导入方法依赖的package包/类
/**
* Initialize vuforia
* This method takes a few seconds to complete
*
* @param licenseKey the Vuforia PTC licence key from https://developer.vuforia.com/license-manager
* @param cameraMonitorViewIdParent the place in the layout where the camera display is
* @param widthRequest the width to scale the image to for the FrameGrabber
* @param heightRequest the height to scale the image to for the FrameGrabber
* @return the VuforiaFrameFeeder object
*/
public static VuforiaFrameFeeder init(String licenseKey, @IdRes int cameraMonitorViewIdParent, int widthRequest, int heightRequest) {
//display the camera on the screen
Parameters params = new Parameters(cameraMonitorViewIdParent);
//do not display the camera on the screen
// VuforiaLocalizer.Parameters params = new VuforiaLocalizer.Parameters();
params.cameraDirection = CameraDirection.BACK;
params.vuforiaLicenseKey = licenseKey;
params.cameraMonitorFeedback = Parameters.CameraMonitorFeedback.AXES;
//create a new VuforiaFrameFeeder object (this takes a few seconds)
VuforiaFrameFeeder vuforia = new VuforiaFrameFeeder(params, widthRequest, heightRequest);
//there are 4 beacons, so set the max image targets to 4
Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 4);
return vuforia;
}
示例3: init
import com.vuforia.Vuforia; //导入方法依赖的package包/类
/**
* Initialize vuforia
* This method takes a few seconds to complete
*
* @param licenseKey the Vuforia PTC licence key from https://developer.vuforia.com/license-manager
* @param cameraMonitorViewIdParent the place in the layout where the camera display is
* @param widthRequest the width to scale the image to for the FrameGrabber
* @param heightRequest the height to scale the image to for the FrameGrabber
* @return the VuforiaFrameGrabberInit object
*/
public static VuforiaFrameGrabberInit init(String licenseKey, @IdRes int cameraMonitorViewIdParent, int widthRequest, int heightRequest) {
//display the camera on the screen
Parameters params = new Parameters(cameraMonitorViewIdParent);
//do not display the camera on the screen
// VuforiaLocalizer.Parameters params = new VuforiaLocalizer.Parameters();
params.cameraDirection = CameraDirection.BACK;
params.vuforiaLicenseKey = licenseKey;
params.cameraMonitorFeedback = Parameters.CameraMonitorFeedback.AXES;
//create a new VuforiaFrameGrabberInit object (this takes a few seconds)
VuforiaFrameGrabberInit vuforia = new VuforiaFrameGrabberInit(params, widthRequest, heightRequest);
//there are 4 beacons, so set the max image targets to 4
Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 4);
return vuforia;
}
示例4: doStartTrackers
import com.vuforia.Vuforia; //导入方法依赖的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;
}
示例5: doStartTrackers
import com.vuforia.Vuforia; //导入方法依赖的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;
}