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


Java Vuforia.setHint方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:trc492,项目名称:Ftc2018RelicRecovery,代码行数:33,代码来源:FtcVuforia.java

示例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;
    }
 
开发者ID:FTC7393,项目名称:EVLib,代码行数:30,代码来源:VuforiaFrameFeeder.java

示例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;
    }
 
开发者ID:FTC7393,项目名称:EVLib,代码行数:30,代码来源:VuforiaFrameGrabberInit.java

示例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;
}
 
开发者ID:daemontus,项目名称:VuforiaTransparentVideo,代码行数:18,代码来源:VideoPlayback.java

示例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;
}
 
开发者ID:daemontus,项目名称:VuforiaLibGDX,代码行数:16,代码来源:ArActivity.java


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