我正在尝试将metaio sdk集成到我的增强现实应用程序中。
我经历过这些:http://dev.metaio.com/sdk/tutorials/location-based-ar/,但我仍然无法添加自己的POI。
集成了metaio sdk的人能告诉我如何添加自己的poi吗?
最佳答案
我在loadContents()方法中添加了POI..如下所示
private IRadar mRadar;
private IBillboardGroup mBillBoardGroup;
private ArrayList<GeometryBundle> geometriesList;
IGeometry one = metaioSDK.createGeometryFromImage(createBillboardTexture("Test","http://www.abc.org/150.jpg","0.05 miles"), true);
one.setTranslationLLA(new LLACoordinate(24.463729,54.385650, 0, 5));
geometriesList.add(new GeometryBundle(one, "http://www.abc.org/151.jpg"));
// create radar
mRadar = metaioSDK.createRadar();
mRadar.setBackgroundTexture(AssetsManager.getAssetPath("Tutorial5/Assets5/radar.png"));
mRadar.setObjectsDefaultTexture(AssetsManager.getAssetPath("Tutorial5/Assets5/yellow.png"));
mRadar.setRelativeToScreen(IGeometry.ANCHOR_TL);
mBillBoardGroup = this.metaioSDK.createBillboardGroup();
for (GeometryBundle test : geometriesList) {
mRadar.add(test.geometry);
mBillBoardGroup.addBillboard(test.geometry);
}
在这之后,创建一个geometrybundle类并使用参数创建构造函数…