FROM : Gregory Weston
DATE : Wed Apr 02 20:47:06 2008
Quincey Morris wrote:
> On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote:
>
>> [xform translateXBy:center.x yBy:center.y];
>> [xform rotateByDegrees:[curGraphic GetAngle]];
>> [xform translateXBy:-center.x yBy:-center.y];
> This looks kind of wrong. Mathematically, wouldn't you want:
>
> [xform translateXBy:-center.x yBy:-center.y];
> [xform rotateByDegrees:[curGraphic GetAngle]];
> [xform translateXBy:center.x yBy:center.y];
>
> ?
Nope. The way the matrix multiplication works, the effect is that the
transformations take place in the opposite order of the way they
appeared in code.
DATE : Wed Apr 02 20:47:06 2008
Quincey Morris wrote:
> On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote:
>
>> [xform translateXBy:center.x yBy:center.y];
>> [xform rotateByDegrees:[curGraphic GetAngle]];
>> [xform translateXBy:-center.x yBy:-center.y];
> This looks kind of wrong. Mathematically, wouldn't you want:
>
> [xform translateXBy:-center.x yBy:-center.y];
> [xform rotateByDegrees:[curGraphic GetAngle]];
> [xform translateXBy:center.x yBy:center.y];
>
> ?
Nope. The way the matrix multiplication works, the effect is that the
transformations take place in the opposite order of the way they
appeared in code.
| Related mails | Author | Date |
|---|---|---|
| Ghufran Ahamad | Apr 2, 13:00 | |
| Jens Alfke | Apr 2, 16:42 | |
| Quincey Morris | Apr 2, 18:02 | |
| Gregory Weston | Apr 2, 20:47 |






Cocoa mail archive

