rotation

WPF rotate animation

Hello, I'm working with WPF and I can't achieve an animation. I have a rectangle which rotates from x degree with a render transform origin from 0,0. I want this rectangle to rotates from y degrees with a render transform origin from 0,1 after 2 seconds. Of course I want to keep the rectangle position for the second animation. My prob...

Rotating videos with FFmpeg

I have been trying to figure out how to rotate videos with FFmpeg for some time now. I am working with iPhone videos taken in portrait mode. I know how to determine the current degrees of rotation using MediaInfo (excellent library, btw) but I'm stuck on FFmpeg now. From what I've read, what you need to use is a vfilter option. Accordin...

OpenGL ES 3d rotation causes unintentional translation?

I'm working on an iphone project where I need both a horizontal and a vertical layout. I've got it working in 2D perfectly well, using the following setup to my projection matrix: if(isHoriz()){ glRotatef(90.0f,0.0f,0.0f,1.0f); SOrtho(0, 480, 0, 320, -1, 1); } else SOrtho(0, 320, 0, 480, -1, 1); The problem lies when ...

OpenGL MODELVIEW rotations manually

Hello, For my graphics class, our professor wants us to keep track of our current matrix on our own and apply rotations/translations/scaling matrices to it then load it using glMatrixMode(GL_MODELVIEW) and glLoadMatrix(current_matrix). All of this seems fine, but when I actually use it, I keep having an issue: if I apply a rotation to ...

Take use of the native spinner in Android.

I want to rebuild (maybe I don't even have to) the nativ android progress indicator and show it as icon for a list item. I followed this example and endet up with a heavy performance eating animation, which also doesn't match the native spinner. The code has as "LinearInterpolator" which seems to cause those problems. Now I made my own ...

Dismiss UIACTIONSHEET before device rotate!

In portaint Actionsheet show in tabbar. In landscape - in window. I heed do remove UIActionSheet from tabbar before rotate, for after rotate show in wondow. Inside – willRotateToInterfaceOrientation:duration dismiss action sheet dont work. Please help me! ...

[Android] Rotate of 90 degrees a Dialog / AlertDialog created by the system ?

Does it exist a way to apply a rotation (of 90 degrees) to an AlertDialog that has been created by the system ? This could seem tricky at first sight. My application uses the camera in preview and must work in landscape AND in portrait, starting from Android 1.5. However, when the OS automatically manages the phone orientation, the pr...

How do you set an objects Orientation to another objects in Ogre3D?

I tried do do this: Ogre::Vector3 src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_X; Ogre::Quaternion quatt = src.getRotationTo(bone2->_getDerivedOrientation() * Ogre::Vector3::UNIT_X); bone1->rotate(quatt); src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y; quatt = src.getRotationTo(bone2->_getDerivedO...

OpenGL Rotation of an object around a line

Hi, I am programming in OpenGL and C++. I know 2 points on 1 line ( a diagonal line) and wish to rotate an object around that diagonal line. How can I go about doing this? I know how to use glrotatef to rotate it around the x, y or z axis but am not sure about this Thanks Jessica ...

OpenGL ES 1.1 image rotation from its center

Hi there! I'm trying to rotate a 2D image using OGL ES. After load it I can move it through the screen but when trying to rotate the image through its center, it has an odd behavior as the rotation center is the lower-left screen corner, not the center of the image itself. Googling around I've read that I could push the current matrix,...

Find best fit axis aligned bounding box (AABB) INSIDE of a orientend bounding box (OBB)?

Hi, I can't figure out a simple solution for the following problem: I start with rotating, scaling and translating a AABB (lets call X) which will result in a OBB (lets call Y) Now I want to figure out a new AABB (lets call Z) inside of the OBB (called Y) which fits best. How can I solve this? BTW: I know that there may exists mult...

Rotated rectangle bounding box size

If I have a given rectangle, with the width w, height h and angle r How large does another rectangle which contains all points of the rotated rectangle need to be? I would need this to perform fast bounding box checks for a 2D physics engine I am making ...

How to use the Rodrigues' rotation formula to calculate Euler angles?

Inspired by this question that attempts to reverse engineer a pseudo code chunk, I'm wondering how to use the Rodrigues' rotation formula to calcuate an Euler angleset for one point to face another (between 2 points). I've seen some implementations of the formula, such as this C++ implementation which calculates a rotation matrix. Is th...

finding orientation using getRorationMatrix() and getOrientation()

Im trying to get the direction of the vector pointing out of the camera, with respect to magnetic north. I'm under the impression that I need to use the values returned from getOrientation(), but I'm not sure what they represent. The values I get from getOrientation() don't change predictably when I change the orientation of the phone (r...

What's a quaternion rotation?

Is quaternion rotation just a vector with X,Y,Z which the object will rotate towards, and a roll which turns the object on its axis? Is it that simple? Meaning if you have X=0, Z=0 and Y=1 the object will face upwards? And if you have Y=0, Z=0 and X=1 the object will face to the right? (assuming X right, Y up and Z depth) ...

How to rotate model not camera in OpenGL ?

Hello! I have the same qustion as in the title :/ I make something like: glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0f, 0, -zoom); glRotatef(yr*20+moveYr*20, 0.0f, 1.0f, 0.0f); glRotatef(zr*20+moveZr*20, 1.0f, 0.0f, 0.0f); //Here model render :/ And in my app camera is rotating not model :/ ...

Why does status bar rotation happen "behind" my modal UIImagePickerController?

In my application I have a UIViewController that opens a UIImagePickerController using presentModalViewController. The image picker appears to disallow orientations other than UIDeviceOrientationPortrait, which is fine. However, it appears that if I rotate the device to landscape, the status bar rotates despite the fact that the UIIm...

Acceleration and Deceleration in AS3

Hi Guys, In my Flash File I have a wheel. The user is able to rotate the wheel by using arrows to jump to the next "segment" (think 20 images attached to each other forming the circumference of the wheel). Clicking the arrows initiates this code: protected function rotate():void { var rotateTo:Number = (-360 / num...

Image rotation with JQuery and rails

Hi, I'm searching for a plugin or a simple way to make an image rotatable by dragging (with the mouse) a button on this image. I want to be able to save the angle rotation too. Does anyone know how to do it easily please? thanks ...

Rotating a UIImageView greater than 180 degrees in an animation

I'm trying to create an animated meter (like the gas tank in your car). I can't seem to get CGAffineTransformMakeRotate to rotate past 180. I've attempted to do it in 2 separate animations (eg: rotate 180 degrees and then rotate the remaining degrees) but it looks terrible since the timing of the total animation changes frequently on use...