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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › applyMatrix(float [4][4] Matrix) saveMatrix...
Page Index Toggle Pages: 1
applyMatrix(float [4][4] Matrix) saveMatrix... (Read 824 times)
applyMatrix(float [4][4] Matrix) saveMatrix...
Oct 22nd, 2009, 11:26am
 
hellow
is there any easy and quite fast way to
save, load and apply OpenGL scene matrix.

I know there is pushMatrix, popMatrix, and
applyMatrix( float, float, float, float ......), however

I'd like something I can use to store and restore the matrix as I need.
Something to store it and restore from data structure in RAM which I can edit and control.
like

float [][] MyMatrix1 = new float[4][4];
MyMatrix1 = saveMatrix();
MyMatrix1[1][3]+=0.15665;
loadMatrix(MyMatrix1);
Re: applyMatrix(float [4][4] Matrix) saveMatrix...
Reply #1 - Oct 22nd, 2009, 1:10pm
 
aha, OK, It§s writen in references

my problem solve
float[] Fs = new float[16];
PMatrix MyMatrixCopy = getMatrix();
MyMatrixCopy.get(Fs);
float[7]=0.15665;
MyMatrixCopy.set(Fs);
setMatrix(MyMatrixCopy);

but it's quite cumersome
is there a way how to acces to scene transform matrix direcly?

Like just get reference (pointer) to the transform matrix of scene or better to array of its values?
Page Index Toggle Pages: 1