469,909 Members | 1,630 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

How to implement affine transform stack

I think SetWorldTransform/GetWorldTransform/ModifyWorldTransform are the
functions I want. Does anyone have an example that implements a stack?

(1) I want to call SetWorldTransform in MM_ANISOTROPIC (why does not this
work?)

(2) Draw some rectangles.
(3) Call ModifyWorldTransfom to draw more rectangles inside the last
rectangle where the origin is now the upper left corner of the last rectangle.
(4) repeat step 3.
(5) Pop my stack back to the original origin.

How would I do this? Anyone got an example? Would I push a copy the entire
current transformation matrix on to a stack? I would I just push the changes
on to the stack and when I pop, compute the inverse matrix (ugh...) and
multiply that by the current matrix (ugh...) to get the original matrix...

Anyone got an example?

Thanks!
Siegfried
Aug 25 '08 #1
0 875

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Morten Aune Lyrstad | last post: by
9 posts views Thread by Doug Stiers | last post: by
7 posts views Thread by Cerebrus99 | last post: by
2 posts views Thread by Adam dR. | last post: by
5 posts views Thread by ravi | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.