Questions tagged [rotation]

A rotation is a circular movement of an object around a center (or point) of rotation. On a mobile device, it indicates the change of orientation.

A three-dimensional object rotates always around an imaginary line called a rotation axis. If the axis is within the body, and passes through its center of mass the body is said to rotate upon itself, or spin. A rotation about an external point, e.g. the Earth about the Sun, is called a revolution or orbital revolution, typically when it is produced by gravity.

Mathematically, a rotation is a rigid body movement which, unlike a translation, keeps a point fixed. This definition applies to rotations within both two and three dimensions (in a plane and in space, respectively.)

A rotation is commonly represented using , a rotation or .

On a mobile device, it indicates the change of orientation.

11204 questions
3
votes
0 answers

Calculate SceneKit SCNVector4 rotation from longitude/latitude coordinates of a sphere?

I'm working on a SceneKit project in Objective-C, trying to rotate a sphere (representing a planet) so that a point at a given longitude/latitude coordinate is facing "forward" (i.e. that point moves to the {0,0} position). So for example, we're…
Nerrolken
  • 1,884
  • 3
  • 22
  • 49
3
votes
0 answers

Networking rotation sync

My Unity version is 5.2.3f1, I m trying to sync the rotation of a child gameobject, in local works perfectly fine but it doesnt show up in other clients. I tried everything I could find and nothing. The reason of this is to rotate a FPS body, so, I…
3
votes
2 answers

JavaFX Rotate ImageView

I'm trying to rotate an ImageView 90 degrees (JavaFX) each time the button is clicked: private void rotate90(ActionEvent e){ if(currentImage != null){ imageView.setRotate(90); } } but my code only rotates ImageView once, and…
V.Savage
  • 61
  • 1
  • 2
  • 6
3
votes
3 answers

How to rotate a log4j log manually

I have log4j configured to rotate the log every day. In special situations I would like to trigger an additional log rotation manually. Is this possible - and if so: How? Solved like this: void rolloverLogs() { for(final Enumeration loggers =…
eventhorizon
  • 2,037
  • 3
  • 27
  • 40
3
votes
1 answer

How to take into account screen rotation when designing 3D scene?

I am using SCNView to present 3D scene. When the user rotates the device, the SCNView should resize so that the objects inside the scene still have the same heigh to width (or depth) ratio.. However, this is not what I observe. Everytime the screen…
sanjihan
  • 3,913
  • 6
  • 37
  • 78
3
votes
1 answer

How to find the translation values after a rotate about a point for a 2D image?

I am having issues getting the correct translation values after rotating my image. The code I have so far calculates the bounding box for a given rotation using basic trigonometry, it then applies a translation to the rotation matrix. The issue I am…
Robula
  • 544
  • 1
  • 10
  • 25
3
votes
2 answers

Calculate bounds of a box including rotation

I am working on collision system for my game that uses custom colliders. I used this to create bounding box for collisions. I am getting problem for the boxes where right and forward values have been used to create box. Otherwise its working fine.…
bhupinder
  • 185
  • 1
  • 5
  • 19
3
votes
2 answers

Rotate Animation is not working on Android 4.4.4

I have used rotate animation for my button. its working fine on Android 5.0 and above but when tested on Android 4.4 version. its blinks and doesn't rotate. AS suggested by some others i have tried with Layer type, fill after and fill before. But…
Deepika Lalra
  • 1,035
  • 1
  • 9
  • 24
3
votes
1 answer

Angular Impulses

So I'm using angular impulses to rotate a sprite with a physicsBody. I want one side of the screen to apply an impulse in one direction, whilst the other side of the screen will apply an impulse in the other direction (see code below). override…
3
votes
2 answers

Red-black tree - how to rotate if root is the grandparent?

I am working on writing red-black tree myself. But when I test the rotation that involves root to be rotated, somewhat it loses reference. Tree structure: 45 / \ 40x 70 / \ / 7 41 …
Meow
  • 16,125
  • 50
  • 122
  • 176
3
votes
0 answers

Use updateViewConstraints() to mimic native iOS camera interface behavior on orientation change

This is the third method I've tried to use to create an interface that smoothly mimics the behavior you see in the native iOS camera interface. If you re-orient the device in the iOS camera interface, you'll notice the interface mostly stays…
jreikes
  • 634
  • 2
  • 6
  • 18
3
votes
2 answers

UIViewController and UISplitViewController in UITabBarController shouldAutorotateToInterfaceOrientation

i have some Problems with my iPad Code. I have a UITabBarController which holds some UIViewController and a UISplitViewController. The problem is that the UIViewController and even the UISplitViewController dont recognize orientation Changes…
3
votes
1 answer

viewWillTransitionToSize causes non-rotating view controller to resize and reposition

A lot of people have discussed techniques for mimicking the native iOS camera app (where the UI elements pivot in-place as the device rotates). I actually asked a question about it before here. Most people have you lock the orientation of the UI,…
jreikes
  • 634
  • 2
  • 6
  • 18
3
votes
1 answer

How to find a point on image after rotation?

A point(x,y) on image need to be located on same image after rotating it. I have used imrotate, imtransform and imwarp for rotation of image (Code below show implementation of imwarp), but none seems to work for me. The output rotated image is…
erbal
  • 411
  • 5
  • 15
3
votes
1 answer

first person camera, turning around OPENGL

I have a perspective camera with Obs and VRP and Up vector. I want to implement turning around to act like an observer inside my scene. I have already implemented forward and backward as it is only adding same amount to z coordinate to Obs and VRP…
1 2 3
99
100