Topic locked

Creating a multi-target with the XML file

July 23, 2014 - 6:10am #1

Hello,

I am trying to write a script to automatically create a multi-target in XML from a group of imageTarget in Unity.

Well my problem is that when I try to put multiple rotations in the XML none of the methods works (quaternions or add rotations consecutively)

What say On the Web: https://developer.vuforia.com/resources/dev-guide/multi-targets

<Part name="myPart" translation="10 0 0" rotation="0.7071 0 0 0.7071" />

The rotation in this example is defined by a quaternion performing the same rotation as the two examples above.

Multiple rotations can be added consecutively after each other to execute combined rotations. To add multiple rotations to the definition, separate the rotation instructions with a colon:

<Part name="myPart" translation="10 0 0" rotation="AD: 1 0 0 90; 0 1 0 -90" />

 

When I try with quaternions an ERROR say me that I have to use Radian or Euler angles, but when I use Euler angles added consecutively like in the example the parts of the multi-target are not been read, so there are no ChildTargets in the object

Are there another way? Am I doing something wrong?

My test:

<?xml version="1.0"?>
<QCARConfig xsi:noNamespaceSchemaLocation="qcar_config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Tracking>
    <ImageTarget name="FlakesBox.Front" size="90 120" />
    <ImageTarget name="FlakesBox.Top" size="90 60" />
    <ImageTarget name="FlakesBox.Bottom" size="90 60" />
    <ImageTarget name="FlakesBox.Left" size="60 120" />
    <ImageTarget name="FlakesBox.Right" size="60 120" />
    <ImageTarget name="FlakesBox.Back" size="90 120" />
    <MultiTarget name="Flakes">
      <Part name="FlakesBox.Front" translation="0 0 30" rotation="AD: 1 0 0 0; 0 1 0 0; 0 0 1 0" />
      <Part name="FlakesBox.Back" translation="0 0 -30" rotation="AD: 1 0 0 0; 0 1 0 180; 0 0 1 0" />
      <Part name="FlakesBox.Left" translation="-45 0 0" rotation="AD: 1 0 0 0; 0 1 0 -90; 0 0 1 0" />
      <Part name="FlakesBox.Right" translation="45 0 0" rotation="AD: 1 0 0 0; 0 1 0 90; 0 0 1 0" />
      <Part name="FlakesBox.Top" translation="0 60 0" rotation="AD: 1 0 0 -90; 0 1 0 0; 0 0 1 0" />
      <Part name="FlakesBox.Bottom" translation="0 -60 0" rotation="AD: 1 0 0 90; 0 1 0 0; 0 0 1 0" />
    </MultiTarget>
  </Tracking>
</QCARConfig>

Thank you.

Creating a multi-target with the XML file

July 25, 2014 - 12:00am #2
Topic locked