Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - frantxesco

#1
As an example, when I point right to the marker the Model View Matrix I get from Native code is:

0.9893   0.0969    0.1082    0.0
0.0383   0.5448   -0.8376    0.0
-0.1401  0.8329  0.5353      0.0
38.0428 32.4253 206.1972   1.0
#2
Hi,

I still get a "null" object.

I set the collision mode as .setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
and .setCollisionOptimization(true).

In the touch event handler I call
SimpleVector ray = reproject2D3DWS(cam, fb, (int)xpos, (int)ypos, toFill).normalize();
where the function is written as in the post you linked.

Howevere, when I then call
Object[] result = objects[i].world.calcMinDistanceAndObject3D(cam.getPosition(), ray, 10000);
but result[1] is always NULL, even if I point to the marker and the cube occupies the entire screen.

Probably I am missing something when I pass the matrix from native code to java code. For instance I never set the camera position.
Any idea?

thanks a lot
#3
Hi there,

I am developing an Augmented Reality App that makes use of Vuforia Qualcomm SDK to detect marker detection and JPCT to overlap some 3D object over the real-scene marker.

I am using Vuforia for Android as AR engine and passing the ModelViewMatrix up to Java in order to be used by JPCT-AE. I do everything following the tutorial at http://www.jpct.net/wiki/index.php/Integrating_JPCT-AE_with_Vuforia and it works fine.

I am now trying to detect if an object is "receiving" a touch event from the user, so to do some processing with it.
I guess what I am trying to do is something like things in this thread http://www.jpct.net/forum2/index.php?topic=2461.0.
Unfortunately I'm not being able to make it work, since the calcMinDistanceAndObject3D method always returns NULL.

Could you help me with it, maybe sharing some code?
Should I do anything with the ModelViewMatrix in the JNI before passing it to Java?