Android :: Rotate A Cube (3D Rotation)?
Jul 14, 2009In the api demo, there is an example for how to rotate a cube, but it can only rotate about X axis or Y axis, without Z-Axis Rotation. So how to perform 3D Rotation?
View 5 RepliesIn the api demo, there is an example for how to rotate a cube, but it can only rotate about X axis or Y axis, without Z-Axis Rotation. So how to perform 3D Rotation?
View 5 RepliesMy Desire; which i have had problem free for 3 months; has just developed a problem with the screen rotation. Initially it wouldn't rotate so i checked that it was set to automatically rotate in the screen and display menu which it was .
I then tried to recalibrate the screen which kind of worked in that it now allows the screen to rotate to landscape if held sideways, but when i put it the right way up, the screen stays landscape.
I have Swype which i thought might be interfering so i removed the program and rebooted but still nothing.
As we know, we can rotate a bitmap through 2 ways. The 1st way is: Matrix mt = new Matrix(); mt. postRotate (degree);Bitmap bitmap = CreateBitmap(src, 0, 0, w, h, mt, true); canvs.drawBitmap(bitmap, 0, 0, paint); In this way, we always need create new bitmap for every rotation, it is not good way for high performance game or app.The 2nd way is: canvas.save(); canvas.rotate(degree); canvas.drawBitmap(bitmap, 0, 0, paint); canvas.restore();In this way, we avoid creating new bitmap frequently, but the rotation bitmap is distortion, the bitmap quality is worse than first way.So, Is there 3rd way to rotate bitmap with high performance and good quality? Your any comments are really appreciated!
View 3 Replies View RelatedI just bought the Nexus One unlocked for AT&T and really like it. 1 wierd thing is that when I rotate the phone counter clockwise, the screen goes to landscape just fine; but when I rotate it clockwise it does not go to landscape "the other way". And, if I'm holding the phone 'normally' and rotate it 180 degrees ('upside down') it doesn't follow.My youngest daughter delights in telling me that her iPhone does this with no problem. What's up with that?
View 7 Replies View RelatedI have a HTC Magic (Rogers Canada).And, I see how the Dream (G1) rotates the home screen. can the Magic do that as well? Also, anybody know if it's possible to rotate the screen to the right and not just to the left? Shouldn't the acceleromater detect all the different rotated modes (even upside down?). that'd be cool
View 1 Replies View RelatedI drew cubes using opengl,
GLSurfaceView has onTouchEvent method. but I'd like to know
what cube was touched ?
cubes can move anywhere in the viewport...
I am newbie to OpenGL programming. I was going through the code of API demos.I understood how to map a single image resource on to all the 6 faces of the cube,but i want to know how can i map 6 faces of the cube with 6 different images. I searched in the web without any luck.Can any one give me some ideas links , pointers on the same.
View 5 Replies View RelatedI'm looking to draw a cube at specific co-ordinates. I've got all 4 corners and the centers x/y value. I now want to construct a cube at those co-ordinates. Does anyone know of any tutorials or have any information on how I would go about said task?
Ive got the following code. I'd like to map each of its corners to a specific x/y co-ord...
I have just began opengl programming in android and i am fairly new to opengl as well. I've been using nehe's opengl tutorials as well as insanitydesign's android ports.I successfully managed to create a cube with a single texture mapped to all its 6 faces. I even mapped multiple textures to different faces of the cube.But the way I did it was to create 6 faces seperately, have 6 seperate index and texture buffers and then using glBindTexture() with the selected texture for each face and then calling glDrawElements. Isn't there an efficient way around this. Should i use a cube map texture instead of a GL_TEXTURE_2D?
View 4 Replies View RelatedI have just began opengl programming in android and i am fairly new to opengl as well. I've been using nehe's opengl tutorials as well as insanitydesign's android ports. I successfully managed to create a cube with a single texture mapped to all its 6 faces. I even mapped multiple textures to different faces of the cube.But the way I did it was to create 6 faces seperately, have 6 seperate index and texture buffers and then using glBindTexture() with the selected texture for each face and then calling glDrawElements. Isn't there an efficient way around this. Should i use a cube map texture instead of a GL_TEXTURE_2D?
View 1 Replies View RelatedWorking through some OpenGL-ES tutorials, using the Android emulator. I've gotten up to texture mapping and am having some trouble mapping to a cube. Is it possible to map a texture to all faces of a cube that has 8 vertices and 12 triangles for the 6 faces as described below?
// Use half as we are going for a 0,0,0 centre.
width /= 2;
height /= 2;
depth /= 2;
float vertices[] = { -width, -height, depth, // 0
width, -height, depth, // 1
width, height, depth, // 2......................
Is there any one has an experience on converting the code from the sample-kube to a magic cube? How to detect the position I click is the "small cube" object?
View 2 Replies View RelatedI bought a cube u9gtv, called also u9gt5. This is very good product, but i haven't found any thread on the web on a 'how to root' the tablet. Any way to install a better rom .
View 4 Replies View RelatedI just bought this week the new cube U9GT4.
Yes, after a week usage I would like to root it for use some apps like in former times.
How could be root the tablet?
i wanted to start android development on a real, but not too expensive device. URL....The manufactorer is CUBE:URL>....It works fine and i wanted to connect it to my PC, running windows 7.The problem is: I could not find any usb driver on the (chinese) manufactorer site.
In the device manager the device was listed as "K8GT_W" and marked with "no driver installed".if there is a driver for this device or how to use some "generic" usb device driver with this device?
I downloaded the google USB driver with the android SDK manager.The i selected "update driver" from the device maanger + selected the google usb driver download directory.This shows the message "K8GT_W could not be installed".
Is the Cube U9GT-2 compatible with CyanogenMod?
I've got Gingerbread on my tablet, but I'm not really satisfied with this OS, maybe because it's developed for smartphones and not tablets.
How to upgrade the OSof Cube U30GT M tablet pc Andriod Ver 4.0.4.
View 2 Replies View RelatedI really want to map the Cube button for gaming with NESoid or other emulators. Any ideas?
View 8 Replies View RelatedPrimo Battery Cube for SmartPhones. I'll be getting one of these when they are available in the UK.
View 5 Replies View RelatedThe widgets on my Cube U9GT 2 tablet running on Android 4.0.3 / Ice Cream Sandwich are huge. Please check out the attached screenshots.
I am using the default ICS launcher. I could not resize them by tapping and holding - there would not be any widget resize handles. I would like to "hack" the config files to shrink these widgets to a more sensible size.
I installed kasty-cube_u30gt_h-41-01 on my cube u30gt but find that there is a slight delay between the units sound output and the sound coming from the TV, is this normal? or is it just my ears echoing All else seems fine.
View 1 Replies View RelatedMy "internal" memory is almost filled up and i am trying to find a way to move apps such as games to "external" memory. Some apps i have tried failed because all they did was direct link to the "move to sd" option in settings which is obviously not available on my tablet.
I have rooted the device, i have titanium backup (which failed as well in moving them). It came with the 4.2.2 android.
The device i own is cube u55gt talk 79
I have a problem with rotation, during my ListActivity is loading data from the network. To do it I use a background thread which recovers data and put them inside an ArrayList. While this thread works, there is Progress dialog activated in foreground. For the rotation I use the method with onRetainNonConfigurationInstance() to save my ArrayList's state. After android calls this method, I call dismiss() on the progress dialog on onStop(). Then the activity is created as new with onCreate(), but it use the getLastNonConfigurationInstance() to recover the ArrayList's state. Now, my problem. If I rotate from portrait to lanscape when the download is terminated and I see the data in portrait yet, everything is ok. If I rotate during progress dialog is showing I have two cases: 1- onRetainNonConfigurationInstance() saves the arraylist fully recovered, the thread terminates and everything is ok. 2- onRetainNonConfigurationInstance() saves the arraylist empty, i think the download isn't finished yet. The onCreate is called and my list is empty, the thread terminates, but i don't see anything in my list. If I am in this case and I still rotate from landscape to portrait now I can see my list full with all the data. Why? Where am I wrong?
View 7 Replies View Relatedhow to rotate fragment in android 3.0.I have an activity in which there is listfragment and fragment.on click of the item in list i want to apply rotation for the fragment.I have tried with below given code:
ObjectAnimator.ofFloat(getView(), "rotationY", 0, 360).setDuration(500).start();
This code works well witn listview in listfragment but when i used the same for fragment rotation it throws exception.
I've got an app where I don't want the screen to rotate when they rotate their device, I need to keep the app in portrait mode all the time. How do I do this?
View 2 Replies View RelatedHow should I handle an active ProgressDialog when the screen is rotated? Perhaps I should cancel the dialog in onDestroy and restart it in response to a SavedInstanceState flag?
I'm getting an exception and the following message in logcat:
CODE:..............
Is there a standard pattern for handling a running AsyncTask with screen rotation? My AsyncTask runs for about 10 seconds. I could call AsyncTask.cancel in the Activity's onDestroy method and restart the task in onCreate but that would waste cycles, bandwidth, and user time. I'm guessing there is a better way.
View 1 Replies View RelatedIn my Android app I have 2 layouts, one for portrait and one for landscape.
In both layouts I have a TextView that the user can change by clicking on, by default it reads 'ON'
If the user presses it then it changes to 'OFF' All well and good.
However if it's set to OFF and the screen is rotated the text view resets to ON. How can I stop this from happening?
I need to calculate a rotation vector out of the data i get from Sensor.TYPE_ORIENTATION. The sensor data is defined like this: the values have to be recalculated to become a correct 3d position: values[0]: Azimuth, angle between the magnetic north direction and the Y axis, around the Z axis (0 to 359). 0=North, 90=East, 180=South, 270=West values[1]: Pitch, rotation around X axis (-180 to 180), with positive values when the z-axis moves toward the y-axis. values[2]: Roll, rotation around Y axis (-90 to 90), with positive values when the x-axis moves away from the z-axis need all three values like the Z axis value (from 0 to 360 degree). I tried a lot but cant figure out how to do this :/ So i bet there is a simple solution how to recall the values of sensor.TYPE_ORIENTATION to make them a 3d rotation vector, but i just dont know how to do it. If you know the answer please tell me. Code...
View 3 Replies View RelatedI want to disable the view change on device rotation for the time being. Its giving foreclose error when i rotate the device and starts all over again.
View 3 Replies View Related