Log in or register to post comments

getPose() translation always (0,0,0)

June 22, 2015 - 7:07pm #3

Hi, 

As stated in the title, the model position from result.getPose().getData()[3], result.getPose().getData()[7] , result.getPose().getData()[11] always returns (0,0,0) .

I am trying to integrate the libgdx and vuforia, I just need the correct 3d translation vector and feed it to the libgdx and everything will be perfect. 

 

The camera attributes are already set using 

<pre class="brush: java">

float cameraX         = invTranspMV.getData()[12];
            float cameraY         = invTranspMV.getData()[13];
            float cameraZ         = invTranspMV.getData()[14];
            float cameraRightX    = invTranspMV.getData()[0];
            float cameraRightY    = invTranspMV.getData()[1];
            float cameraRightZ    = invTranspMV.getData()[2];
            float cameraUpX       = -invTranspMV.getData()[4];
            float cameraUpY       = -invTranspMV.getData()[5];
            float cameraUpZ       = -invTranspMV.getData()[6];
            float cameraDirX      = invTranspMV.getData()[8];
            float cameraDirY      = invTranspMV.getData()[9];
            float cameraDirZ      = invTranspMV.getData()[10]; </pre>
 
Thanks for the suggestion.
 
Best Regards,
Win

getPose() translation always (0,0,0)

June 30, 2015 - 2:50pm #2

What are the remaining values of the pose matrix?

getPose() translation always (0,0,0)

July 2, 2015 - 8:03pm #1
Hi,
 
It must have been my logging the [3,7,11] are not zeros anymore. 
 
07-01 09:05:15.944: D/row 1(7350):  result.getPose().getData()[0] -0.019116044 result.getPose().getData()[1] -0.99944913 result.getPose().getData()[2] 0.027128845 result.getPose().getData()[3] 6.0823894
07-01 09:05:15.944: D/row 2(7350):  result.getPose().getData()[4] -0.9586686 result.getPose().getData()[5] 0.010618338 result.getPose().getData()[6] -0.28432694 result.getPose().getData()[7] -236.82265
07-01 09:05:15.944: D/row 3(7350):  result.getPose().getData()[8] 0.28388226 result.getPose().getData()[9] -0.03144278 result.getPose().getData()[10] -0.9583435 result.getPose().getData()[11] 2846.6191
 
 
07-01 10:03:43.585: I/lookat(10062): [0.042959124, 0.5940857, -0.80325377]
07-01 10:03:43.585: I/direction(10062): [-0.033643484, -0.8026798, -0.59546053]
07-01 10:03:43.585: I/position(10062): [643.6657, -1341.3374, 2102.9375]
07-01 10:03:43.585: I/up(10062): [0.9985101, -0.052604713, 0.014495311]
07-01 10:03:43.593: I/log(10062): [197.20697, 743.75024, 2458.4106]
07-01 10:03:43.616: I/lookat(10062): [0.042959124, 0.5940857, -0.80325377]
07-01 10:03:43.616: I/direction(10062): [-0.033643484, -0.8026798, -0.59546053]
07-01 10:03:43.624: I/position(10062): [643.6657, -1341.3374, 2102.9375]
07-01 10:03:43.624: I/up(10062): [0.9985101, -0.052604713, 0.014495311]
07-01 10:03:43.624: I/log(10062): [197.20697, 743.75024, 2458.4106] <-------- result.getdata()[3], result.getdata()[7] , result.getdata()[11] 
 

 

These are the two logs. The secnod one is the camera position, direction and lookat. 

 

I am not seeing any 3d models renderered after correcting the model position. 

 

Best Regards, 

Win

Log in or register to post comments