rotation

2D object rotation for ipad

Hi guys I have drawn a 2D triangle on the my EAGLView using openGL coding. Now my requirement is like, user can rotate this triangle 360 degree by his finger's motion. My code is working pretty well but still not perfect. My triange is getting stucks for few pixels at some edges. Here is sample of my rotation code : GLfloat tot...

How to rotate a specific object in openGL?

I have some objects on the screen and would like to rotate only one of them. I tried using the glRotatef(...) function but turns out glRotatef(...) rotates all my objects (rotates the camera, maybe?). How can I rotate only one? I use openGL ES 1.1 ...

How to rotate an object and but leaving the lighting fixed? (OpenGL)

I have a cube which I want to rotate. I also have a light source GL_LIGHT0. I want to rotate the cube and leave the light source fixed in its location. But the light source is rotating together with my cube. I use OpenGL ES 1.1 Here's a snippet of my code to make my question more clear. GLfloat glfarr[] = {...} //cube points GLubyte glu...

Rotating the viewing platform in Java3d

The following code puts a cube at (0, 0, 0) and another at (0, .5, .5) and each cube is (.5, .5, .5) in dimension. I'm trying to rotate the view that the screen gets to one like this but instead I get this view . Also, I realize I got the colors backwards. Anyway, this is my code so far: import com.sun.j3d.utils.geometry.*; import com...

Is it possible to prevent the "flipping" in an iPhone website via JavaScript/jQuery?

I just don't want the site change orientation when iPhone change orientation. Is it possible? ...

How to do a rotation in R^2?

hi there! i'm stuck with a seemingly simple problem in mathematics: i need to rotate points in a 2-dimensional cartesian coordinate system, i.e. i have a point given by (x/y) and an angle gamma and i need to get the coordinates of this point if rotated by gamma... example: if x = 2 and y = 0 and the angle of rotation is 90°, the result...

iphone - TabBarController rotation question

My app has 4 tabs. All the view controllers support rotation, and indeed are rotated when I rotate the device. For one of the view controllers, I need to reposition some of the subviews upon rotation. I do this in willRotateToInterfaceOrientation of that view controller, and it works fine. The problem comes when I switch to a different ...

OpenGL rotation vector from matrix

Ok, so here is what I have: -an abstract "Object" class which I made in a framework to use it as a base class for all 3D objects. -a Matrix4 member of this class which has the sole purpose of storing rotation info for the object. -some functions that multiply the matrix: for each of the yaw, pitch & roll rotations (both global and loc...

Rotating views in a LinearLayout problem.

I have a LinearLayout with a vertical orientation, within that layout I have three buttons (ImageButtons to be exact) and when the orientation changes (via an OrientationEventListener) I have them set to perform a rotation animation. The top and bottom buttons rotate perfectly, however the middle one does not. Its pivot point seems to ...

Translation and rotation matrix

Hi, Does anyone have code to perform the matrix calculation for translation and rotation of a point I. 2D, please? Ive been looking all over the net and not found it in a form I can use. I'm coding in lua, but any other language would be fine. Many thanks, Matt. ...

UITableView rotation issue

I have UIViewController with a UIView with UITableView inside. All works fine in Landscape mode but when the device is rotated to Portrait, bottom half of UITableView is not accesible (can't even select any row in the bottom half or make table scroll). All rows are displayed correctly. I am reframing and repositioning UIView and UITableV...

Rotating 64 CCSprites more efficiently?

I have an 8 by 8 matrix of sprites that I need to be able to rotate all of them 90 degrees at once. The way I've done it is using nested for loops, and a 2 dimensional array of sprite pointers. for(row = 0;row<9;row++){ for(column = 0;column<8;column++){ [trolls[row][column] runAction:[RotateBy actionWithDuration:0.01 an...

froyo's universal rotation and my landscape only app.

My app is set in landscape only mode thanks to an attribute in my manifest file, but with froyo came universal rotation and a problem. It will force the screen to landscape but if the user is holding the phone upside down my app will appear upside down. Is there a way for me to set my app to only rotate when the user has their phone orie...

Android VideoView Landscape Orientation Problem

I am pretty new to Android and mobile development in general. I am creating an Android application that plays a video using VideoView after a button is selected. The problem is when you rotate the phone the video restarts. I know its because the activity is destroyed and recreated when it is rotated. So I just locked the video player in ...

orientation auto rotation

hi guys i have 2 different views for a single nib. when i rotate the screen on iphone "simulator", the view rotates perfectly fine and the output is the desired one. but when i deploy my project on iphone and go through the same process the view doesnot change on changing the phone orientation ? in view did appear i have used [[UIDev...

Force autoresizingMask to apply to a UIView

I have a notification view which I'm adding to the application's window after launch, so it hovers above all other views. When the user rotates the device, the view does not autoresize like those owned by a UIViewController. Is there a way to manually ask for the view's autoresizingMask to be applied? Or, alternatively, how can I have...

Multiple Windows Rotation Problem - iPhone / iPad

My app uses 2 UIWindows. The first shown has a TabBar controller with ViewControllers that only rotate to Portrait orientations. Up to here everything woks fine. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (UIInterfaceOrientationIsPortrait(interfaceOrientation)); } On the othe...

Mouse Difference Rotated and Applied to Current Mouse Coordinates

I am having trouble with my 2D rotation implementation. I'm trying to create a pan feature for a map (move your mouse up; it should move the map down.) The map is just a 2d background image that is able to be rotated, etc. The problem is when it's in a rotated state moving my mouse up will continue to move the mouse in direction as if...

UISplitViewController's Master view loses state after rotation

On the iPad, I've noticed that apps like Mail and WebMD keep rows in the final level of the hierarchy of the "Master" (left) view highlighted when tapped. They also remember this state after rotation; if you select an e-mail in landscape and then rotate to portrait, and click the Inbox button to bring up the Master view popover, the corr...

Objective C wheel menu for iPhone

Hi, I want to create a rotating wheel menu which the user can use his/her finger to rotate the menu. I understand how to rotate the circle but I have no idea how to rotate it when the user drags it using his/her finger in the right direction that hte user is dragging the wheel in. Any help please? Thank you! ...