本文整理汇总了Java中com.google.atap.tangoservice.TangoXyzIjData类的典型用法代码示例。如果您正苦于以下问题:Java TangoXyzIjData类的具体用法?Java TangoXyzIjData怎么用?Java TangoXyzIjData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TangoXyzIjData类属于com.google.atap.tangoservice包,在下文中一共展示了TangoXyzIjData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateXyzIjData
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Update the current cloud data with the provided xyzIjData from a Tango callback.
*
* @param from The point cloud data
* @param xyzIjPose The device pose with respect to start of service at the time
* the point cloud was acquired
*/
public synchronized void updateXyzIjData(TangoXyzIjData from, TangoPoseData xyzIjPose) {
mDevicePoseAtCloudTime = xyzIjPose;
if (mXyzIjData.xyz == null || mXyzIjData.xyz.capacity() < from.xyzCount * 3) {
mXyzIjData.xyz = ByteBuffer.allocateDirect(from.xyzCount * 3 * 4)
.order(ByteOrder.nativeOrder()).asFloatBuffer();
} else {
mXyzIjData.xyz.rewind();
}
mXyzIjData.xyzCount = from.xyzCount;
mXyzIjData.timestamp = from.timestamp;
from.xyz.rewind();
mXyzIjData.xyz.put(from.xyz);
mXyzIjData.xyz.rewind();
from.xyz.rewind();
}
示例2: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the callback listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango.
// Select coordinate frame pair.
final ArrayList<TangoCoordinateFramePair> framePairs =
new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
// We are not using TangoPoseData for this application.
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using onXyzIjAvailable for this app.
}
@Override
public void onPointCloudAvailable(final TangoPointCloudData pointCloudData) {
logPointCloud(pointCloudData);
}
@Override
public void onTangoEvent(final TangoEvent event) {
// Ignoring TangoEvents.
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application.
}
});
}
示例3: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the callback listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
final ArrayList<TangoCoordinateFramePair> framePairs =
new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
logPose(pose);
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using onXyzIjAvailable for this app.
}
@Override
public void onPointCloudAvailable(TangoPointCloudData pointCloud) {
// We are not using onPointCloudAvailable for this app.
}
@Override
public void onTangoEvent(final TangoEvent event) {
// Ignoring TangoEvents.
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application.
}
});
}
示例4: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the callback listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
final ArrayList<TangoCoordinateFramePair> framePairs =
new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new Tango.OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
logPose(pose);
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using onXyzIjAvailable for this app.
}
@Override
public void onPointCloudAvailable(TangoPointCloudData pointCloud) {
// We are not using onPointCloudAvailable for this app.
}
@Override
public void onTangoEvent(final TangoEvent event) {
// Ignoring TangoEvents.
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application.
}
});
}
示例5: startCameraPreview
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
private void startCameraPreview() {
// Connect to color camera
tangoCameraPreview.connectToTangoCamera(mTango,
TangoCameraIntrinsics.TANGO_CAMERA_COLOR);
// Use default configuration for Tango Service.
TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);
mTango.connect(config);
// No need to add any coordinate frame pairs since we are not using
// pose data. So just initialize.
ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(TangoPoseData pose) {
// We are not using OnPoseAvailable for this app
}
@Override
public void onFrameAvailable(int cameraId) {
// Check if the frame available is for the camera we want and
// update its frame on the camera preview.
if (cameraId == TangoCameraIntrinsics.TANGO_CAMERA_COLOR) {
tangoCameraPreview.onFrameAvailable();
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using OnPoseAvailable for this app
}
@Override
public void onTangoEvent(TangoEvent event) {
// We are not using OnPoseAvailable for this app
}
});
}
示例6: startCameraPreview
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
private void startCameraPreview() {
// Connect to color camera
tangoCameraPreview.connectToTangoCamera(mTango,
TangoCameraIntrinsics.TANGO_CAMERA_COLOR);
// Use default configuration for Tango Service.
TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);
mTango.connect(config);
mIsConnected = true;
// No need to add any coordinate frame pairs since we are not using
// pose data. So just initialize.
ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(TangoPoseData pose) {
// We are not using OnPoseAvailable for this app
}
@Override
public void onFrameAvailable(int cameraId) {
// Check if the frame available is for the camera we want and
// update its frame on the camera preview.
if (cameraId == TangoCameraIntrinsics.TANGO_CAMERA_COLOR) {
tangoCameraPreview.onFrameAvailable();
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using OnPoseAvailable for this app
}
@Override
public void onTangoEvent(TangoEvent event) {
// We are not using OnPoseAvailable for this app
}
});
}
示例7: connectTango
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Configure the Tango service and connect it to callbacks.
*/
private void connectTango() {
// Use default configuration for Tango Service, plus low latency
// IMU integration and area learning.
TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);
// NOTE: Low latency integration is necessary to achieve a precise alignment of virtual
// objects with the RBG image and produce a good AR effect.
config.putBoolean(TangoConfig.KEY_BOOLEAN_LOWLATENCYIMUINTEGRATION, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);
// NOTE: Area learning is necessary to achieve better precision is pose estimation
config.putBoolean(TangoConfig.KEY_BOOLEAN_LEARNINGMODE, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_COLORCAMERA, true);
mTango.connect(config);
// No need to add any coordinate frame pairs since we are not
// using pose data. So just initialize.
ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(TangoPoseData pose) {
// We are not using OnPoseAvailable for this app.
}
@Override
public void onFrameAvailable(int cameraId) {
// Check if the frame available is for the camera we want and update its frame
// on the view.
if (cameraId == TangoCameraIntrinsics.TANGO_CAMERA_COLOR) {
// Mark a camera frame is available for rendering in the OpenGL thread
mIsFrameAvailableTangoThread.set(true);
mSurfaceView.requestRender();
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// Save the cloud and point data for later use.
mPointCloudManager.updateXyzIj(xyzIj);
}
@Override
public void onTangoEvent(TangoEvent event) {
// We are not using OnTangoEvent for this app.
}
});
mIntrinsics = mTango.getCameraIntrinsics(TangoCameraIntrinsics.TANGO_CAMERA_COLOR);
}
示例8: doWallMeasurement
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* 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;
}
示例9: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the callback listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
// We are not using TangoPoseData for this application.
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// We are not using onXyzIjAvailable for this app.
}
@Override
public void onPointCloudAvailable(final TangoPointCloudData pointCloudData) {
logPointCloud(pointCloudData);
}
@Override
public void onTangoEvent(final TangoEvent event) {
// Ignoring TangoEvents.
}
@Override
public void onFrameAvailable(int cameraId) {
// This will get called every time a new RGB camera frame is available to be
// rendered.
Log.d(TAG, "onFrameAvailable");
if (cameraId == TangoCameraIntrinsics.TANGO_CAMERA_COLOR) {
// Now that we are receiving onFrameAvailable callbacks, we can switch
// to RENDERMODE_WHEN_DIRTY to drive the render loop from this callback.
// This will result on a frame rate of approximately 30FPS, in synchrony with
// the RGB camera driver.
// If you need to render at a higher rate (i.e.: if you want to render complex
// animations smoothly) you can use RENDERMODE_CONTINUOUSLY throughout the
// application lifecycle.
if (mSurfaceView.getRenderMode() != GLSurfaceView.RENDERMODE_WHEN_DIRTY) {
mSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
}
// Note that the RGB data is not passed as a parameter here.
// Instead, this callback indicates that you can call
// the {@code updateTexture()} method to have the
// RGB data copied directly to the OpenGL texture at the native layer.
// Since that call needs to be done from the OpenGL thread, what we do here is
// set-up a flag to tell the OpenGL thread to do that in the next run.
// NOTE: Even if we are using a render by request method, this flag is still
// necessary since the OpenGL thread run requested below is not guaranteed
// to run in synchrony with this requesting call.
mIsFrameAvailableTangoThread.set(true);
// Trigger an OpenGL render to update the OpenGL scene with the new RGB data.
mSurfaceView.requestRender();
}
}
});
}
示例10: onXyzIjAvailable
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
if (tangoUx != null) {
tangoUx.updateXyzCount(xyzIj.xyzCount);
}
}
示例11: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the TangoConfig and the listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
final ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
//Make sure to have atomic access to Tango Pose Data so that
//render loop doesn't interfere while Pose call back is updating
// the data.
synchronized (sharedLock) {
mPose = pose;
mDeltaTime = (float) (pose.timestamp - mPreviousTimeStamp) * SECS_TO_MILLISECS;
mPreviousTimeStamp = (float) pose.timestamp;
// Log whenever Motion Tracking enters an invalid state
if (!mIsAutoRecovery && (pose.statusCode == TangoPoseData.POSE_INVALID)) {
Log.w(TAG, "Invalid State");
}
if (mPreviousPoseStatus != pose.statusCode) {
count = 0;
}
count++;
mPreviousPoseStatus = pose.statusCode;
// Update the OpenGL renderable objects with the new Tango Pose
// data
float[] translation = pose.getTranslationAsFloats();
if(!mRenderer.isValid()){
return;
}
mRenderer.getTrajectory().updateTrajectory(translation);
mRenderer.getModelMatCalculator().updateModelMatrix(translation,
pose.getRotationAsFloats());
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData arg0) {
// We are not using TangoXyzIjData for this application
}
@Override
public void onTangoEvent(final TangoEvent event) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mTangoEventTextView.setText(event.eventKey + ": " + event.eventValue);
}
});
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application
}
});
}
示例12: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the callback listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
final ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
// Update the OpenGL renderable objects with the new Tango Pose data.
// Note that locking for thread safe access with the OpenGL loop is done entirely
// in the renderer.
mRenderer.updateDevicePose(pose);
// Make sure to have atomic access to Tango Pose Data so that the UI
// the UI loop doesn't interfere while Pose call back is updating the data
synchronized (mUiThreadLock) {
mPose = pose;
//Now lets log some interesting statistics of Motion Tracking like
// Delta Time between two Poses, number of poses since the initialization state.
mDeltaTime = (float) (pose.timestamp - mPreviousTimeStamp) * SECS_TO_MILLISECS;
mPreviousTimeStamp = (float) pose.timestamp;
// Log whenever Motion Tracking enters an invalid state
if (!mIsAutoRecovery && (pose.statusCode == TangoPoseData.POSE_INVALID)) {
Log.w(TAG, "Invalid State");
}
if (mPreviousPoseStatus != pose.statusCode) {
mCount = 0;
}
mCount++;
mPreviousPoseStatus = pose.statusCode;
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData arg0) {
// We are not using TangoXyzIjData for this application
}
@Override
public void onTangoEvent(final TangoEvent event) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mTangoEventTextView.setText(event.eventKey + ": " + event.eventValue);
}
});
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application
}
});
}
示例13: PointCloudManager
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
public PointCloudManager(TangoCameraIntrinsics intrinsics) {
mXyzIjData = new TangoXyzIjData();
mTangoCameraIntrinsics = intrinsics;
}
示例14: startAugmentedreality
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
private void startAugmentedreality() {
if (!mIsConnected) {
mIsConnected = true;
// Connect to color camera
mGLView.connectToTangoCamera(mTango, TangoCameraIntrinsics.TANGO_CAMERA_COLOR);
// Use default configuration for Tango Service, plus low latency IMU integration.
TangoConfig config = mTango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);
// NOTE: low latency integration is necessary to achieve a precise alignment of
// virtual objects with the RBG image and produce a good AR effect.
config.putBoolean(TangoConfig.KEY_BOOLEAN_LOWLATENCYIMUINTEGRATION, true);
config.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);
mTango.connect(config);
// No need to add any coordinate frame pairs since we are not using
// pose data. So just initialize.
ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(TangoPoseData pose) {
// We are not using OnPoseAvailable for this app
}
@Override
public void onFrameAvailable(int cameraId) {
// Check if the frame available is for the camera we want and
// update its frame on the view.
if (cameraId == TangoCameraIntrinsics.TANGO_CAMERA_COLOR) {
mGLView.onFrameAvailable();
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData xyzIj) {
// Get the device pose at the time the point cloud was acquired
TangoCoordinateFramePair framePair = new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE);
TangoPoseData cloudPose = mTango.getPoseAtTime(xyzIj.timestamp, framePair);
// Save the cloud and point data for later use
mPointCloudManager.updateXyzIjData(xyzIj, cloudPose);
}
@Override
public void onTangoEvent(TangoEvent event) {
// We are not using OnPoseAvailable for this app
}
});
// Get extrinsics from device for use in transforms
// This needs to be done after connecting Tango and listeners
setupExtrinsics();
// Set-up point cloud plane fitting library helper class
mPointCloudManager = new PointCloudManager(mTango.getCameraIntrinsics(
TangoCameraIntrinsics.TANGO_CAMERA_COLOR));
}
}
示例15: setTangoListeners
import com.google.atap.tangoservice.TangoXyzIjData; //导入依赖的package包/类
/**
* Set up the TangoConfig and the listeners for the Tango service, then begin using the Motion
* Tracking API. This is called in response to the user clicking the 'Start' Button.
*/
private void setTangoListeners() {
// Lock configuration and connect to Tango
// Select coordinate frame pair
final ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>();
framePairs.add(new TangoCoordinateFramePair(
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_DEVICE));
// Listen for new Tango data
mTango.connectListener(framePairs, new OnTangoUpdateListener() {
@Override
public void onPoseAvailable(final TangoPoseData pose) {
//Make sure to have atomic access to Tango Pose Data so that
//render loop doesn't interfere while Pose call back is updating
// the data.
synchronized (sharedLock) {
mPose = pose;
mDeltaTime = (float) (pose.timestamp - mPreviousTimeStamp) * SECS_TO_MILLISECS;
mPreviousTimeStamp = (float) pose.timestamp;
// Log whenever Motion Tracking enters an invalid state
if (!mIsAutoRecovery && (pose.statusCode == TangoPoseData.POSE_INVALID)) {
Log.w(TAG, "Invalid State");
}
if (mPreviousPoseStatus != pose.statusCode) {
count = 0;
}
count++;
mPreviousPoseStatus = pose.statusCode;
// Update the OpenGL renderable objects with the new Tango Pose
// data
float[] translation = pose.getTranslationAsFloats();
if(!mRenderer.isValid()){
return;
}
mRenderer.getTrajectory().updateTrajectory(translation);
mRenderer.getModelMatCalculator().updateModelMatrix(translation,
pose.getRotationAsFloats());
mRenderer.updateViewMatrix();
}
}
@Override
public void onXyzIjAvailable(TangoXyzIjData arg0) {
// We are not using TangoXyzIjData for this application
}
@Override
public void onTangoEvent(final TangoEvent event) {
runOnUiThread(new Runnable() {
@Override
public void run() {
mTangoEventTextView.setText(event.eventKey + ": " + event.eventValue);
}
});
}
@Override
public void onFrameAvailable(int cameraId) {
// We are not using onFrameAvailable for this application
}
});
}