I try to use that modelview matrix returned by the AR engine from jni, which is a float [4*4] matrix, and I try to do this:
Matrix mat = new Matrix();
mat.fillDump(mvmat);
world.getCamera().setBack(mat);
I don't see the model (I am using the Ninja sample) when first started, then i use my finger to drag a bit to rotate the model out and become visible. Then I move the phone arround to see if the model will move (the matrix changes). I am expecting that even the matrix could be wrong, the model (or the camera) should move as well, but nothing happen. I also try to use the "mat.invert()" but doesn't seem to help..
Is it the right way to apply a matrix on a camera?
I was also thinking about just calling those OpenGL calls to set the projection and model view matrix before calling those jpct "world" functions but without much success so far:
world.renderScene(frameBuffer);
world.draw(frameBuffer);
what do you mean by "confuse the engine if you use the objects' matrices"? How do I make sure that the jpct objects matrices are not being used at all? But it is properly not a good idea i guess to try to override the engine matrix since if i want to make a game i will need to animate the model and move it around using the engines function calls..
More info on what the projection and modelview matrix (4*4) looks like below, could you let me know if you have a chance what function in jpct to use to convert the model view matrix and how to correctly apply them? Thanks a lot!!
__ pmat:
2.2,0.0,0.0,0.0,
0.0,-3.3,0.0,0.0,
0.0,-0.00625,1.002002,1.0,
0.0,0.0,-4.004004,0.0,
__ mvmat:
0.88026357,-0.11042596,0.46145666,0.0,
-0.05797603,-0.99028623,-0.12638049,0.0,
0.47092986,0.08449472,-0.8781149,0.0,
37.16981,-27.505302,541.533,1.0,