Hey Luis,<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><br>I have another question, when you say that the "pdata-index-map! supplies the current pdata index number to the procedure", do you refer that I am giving a name to the current pdata?<br>
<br></div></blockquote><div><br></div><div>Well, no. What pdata-index-map! does is iterate over the pdata like pdata-map! does (that means; it goes over all vertices in turn) and in addition to the reference to the vector in question you also get the "index" of that vector, being a integer between 0 and (pdata-size).</div>
<div><br></div><div>This is useful because when you know you are dealing with a list of triangles, for example, you will know that indexes 0, 1 and 2 refer to the corners of one polygon and 3, 4 and 5 refer to another but there is no polygon using indexes 1, 2 and 3. In the case of a quad-list you'd likely treat the indexes differently.</div>
<div><br></div><div>Within the function you apply to to these vertices you may use any name you like as a local variable.</div><div><br></div><div>The example you give doesn't actually use the "index" part of "pdata-inex-map!", but with these notes the example you get when you type (help pdata-index-map!) might make more sense.</div>
<div><br></div><div>Hope that helps,</div><div>Kas.</div></div></div>