saejox
12-10-2011 21:27:17
Hi,
ogrexmltoflower.rb and its executable version are not producing correct flower file.
A very simple mesh:
turns into
it is missing vertex information.
any help?
ogrexmltoflower.rb and its executable version are not producing correct flower file.
A very simple mesh:
<?xml version="1.0" encoding="UTF-8"?>
<mesh>
<sharedgeometry vertexcount="24">
<vertexbuffer texture_coords="0" positions="true" colours_diffuse="False" normals="true">
<vertex>
<position y="0.211230" x="1.000000" z="-1.000000"/>
<normal y="0.000000" x="0.000000" z="-1.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="1.000000" z="-1.000000"/>
<normal y="0.000000" x="0.000000" z="-1.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="-1.000000"/>
<normal y="0.000000" x="0.000000" z="-1.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="-1.000000"/>
<normal y="0.000000" x="0.000000" z="-1.000000"/>
</vertex>
<vertex>
<position y="0.211229" x="1.000000" z="1.000000"/>
<normal y="-0.000000" x="0.000000" z="1.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="1.000000"/>
<normal y="-0.000000" x="0.000000" z="1.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="1.000000"/>
<normal y="-0.000000" x="0.000000" z="1.000000"/>
</vertex>
<vertex>
<position y="-0.211231" x="0.999999" z="1.000000"/>
<normal y="-0.000000" x="0.000000" z="1.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="1.000000" z="-1.000000"/>
<normal y="-0.000001" x="1.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="0.211229" x="1.000000" z="1.000000"/>
<normal y="-0.000001" x="1.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="-0.211231" x="0.999999" z="1.000000"/>
<normal y="-0.000001" x="1.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="1.000000" z="-1.000000"/>
<normal y="-0.000001" x="1.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="1.000000" z="-1.000000"/>
<normal y="-1.000000" x="-0.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="-0.211231" x="0.999999" z="1.000000"/>
<normal y="-1.000000" x="-0.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="1.000000"/>
<normal y="-1.000000" x="-0.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="-1.000000"/>
<normal y="-1.000000" x="-0.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="-1.000000"/>
<normal y="0.000001" x="-1.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="-0.211230" x="-1.000000" z="1.000000"/>
<normal y="0.000001" x="-1.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="1.000000"/>
<normal y="0.000001" x="-1.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="-1.000000"/>
<normal y="0.000001" x="-1.000000" z="-0.000000"/>
</vertex>
<vertex>
<position y="0.211229" x="1.000000" z="1.000000"/>
<normal y="1.000000" x="0.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="1.000000" z="-1.000000"/>
<normal y="1.000000" x="0.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="-1.000000"/>
<normal y="1.000000" x="0.000000" z="0.000000"/>
</vertex>
<vertex>
<position y="0.211230" x="-1.000000" z="1.000000"/>
<normal y="1.000000" x="0.000000" z="0.000000"/>
</vertex>
</vertexbuffer>
</sharedgeometry>
<submeshes>
<submesh usesharedvertices="true" material="Material" use32bitindexes="False">
<faces count="12">
<face v1="0" v2="1" v3="2"/>
<face v1="0" v2="2" v3="3"/>
<face v1="4" v2="5" v3="6"/>
<face v1="4" v2="6" v3="7"/>
<face v1="8" v2="9" v3="10"/>
<face v1="8" v2="10" v3="11"/>
<face v1="12" v2="13" v3="14"/>
<face v1="12" v2="14" v3="15"/>
<face v1="16" v2="17" v3="18"/>
<face v1="16" v2="18" v3="19"/>
<face v1="20" v2="21" v3="22"/>
<face v1="20" v2="22" v3="23"/>
</faces>
</submesh>
</submeshes>
</mesh>
turns into
# 'platform.mesh.xml' converted by OgreXMLToFlower
type convex
indexes 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23
it is missing vertex information.
any help?