0

I had successfully integrate vuforia with jpct-ae. Now, I want to change the cube into other object (either obj or md2 file). Below is my code in ImageTargetRenderer.java (not sure is true or not). How can I call this object to render on a marker?

public void banana()
{
    world = new World();
    world.setAmbientLight(20, 20, 20);

    sun = new Light(world);
    sun.setIntensity(250, 250, 250);
    mngr = mActivity.getAssets();
    try {
        objStream = mngr.open("bananatree.obj");
        } catch (IOException e) {
            e.printStackTrace();
        }
    try {
        mtlStream = mngr.open("bananatree.mtl");
        } catch (IOException e) {
            e.printStackTrace();
        }

    model = Loader.loadOBJ(objStream, mtlStream, 1);
}
angie1289
  • 1
  • 3
  • The same way you do with the cube: apply the matrix transformations to your model. If you're not seeing the model you probably are rendering it too small or too big. – M Rajoy Oct 31 '13 at 16:54
  • @kelmer how should i do if i want to have more than one target to detect? – angie1289 Nov 08 '13 at 09:31
  • I don't recall exactly but the native part of vuforia had a target object in c++ that had a method to retrieve the target index. Just call different methods for each index. – M Rajoy Nov 08 '13 at 09:54

0 Answers0