i need to do some computation Java side, and i need Vuforia to tell my Java script what the current posematrix is.
so i wrote a simple function in C++
JNIEXPORT QCAR::Matrix44F JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_getCurrentPoseMatrix(JNIEnv *, jobject)
QCAR::State state = QCAR::Renderer::getInstance().begin();
const QCAR::TrackableResult* result = state.getTrackableResult(0); //we only have one trackable
const QCAR::Trackable& trackable = result->getTrackable();
modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(result->getPose());
this compiles correctly. However, how am i supposed to declare this function in Java?
public native ????? getCurrentPoseMatrix();
i then need to pass this matrix to a Matrix4f in java.
(In general, how do i pass around non primitive data?)
thanks in advance!