- Sort Posts
- 4 replies
- Last post
More Targets and models
You basically need to use the same openGL code that you find in the sample, but with minor adaptations to use your own 3D models;
the best is to follow this tutorial:
https://developer.vuforia.com/forum/faq/android-how-do-i-replace-teapot
More Targets and models
Hi,
ok i have my own dataTarget:
second.dat
second.xml
i put this stuff in the assetsFolder
Than i go to the ImageTargets.cpp
Create the data sets:
second = imageTracker->createDataSet();
if (second == 0)
{
LOG("Failed to create a new tracking data.");
return 0;
}
Than:
Load the data sets:
if (!second->load("second.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
{
LOG("Failed to load data set.");
return 0;
}
Ah, ok the renderFrame () function is:
JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv* env, jobject obj)
{..
But what i have to put in ?
More Targets and models
Hi, you need first to use a device database which contains your own additional targets;
then you can enable them by loading and activating your database (see how the DataSet class is used in the sample);
then in the renderFrame() function you can find the OpenGL code to render a 3D model for each detected target.
I need to get the transformation matrix for my both markers.
Any sample, how to do that?