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


Java TangoPoseData.POSE_VALID属性代码示例

本文整理汇总了Java中com.google.atap.tangoservice.TangoPoseData.POSE_VALID属性的典型用法代码示例。如果您正苦于以下问题:Java TangoPoseData.POSE_VALID属性的具体用法?Java TangoPoseData.POSE_VALID怎么用?Java TangoPoseData.POSE_VALID使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.atap.tangoservice.TangoPoseData的用法示例。


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

示例1: updateMeasurements

/**
 * Updates every saved measurement. It re-queries the device pose at the time the measurement
 * was taken.
 */
public void updateMeasurements() {
    for (WallMeasurement wallMeasurement : mWallMeasurementList) {
        // We need to re query the depth transform when the measurements were taken.
        TangoSupport.TangoMatrixTransformData transform =
                TangoSupport.getMatrixTransformAtTime(wallMeasurement
                                .getDepthTransformTimeStamp(),
                        TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
                        TangoPoseData.COORDINATE_FRAME_CAMERA_DEPTH,
                        TangoSupport.TANGO_SUPPORT_ENGINE_OPENGL,
                        TangoSupport.TANGO_SUPPORT_ENGINE_TANGO);
        if (transform.statusCode == TangoPoseData.POSE_VALID) {
            wallMeasurement.update(transform.matrix);
            mRenderer.addWallMeasurement(wallMeasurement);
        } else {
            Log.d(TAG, "Could not get a valid transform from depth to area description at time "
                    + wallMeasurement
                    .getDepthTransformTimeStamp());
        }
    }
}
 
开发者ID:tdb-alcorn,项目名称:defect-party,代码行数:24,代码来源:FloorplanActivity.java

示例2: getStatusString

/**
 * Get the status of the Pose as a string.
 *
 * @param pose Pose from which status string is constructed.
 * @return
 */
public static String getStatusString(TangoPoseData pose) {
    String poseStatus;
    switch (pose.statusCode) {
        case TangoPoseData.POSE_UNKNOWN:
            poseStatus = "unknown";
            break;
        case TangoPoseData.POSE_INVALID:
            poseStatus = "invalid";
            break;
        case TangoPoseData.POSE_INITIALIZING:
            poseStatus = "initializing";
            break;
        case TangoPoseData.POSE_VALID:
            poseStatus = "valid";
            break;
        default:
            poseStatus = "unknown";
    }
    return poseStatus;
}
 
开发者ID:inovex,项目名称:tango-ar-navigation-example,代码行数:26,代码来源:TangoPoseUtilities.java

示例3: getStatusString

/**
 * Get the status of the Pose as a string.
 * @param pose: Pose from which status string is constructed.
 * @return
 */
public static String getStatusString(TangoPoseData pose){
    String poseStatus = "unknown";
    switch (pose.statusCode){
        case TangoPoseData.POSE_UNKNOWN:
            poseStatus = "unknown";
            break;
        case TangoPoseData.POSE_INVALID:
            poseStatus = "invalid";
            break;
        case TangoPoseData.POSE_INITIALIZING:
            poseStatus = "initializing";
            break;
        case TangoPoseData.POSE_VALID:
            poseStatus = "valid";
            break;
        default:
            poseStatus = "unknown";
    }
    return  poseStatus;
}
 
开发者ID:kupoko,项目名称:Tiresias,代码行数:25,代码来源:TangoPoseUtilities.java

示例4: getPoseStatus

private String getPoseStatus(TangoPoseData pose) {
    switch (pose.statusCode) {
    case TangoPoseData.POSE_INITIALIZING:
        return getString(R.string.pose_initializing);
    case TangoPoseData.POSE_INVALID:
        return getString(R.string.pose_invalid);
    case TangoPoseData.POSE_VALID:
        return getString(R.string.pose_valid);
    default:
        return getString(R.string.pose_unknown);
    }
}
 
