rajawali

Rajawali rotating camera with Sensor.TYPE_ROTATION_VECTOR strange behavior

和自甴很熟 提交于 2019-12-23 20:06:51
问题 I'm creating a Panorama view which allows the user to look around in a spherical image by rotating his smartphone. I used Rajawali's Skybox for this together with the TYPE_ROTATION_VECTOR sensor. I got it working, but only when I look forward (it's literally based on my rotation (yaw)) This is the behavior: looking forward: yaw = yaw, pitch = pitch and roll = roll looking to the left: yaw = yaw, pitch = roll and roll = pitch looking backwards: yaw = yaw, pitch = pitch * -1 and roll = roll *

Textures are not displayed on the sphere for Samsung Galaxy SL

一世执手 提交于 2019-12-08 14:00:28
问题 I am studying the Rajawali framework for Android. I tried their first basic tutorial which is as follows: public class RRenderer extends RajawaliRenderer { private DirectionalLight mLight; private BaseObject3D mSphere; public RRenderer(Context context) { super(context); setFrameRate(60); } protected void initScene() { mLight = new DirectionalLight(1f, 0.2f, 1.0f); // set the direction mLight.setColor(1.0f, 1.0f, 1.0f); mLight.setPower(2); Bitmap bg = BitmapFactory.decodeResource(mContext

Rajawali object rotation match to camera

别等时光非礼了梦想. 提交于 2019-12-08 02:06:02
问题 I loaded an object with rajawali framework... and I want to rotate it unison with camera.. Here is my code: public Renderer(Context context) { super(context); setFrameRate(60); this.context = context; mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); mAccVals = new Number3d(); } public void initScene() { DirectionalLight light = new DirectionalLight(0, 0, 1); light.setPower(4);

How do you get rajawali to work (tutorial 1 on git)

…衆ロ難τιáo~ 提交于 2019-12-07 06:58:22
问题 I am quite new to android development, I know the basics activities, maps, sqlite, etc. I would like to be able to implement some 3D objects to be able to interact with within my apps. After a bit of searching I found that rajawali seems to be the best method. As you do I started with the first tutorial and reading the source code from the example docs. Where I have become lost is I have followed the tutorial word for word and and I cant run the application due to errors in the script. If

How to make a simple VR video player by Google CardBoard Android SDK and Rajawali

烂漫一生 提交于 2019-12-04 22:55:35
问题 I am a new man in these area. I am trying to change a program in github to play video for cardboard now. I modified the MyRenderer by using StreamingTexture. public class MyRenderer extends RajawaliCardboardRenderer { public MyRenderer(Context context) { super(context); } private MediaPlayer mMediaPlayer; private StreamingTexture streamingTexture; @Override protected void initScene() { mMediaPlayer = MediaPlayer.create(this.getContext(), R.raw.test); streamingTexture = new StreamingTexture(

How to use RajawaliVR or Rajawali to play a 360 Video

余生颓废 提交于 2019-12-03 15:03:19
问题 I am having a hard time to figure out how to use the Rajawali to play a 360 video. In order to achieve this, I tried every solution I could find in the Internet, but I failed. Firstly, I used the RajawaliCardboard, and let the MainActivity extend from CardboardActivity . At the same time, in MyRenderer class, I let this class extend from the RajawaliCardboardRenderer class. In MyRenderer class, I overrided the initScene() function: protected void initScene() { StreamingTexture mTexture = null

How to make a simple VR video player by Google CardBoard Android SDK and Rajawali

人走茶凉 提交于 2019-12-03 14:26:15
I am a new man in these area. I am trying to change a program in github to play video for cardboard now. I modified the MyRenderer by using StreamingTexture. public class MyRenderer extends RajawaliCardboardRenderer { public MyRenderer(Context context) { super(context); } private MediaPlayer mMediaPlayer; private StreamingTexture streamingTexture; @Override protected void initScene() { mMediaPlayer = MediaPlayer.create(this.getContext(), R.raw.test); streamingTexture = new StreamingTexture("video", mMediaPlayer); Sphere sphere = createPhotoSphereWithTexture(streamingTexture); getCurrentScene()

How to use RajawaliVR or Rajawali to play a 360 Video

南楼画角 提交于 2019-12-03 04:51:16
I am having a hard time to figure out how to use the Rajawali to play a 360 video. In order to achieve this, I tried every solution I could find in the Internet, but I failed. Firstly, I used the RajawaliCardboard, and let the MainActivity extend from CardboardActivity . At the same time, in MyRenderer class, I let this class extend from the RajawaliCardboardRenderer class. In MyRenderer class, I overrided the initScene() function: protected void initScene() { StreamingTexture mTexture = null; if (externalMemoryAvailable()) { mVideoPath = Environment.getExternalStorageDirectory()