Keystone corner co-ordinates from XML
I am using the keystone library and I want to get the co-ordinates for each of the surfaces I'm using from the XML file. I have tried code like:
This doesn't work because i think its illegal to make a PVector Array in this way but i'm stuck on how to do this.
here is a sample XML file:
<keystone>
<surface res="20" x="24.0" y="26.0" w="400" h="400">
<point i="0" x="-29.0" y="8.0" u="0.0" v="0.0"/>
<point i="20" x="74.0" y="-1.0" u="400.0" v="0.0"/>
<point i="420" x="-4.0" y="448.0" u="0.0" v="400.0"/>
<point i="440" x="86.0" y="369.0" u="400.0" v="400.0"/>
</surface>
<surface res="20" x="281.0" y="178.0" w="400" h="400">
<point i="0" x="162.0" y="155.0" u="0.0" v="0.0"/>
<point i="20" x="231.0" y="156.0" u="400.0" v="0.0"/>
<point i="420" x="159.0" y="222.0" u="0.0" v="400.0"/>
<point i="440" x="233.0" y="225.0" u="400.0" v="400.0"/>
</surface>
<surface res="20" x="282.0" y="-45.0" w="400" h="400">
<point i="0" x="154.0" y="25.0" u="0.0" v="0.0"/>
<point i="20" x="369.0" y="20.0" u="400.0" v="0.0"/>
<point i="420" x="168.0" y="285.0" u="0.0" v="400.0"/>
<point i="440" x="389.0" y="278.0" u="400.0" v="400.0"/>
</surface>
<surface res="20" x="338.0" y="322.0" w="400" h="400">
<point i="0" x="14.0" y="7.0" u="0.0" v="0.0"/>
<point i="20" x="99.0" y="6.0" u="400.0" v="0.0"/>
<point i="420" x="20.0" y="76.0" u="0.0" v="400.0"/>
<point i="440" x="96.0" y="84.0" u="400.0" v="400.0"/>
</surface>
</keystone>
If anyone knows how to properly extract this data I would really appreciate your help and can offer a reward!.
all the best,
Stephen