• 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
Help with values for CATransform3DMakeRotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with values for CATransform3DMakeRotation


  • Subject: Help with values for CATransform3DMakeRotation
  • From: "Mac Man" <email@hidden>
  • Date: Thu, 7 Feb 2008 01:44:22 -0600

I've been working on a perspective transform to get a rectangular image to
look like the Dock in Leopard (3D perspective look), and I've got the
following code working to at least change the angle of the rectangle:

NSView *contentView = [mainWindow contentView];

CALayer *myLayer = [CALayer layer];

myLayer.contents = [NSImage imageNamed:@"test.png"];

myLayer.transform = CATransform3DMakeRotation(-.75,20,2.5,1);

[contentView setLayer:myLayer];

[contentView setWantsLayer:YES];


The above code has the appropriate connections in Interface Builder, of
course.  The values I entered for CATransform3DMakeRotation are arbitrary, I
just don't understand enough of the math behind it to make any sense.  I've
googled perspective transformation matrices as suggested in a different
thread, but the values presented there didn't help at all.  Am I missing
something really simple with regards to CATransform3DMakeRotation?  The
Apple documentation for the CATransform family in general is really lacking,
especially for people like me who don't have a background in graphics
programing and heavier math!


Any help anyone can provide in clearing things up for me would be greatly
appreciated!


Devon
_______________________________________________

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

  • Follow-Ups:
    • Re: Help with values for CATransform3DMakeRotation
      • From: Bill Dudney <email@hidden>
  • Prev by Date: Enabled Binding and Array Controllers
  • Next by Date: Re: Understanding objc_assign_strongCast
  • Previous by thread: Re: Enabled Binding and Array Controllers
  • Next by thread: Re: Help with values for CATransform3DMakeRotation
  • Index(es):
    • Date
    • Thread