¡@

Home 

2014/10/15 ¤U¤È 10:13:30

iphone Programming Glossary: rotmatrix

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

an OpenGL compatible matrix. The code below retrieves and saves the current device motion. GLfloat rotMatrix 16 void getDeviceGLRotationMatrix CMDeviceMotion deviceMotion motionManager.deviceMotion CMAttitude.. multiplyByInverseOfAttitude referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22.. referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22 rotMatrix 6 rot.m32..

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

get the current gyro attitude rotation and then store it in an OpenGL compatible matrix. The code below retrieves and saves the current device motion. GLfloat rotMatrix 16 void getDeviceGLRotationMatrix CMDeviceMotion deviceMotion motionManager.deviceMotion CMAttitude attitude deviceMotion.attitude if referenceAttitude nil attitude.. attitude deviceMotion.attitude if referenceAttitude nil attitude multiplyByInverseOfAttitude referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22 rotMatrix 6 rot.m32 rotMatrix 7 0 rotMatrix 8 rot.m13 rotMatrix.. if referenceAttitude nil attitude multiplyByInverseOfAttitude referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22 rotMatrix 6 rot.m32 rotMatrix 7 0 rotMatrix 8 rot.m13 rotMatrix 9 rot.m23 rotMatrix..

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

then store it in an OpenGL compatible matrix. The code below retrieves and saves the current device motion. GLfloat rotMatrix 16 void getDeviceGLRotationMatrix CMDeviceMotion deviceMotion motionManager.deviceMotion CMAttitude attitude deviceMotion.attitude.. nil attitude multiplyByInverseOfAttitude referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22 rotMatrix 6 rot.m32.. multiplyByInverseOfAttitude referenceAttitude CMRotationMatrix rot attitude.rotationMatrix rotMatrix 0 rot.m11 rotMatrix 1 rot.m21 rotMatrix 2 rot.m31 rotMatrix 3 0 rotMatrix 4 rot.m12 rotMatrix 5 rot.m22 rotMatrix 6 rot.m32 rotMatrix 7 0 rotMatrix..