iPhone开发之全景展示(panoramagl)
2013-10-12 22:56
507 查看
//相应地方添加成员变量 plView = [[PLView alloc] initWithFrame:self.view.frame]; plView.delegate=self; [self.view addSubview:plView]; [self.view sendSubviewToBack:plView];//送到最里端
-(void)selectPanorama:(NSInteger)index { NSObject<PLIPanorama> *panorama = nil; //Spherical2 panorama example (supports up 2048x1024 texture) if(index == 0) { panorama = [PLSpherical2Panorama panorama]; [(PLSpherical2Panorama *)panorama setImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_sphere2" ofType:@"jpg"]]]; } //Spherical panorama example (supports up 1024x512 texture) else if(index == 1) { panorama = [PLSphericalPanorama panorama]; [(PLSphericalPanorama *)panorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_sphere" ofType:@"jpg"]]]]; } //Cubic panorama example (supports up 1024x1024 texture per face) else if(index == 2) { PLCubicPanorama *cubicPanorama = [PLCubicPanorama panorama]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_f" ofType:@"jpg"]]] face:PLCubeFaceOrientationFront]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_b" ofType:@"jpg"]]] face:PLCubeFaceOrientationBack]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_l" ofType:@"jpg"]]] face:PLCubeFaceOrientationLeft]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_r" ofType:@"jpg"]]] face:PLCubeFaceOrientationRight]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_u" ofType:@"jpg"]]] face:PLCubeFaceOrientationUp]; [cubicPanorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_d" ofType:@"jpg"]]] face:PLCubeFaceOrientationDown]; panorama = cubicPanorama; } //Cylindrical panorama example (supports up 1024x1024 texture) else if(index == 3) { panorama = [PLCylindricalPanorama panorama]; //((PLCylindricalPanorama *)panorama).isHeightCalculated = NO; [(PLCylindricalPanorama *)panorama setTexture:[PLTexture textureWithImage:[PLImage imageWithPath:[[NSBundle mainBundle] pathForResource:@"pano_sphere" ofType:@"jpg"]]]]; } }
两个下载地址:http://code.google.com/p/panoramagl/
https://github.com/menssen/panoramagl#51-with-interface-builder
另有介绍使用的:http://www.codeproject.com/Articles/60635/Panorama-360-iPod-Touch-iPhone
相关文章推荐
- iPhone开发之全景展示(panoramagl)
- iPhone:简单的全景展示利器panoramagl
- [iOS开发必备工具之]简单的全景展示利器panoramagl
- iOS开发笔记--简单的全景展示利器panoramagl
- [iOS开发必备工具之]简单的全景展示利器panoramagl
- iOS开发笔记--简单的全景展示利器panoramagl
- iOS PanoramaGL(全景展示)用法及集成中的那些坑
- 简单的全景展示利器panoramagl
- iphone全景照片的处理,加入panoramagl库的具体办法,泪奔啊~
- iphone开发之表格组件UITableView的使用(三)通过加载plist文件字典转模型方式展示分组数据
- 百度地图的简单开发之实现地图全景,内景展示功能(四)
- 浅谈百度地图的简单开发之实现地图全景,内景展示功能(四)
- PanoramaGL向你展示360°全景影像
- iphone开发之表格组件UITableView的使用(二)如何分组展示数据并添加组头和组尾描述
- Panorama 360:全景照片在iPhone上的展示
- iPhone开发之UIScrollView滚动组件的使用(一) 拖线实现——大图的移动展示
- iphone开发之表格组件UITableView的使用(六)通过加载plist文件展示汽车品牌并添加索引查找
- iPhone开发3种导航界面效果+iPad全景浏览demo
- Panorama 360:全景照片在iPhone上的展示
- ios全景展示panoramaGL的一些总结