We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Matrix access (Read 1226 times)
Matrix access
Jun 2nd, 2005, 4:58pm
 

I may have mentioned this before...

but does anyone know how to read the Matrix variables that printMatrix() refers to?

It's changed since Alpha
Re: Matrix access
Reply #1 - Jun 2nd, 2005, 11:55pm
 
hm, no api for this yet so it may change to be more consistent. matter of fact, if you're in 2D it's not currently available. but in 3D you can use:

Code:
PGraphics3 p3 = (PGraphics3) g;

// the projection matrix
PMatrix p = p3.projection;

// the camera matrix, whcih is copied into the modelview on beginFrame
PMatrix c = p3.camera;

// the model+view matrix used to shape things on screen
PMatrix mv = p3.modelview;
Re: Matrix access
Reply #2 - Jun 3rd, 2005, 10:52am
 
Thanks, Ben!
Page Index Toggle Pages: 1