<div dir="ltr">Hi David,<br><br>I need a bit of clarification as I am not much familiar with c++.<br><br><br>double n[3];<b><span style="color: rgb(255, 0, 0);"> // you have declared the variable n</span></b><br><br>
  polygon-&gt;ComputeNormal(<div id=":ss" class="ii gt">polygon-&gt;GetPoints()-&gt;GetNumberOfPoints(),<br>
static_cast&lt;double*&gt;(polygon-&gt;GetPoints()-&gt;GetData()-&gt;GetVoidPointer(0)),<br>
<b><span style="color: rgb(255, 0, 0);">n);// How do you set this as an input to an argument as it doesn&#39;t hold any value</span></b><br><br>Did you mistyped or am I misinterpreted?<br><br>Thanks,<br><br>Jothy<br><br>
<br></div><br><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 12:43 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span> wrote:<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">On Tue, Apr 6, 2010 at 11:33 AM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt; wrote:<br>
&gt; n is the normal to the face of the polygon<br>
&gt; numPts is the number of points in the polygon<br>
&gt; pts is an array of xyz points<br>
<br>
<br>
</div>The call was pretty nasty:<br>
<br>
<br>
  double n[3];<br>
  polygon-&gt;ComputeNormal(polygon-&gt;GetPoints()-&gt;GetNumberOfPoints(),<br>
static_cast&lt;double*&gt;(polygon-&gt;GetPoints()-&gt;GetData()-&gt;GetVoidPointer(0)),<br>
n);<br>
<br>
  double bounds[6];<br>
  polygon-&gt;GetPoints()-&gt;GetBounds(bounds);<br>
<br>
  cout &lt;&lt; &quot;test x in polygon? &quot; &lt;&lt; polygon-&gt;PointInPolygon(x,<br>
polygon-&gt;GetPoints()-&gt;GetNumberOfPoints(),<br>
static_cast&lt;double*&gt;(polygon-&gt;GetPoints()-&gt;GetData()-&gt;GetVoidPointer(0)),<br>
bounds, n) &lt;&lt; endl;<br>
<br>
I just wrote a convenience function and submitted it to the developers<br>
mailing list. If it is approved, in the future you can simply call<br>
<br>
cout &lt;&lt; &quot;test x in polygon? &quot; &lt;&lt; polygon-&gt;PointInPolygon(x) &lt;&lt; endl;<br>
<br>
Thanks,<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br></div>