• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Obtaining rotation from CTM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining rotation from CTM


  • Subject: Re: Obtaining rotation from CTM
  • From: David Duncan <email@hidden>
  • Date: Thu, 21 Aug 2008 08:51:46 -0700

On Aug 21, 2008, at 6:56 AM, Tilman Bender wrote:

Is it possible to obtain the angle of rotation from a tranformation- matrix created with CGAffineTransfrom?

If the CTM consists of only rotation and transform (or if it is scaled and you know the scale values) then it should be possible to reverse one. However...


Background:
I am building a simple kitchen-timer app, that should work like the ones in your mom's kitchen:
You set the time by touching a control and rotating it. Now I would like to obtain the current
angle of my clock.


I know how to use and create CGAffineTransform stuff, but I am not really familiar with the extraction of specific information from
such a matrix.


I would highly recommend that you retain the rotation as part of your data model instead of trying to extract it from the CTM. Not only that, but if your concatenating lots of rotations to your transform matrix in order to do the rotation, then your losing precision that can eventually cause your transform to do very weird things, causing odd graphical glitches.
--
David Duncan
Apple DTS Animation and Printing


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Obtaining rotation from CTM (From: Tilman Bender <email@hidden>)

  • Prev by Date: Re: Source List groups shifted down in NSOutlineView
  • Next by Date: How to pause and resume an animation that uses a transform (CATransform3DMakeScale)?
  • Previous by thread: Obtaining rotation from CTM
  • Next by thread: Re: Obtaining rotation from CTM
  • Index(es):
    • Date
    • Thread