By gavinmh
on Wed, 06/20/2012 - 17:07
Hello,
I am trying to pass an int representing the name of the current trackable back to Java. This is working for the "chips" and "stones" ImageTargets, but the frame marker target I have added is not correctly identified.
My C++:
[CODE] ...
if(strcmp(trackable->getName(), "mymarker1"){
trackerNum = 3;
}
else if(strcmp(trackable->getName(), "chips")){
trackerNum = 2;
}
else if(strcmp(trackable->getName(), "stones")){
trackerNum = 1;
}
else {
trackerNum = 0;
}
LOG("tapped inside the target!");
displayMessage(trackerNum, intersection.data[0], intersection.data[1]);[/CODE]
My config.xml:
[CODE]<?xml version="1.0" encoding="UTF-8"?>
[/CODE]
The correct int is assigned for the "chips" and "stones" targets, but the frame marker is always assigned the int for the first of "chips" and "stones" to appear in the control statement (in this case, the frame marker is assigned the "chips" value of 2, but if I place the control statement for "stones" before the statement for "chips" then the frame marker is assigned the value for
"stones").
Can anyone help me fix this control statement or find a different way to pass a unique ID for the trackables to Java?
I appreciate the assistance.
Re: getName() for frame marker target
Re: getName() for frame marker target