开发者ID:erlandsona,项目名称:Bat-Vision,代码行数:12,代码来源:AreaLearningActivity.java

示例5: getQuaternionString

private String getQuaternionString(TangoPoseData pose) {
    final String eulerAngleString = (pose.statusCode == TangoPoseData.POSE_VALID) ? getEulerAngleString(
            pose) : "";

    return "[" + threeDec.format(
            pose.rotation[TangoPoseData.INDEX_ROTATION_X]) + "," + threeDec.format(
            pose.rotation[TangoPoseData.INDEX_ROTATION_Y])
            + "," + threeDec.format(
            pose.rotation[TangoPoseData.INDEX_ROTATION_Z]) + "," + threeDec.format(
            pose.rotation[TangoPoseData.INDEX_ROTATION_W])
            + "] " + eulerAngleString;

}
 
开发者ID:aroller,项目名称:tango-caminada,代码行数:13,代码来源:AreaLearningActivity.java

示例6: getPoseStatus

private String getPoseStatus(TangoPoseData pose) {
    switch (pose.statusCode) {
        case TangoPoseData.POSE_INITIALIZING:
            return getString(R.string.pose_initializing);
        case TangoPoseData.POSE_INVALID:
            return getString(R.string.pose_invalid);
        case TangoPoseData.POSE_VALID:
            return getString(R.string.pose_valid);
        default:
            return getString(R.string.pose_unknown);
    }
}
 
开发者ID:aroller,项目名称:tango-caminada,代码行数:12,代码来源:AreaLearningActivity.java

示例7: doWallMeasurement

/**
 * Use the TangoSupport library and point cloud data to calculate the plane at the specified
 * location in the color camera frame.
 * It returns the pose of the fitted plane in a TangoPoseData structure.
 */
private WallMeasurement doWallMeasurement(float u, float v, double rgbTimestamp) {
    TangoXyzIjData xyzIj = mPointCloudManager.getLatestXyzIj();

    if (xyzIj == null) {
        return null;
    }

    // We need to calculate the transform between the color camera at the
    // time the user clicked and the depth camera at the time the depth
    // cloud was acquired.
    TangoPoseData colorTdepthPose = TangoSupport.calculateRelativePose(
            rgbTimestamp, TangoPoseData.COORDINATE_FRAME_CAMERA_COLOR,
            xyzIj.timestamp, TangoPoseData.COORDINATE_FRAME_CAMERA_DEPTH);

    // Perform plane fitting with the latest available point cloud data.
    try {
        IntersectionPointPlaneModelPair intersectionPointPlaneModelPair =
                TangoSupport.fitPlaneModelNearClick(xyzIj, mIntrinsics,
                        colorTdepthPose, u, v);

        // Get the depth camera transform at the time the plane data was acquired.
        TangoSupport.TangoMatrixTransformData transform =
                TangoSupport.getMatrixTransformAtTime(xyzIj.timestamp,
                        TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION,
                        TangoPoseData.COORDINATE_FRAME_CAMERA_DEPTH,
                        TangoSupport.TANGO_SUPPORT_ENGINE_OPENGL,
                        TangoSupport.TANGO_SUPPORT_ENGINE_TANGO);
        if (transform.statusCode == TangoPoseData.POSE_VALID) {
            // Update the AR object location.
            float[] planeFitTransform = calculatePlaneTransform(
                    intersectionPointPlaneModelPair.intersectionPoint,
                    intersectionPointPlaneModelPair.planeModel, transform.matrix);

            return new WallMeasurement(planeFitTransform, transform.matrix, xyzIj.timestamp);
        } else {
            Log.d(TAG, "Could not get a valid transform from depth to area description at time "
                    + xyzIj.timestamp);
        }
    } catch (TangoException e) {
        Log.d(TAG, "Failed to fit plane");
    }
    return null;
}
 
开发者ID:tdb-alcorn,项目名称:defect-party,代码行数:48,代码来源:FloorplanActivity.java


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