<br><br><div class="gmail_quote">2011/3/31 Matteo Bruni <span dir="ltr">&lt;<a href="mailto:matteo.mystral@gmail.com">matteo.mystral@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">2011/3/31 David Adam &lt;<a href="mailto:david.adam.cnrs@gmail.com">david.adam.cnrs@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt; 2011/3/31 Matteo Bruni &lt;<a href="mailto:matteo.mystral@gmail.com">matteo.mystral@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2011/3/31 David Adam &lt;<a href="mailto:david.adam.cnrs@gmail.com">david.adam.cnrs@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; + � � �/* Check the width */<br>
&gt;&gt; &gt; + � � � �v1 = *((D3DXVECTOR3*)(data+19*num_bytes_per_vertex));<br>
&gt;&gt; &gt; + � � � �v2 = *((D3DXVECTOR3*)(data+18*num_bytes_per_vertex));<br>
&gt;&gt; &gt; + � � � �length = D3DXVec3Length(D3DXVec3Subtract(&amp;v2,&amp;v1,&amp;v2));<br>
&gt;&gt; &gt; + � � � �ok(fabs(length-10.0f)&lt;admitted_error, &quot;Width expected= 10.0,<br>
&gt;&gt; &gt; received %f\n&quot;, length);<br>
&gt;&gt;<br>
&gt;&gt; This is not really different from the previous version: you are still<br>
&gt;&gt; making assumptions about the vertex ordering (in this specific case,<br>
&gt;&gt; you&#39;re assuming that vertices 18 and 19 have different X coordinate<br>
&gt;&gt; but the same Y and Z coordinate values).<br>
&gt;<br>
&gt; I have an application (Geoprofs) qui use the specific ordering of the<br>
&gt; vertex. So if we implement randomly the vertex, it will not work.<br>
<br>
</div>Really? Well, that makes my original point mostly moot.<br>
Still, I don&#39;t think the current tests are very meaningful. Do you<br>
know exactly what that application needs? You could test for that<br>
specific thing, so if, for example, the application requires the left<br>
face to be the first one, you could test just for that.<br>
<div class="im"><br></div></blockquote><div><br>The application colors the left face and the right face and applies geometric tranformations, so the student can see where arrives the faces in comparison with the initial box<br>
Fetching left and right faces is doing by fetching vertex .<br><br><br>�</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">

&gt;&gt;<br>
&gt;&gt; What I was proposing was something like this:<br>
&gt;&gt;<br>
&gt;&gt; for (i = 0; i &lt; num_vertices; i++)<br>
&gt;&gt; {<br>
&gt;&gt; � �float *vertex_data = data + i * num_bytes_per_vertex;<br>
&gt;&gt; � �if (vertex_data[0] &lt; xmin) xmin = vertex_data[0];<br>
&gt;&gt; � �if (vertex_data[0] &gt; xmax) xmax = vertex_data[0];<br>
&gt;&gt; � �if (vertex_data[1] &lt; ymin) ymin = vertex_data[1];<br>
&gt;&gt; � �if (vertex_data[1] &gt; ymax) ymax = vertex_data[1];<br>
&gt;&gt; � �if (vertex_data[2] &lt; zmin) zmin = vertex_data[2];<br>
&gt;&gt; � �if (vertex_data[2] &gt; zmax) zmax = vertex_data[2];<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; and then proceed to check whether the minimum and maximum values you<br>
&gt;&gt; got match the expected ones. This code snippet can certainly be<br>
&gt;&gt; improved, it is only to show you what I meant.<br>
&gt;&gt;<br>
&gt;&gt; Also, again, please try to fix the whitespaces...<br>
&gt;<br>
&gt; People changed the original style of the file. So, Which one must I� keep ?<br>
&gt;<br>
<br>
</div>Arguably it is better to adopt the style used for most recent code in<br>
wined3d or d3dcompiler_43. But, regardless of that, you should at<br>
least be consistent in the same function. You are mixing 0 or 1 spaces<br>
after commas, spaces or no spaces around operators and stuff like<br>
that.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>That looks reasonnable :D<br><br>Thanks again.<br><br>A+<br><br>David<br>�</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
&gt; Thanks for your advices ;)<br>
&gt;<br>
&gt; A+<br>
&gt;<br>
&gt; David<br>
&gt;<br>
</div></div></blockquote></div><br>