Android 实现360度全景 求助

 我来答
匿名用户
2015-01-09
展开全部
您好,希望以下回答能帮助您

相关文章 相关文章
老鸟们来看一下这个android:layout_weight是什么意思呢?
回声消除
这是 一段实现360度全景的 代码单独跑 能起来 现在 想写一个单击事件触发器 触发这个 我触发器要写在继承于Activity类 的下面 如何写 急!~ 小弟自学 求指教 啦!~~
http://code.google.com/p/panoramagl-android/downloads/list?can=1&q=
/*
* This file is part of the PanoramaGL library for Android.
*
* Authors: Javier Baez <javbaezga@gmail.com> and Miguel 刟u朼y <mg_naunay@hotmail.com>
*
* $Id$
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; version 3 of
* the License
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package panoramagl.examples;

import javax.microedition.khronos.opengles.GL10;

import com.android.panoramagl.PLTexture;
import com.android.panoramagl.PLView;
import com.android.panoramagl.enumeration.PLViewType;
import com.android.panoramagl.structs.PLRange;

import android.util.Log;

public class HelloPanorama extends PLView
{
@Override
protected void onGLContextCreated(GL10 g1)
{
super.onGLContextCreated(g1);

System.out.println(g1);

try
{
/*
* Important Note: You must edit AndroidManifest.xml and put android:configChanges="keyboardHidden|orientation" attribute in activity else you have memory problems
*/

//If you want to use setDeviceOrientationEnabled(true), activity orientation only must be portrait. Eg. android:screenOrientation="portrait"
//设置定位图像(false)
this.setDeviceOrientationEnabled(false);

//You can use accelerometer你可以用加速计
this.setAccelerometerEnabled(false);
this.setAccelerometerLeftRightEnabled(true);
this.setAccelerometerUpDownEnabled(false);

//Scrolling and Inertia滚动和惯性
this.setScrollingEnabled(true);
this.setInertiaEnabled(true);

//setFovRange determines Zoom range. Range values from -1.0f to 1.0f设置缩放范围
this.getCamera().setFovRange(PLRange.PLRangeMake(0.0f, 1.0f));

//Example with Sphere type (you need one image)球面型为例,你需要一张图片
this.setType(PLViewType.PLViewTypeSpherical);//设置风格球形景观类型
// this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.pano)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.aa)));
}
catch(Throwable ex)
{
Log.e("HelloPanorama::onGLContextCreated", "Error:" + ex.getMessage());
}
}

}

package panoramagl.examples;

import android.app.Activity;
import android.content.Intent;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import javax.microedition.khronos.opengles.GL10;

import com.android.panoramagl.PLView;

public class asa extends Activity {
private PLView plView = new PLView();
//private GLSurfaceView gl_view = null;
private Button button;
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//gl_view = new GLSurfaceView(this);
//
//gl_view.setRenderer(new BaseRend());
//this.setContentView(gl_view);
如您还有疑问可继续追问。
美狐美颜sdk
2024-08-06 广告
美颜SDK推出多个版本的原因有以下几点:1. 满足不同平台的需求:美颜SDK的不同版本可以满足不同平台的运营需求。例如,对于直播平台,需要更多的美颜功能来吸引观众,而视频聊天平台则需要的是精简版的美颜功能。通过提供不同版本的美颜SDK,可以... 点击进入详情页
本回答由美狐美颜sdk提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式