[PD] using gem for some interactions

Mathieu Bouchard matju at artengine.ca
Mon Aug 28 23:00:44 CEST 2006


On Mon, 28 Aug 2006, B. Bogart wrote:

> For unrotated rectangles its easy, for other shapes of GUI objects is 
> not so easy.

For any linear transform (rotation, translation, reflection, scaling and 
shearing), if you can get the matrix that transformed the original 
rectangle, then you can separate the translation and non-translation parts 
of it and then inverse the latter using [mtx_inverse] from iemmatrix or 
[lti.MatrixInversion] from ltilib. This will allow to take points on the 
screen and undo the transform on them.

However, I think that the transforms all have to be 2-D, else recovering 
3-D world positions from screen positions becomes much more difficult...

I think that OpenSG (OpenSceneGraph) makes it easy (or at least easier) to 
deal with the mouse than OpenGL/GEM. There's an OpenSG library for Pd in 
the works, by Mike Wozniewski (from Montréal).

(I hope to schedule a presentation on OpenSG soon, maybe at the next 
PureData Montréal Users Group meeting)

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list