Hi raft :
the model can be rendering according to you support .
However , the model can not be rendered in correct position ( the rotation is no right , as shown as attached)
case 1 : using the function : model.rotateXYZ(float r) : result : the model could no be in correct angle , some time the model even missing ;
case 2 : the matrix output from ARToolkit is correct Definitely , because i have verified via rendering a cube through OpenGL ES ;
case 3 : such bug still exists in JPCT-AE;
but i still do not know how to do. so do you have some idea about it ?
the code was shown as belown:
public void onDrawFrame(GL10 unused) {
//...
Matrix projMatrix = new Matrix();
projMatrix.setDump(ARNativeActivity.getProjectM());
projMatrix.transformToGL();
SimpleVector translation = projMatrix.getTranslation();
SimpleVector dir = projMatrix.getZAxis();
SimpleVector up = projMatrix.getYAxis();
cameraController.setPosition(translation);
cameraController.setOrientation(dir, up);
//...
for (Animated3D a : group) {
a.animate(index, animation);
Matrix dump = new Matrix();
dump.setDump(ARNativeActivity.getTransformationM());
dump.transformToGL();
a.clearTranslation();
a.translate(dump.getTranslation());
a.setRotationMatrix(dump);
Log.i("jpct_test", "runing in loop 2");
}
//...
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.display();
}