如何替换 ARView 中的 POI 图像
我正在运行一个 Wikitude 应用程序,它显示了兴趣点 (兴趣点)。当应用程序启动时,我单击按钮启动 ARView (增强现实)在那里我可以看到叠加的 POI 图像 在实时相机图像上。
现在我想经常更改这些图像。
我正在使用:
// Need handler for callbacks to the UI thread
final Handler mHandler = new Handler();
// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
public void run() {
updateResultsInUi();
}
};
protected void startLongRunningOperation() {
// Fire off a thread to do some work
Thread t = new Thread() {
public void run() {
Pi.computePi(800).toString(); //Do something for a while
mHandler.post(mUpdateResults); //then update image
}
};
t.start();
}
但没有任何效果。我确信我犯了一些错误...
提前感谢大家。
I'm running an Wikitude application which shows the point if Interest
(POIs). When the application starts, I click a button to launch ARView
(AUgmented Reality) and there I could see the POI images superimposed
on the Live Camera images.
Now I want to change those images at frequent intervals.
I'm using :
// Need handler for callbacks to the UI thread
final Handler mHandler = new Handler();
// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
public void run() {
updateResultsInUi();
}
};
protected void startLongRunningOperation() {
// Fire off a thread to do some work
Thread t = new Thread() {
public void run() {
Pi.computePi(800).toString(); //Do something for a while
mHandler.post(mUpdateResults); //then update image
}
};
t.start();
}
But nothing is working. I'm sure I'm doing some mistake...
Thanking you all in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您说您正在运行“Wikitude 应用程序”时,您的意思是您正在使用其公开可用的设备上 Android API 构建应用程序 (http://www.wikitude.org/developers)?如果是这样,则不支持动态更改 POI 标记图像。 AR 视图是 Wikitude 应用程序本身内的一项活动,通过您的意图启动。启动相机视图后,您无法进行进一步的 POI 控制(除了回调意图)。
When you say you are running a "Wikitude application", do you mean you are building an app using their publicly available on-device Android API (http://www.wikitude.org/developers)? If so, then dynamically changing the POI marker images is not supported. The AR view is an activity within the Wikitude app itself, launched via your intent. You have no further POI control (apart from callback intents) after the camera view is launched.
我们可以为兴趣点添加自定义图标。您是否浏览过 Wikitude 提供的示例代码?在那里你可以找到一个方法startARViewWithIcons()。只需浏览一次,如果还有其他问题请告诉我......谢谢&问候, 拉格文德拉 K
We can add our customized icons for a Point of Interest. Have you gone through the sample code provided by Wikitude?. There you can find a method startARViewWithIcons(). Just go through it once, Let me know if there is anything else.... Thanks & Regards, Raghavendra K