<br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 5:43 PM, Tharindu De Silva <span dir="ltr"><<a href="mailto:tsameera1@gmail.com">tsameera1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Andy,<div><br></div><div> Thank you for the comments. Sorry I didn't notice the trailing white spaces. </div><div> </div><div> By 'example' i meant the test, I will go through the wiki page and try to make an example. </div>
<div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>Tharindu</div></font><div><div></div><div class="h5"><div><div class="gmail_quote">On Tue, Aug 9, 2011 at 4:44 PM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tharindu,<br><br>I cleaned up the code a bit doing things like getting rid of trailing whitespace (gerrit will highlight this as red to warn about it), bracketed some if/else conditions, and added a std::vector to take care of some dynamic memory allocation. I also got rid of the compile warnings in the test. These changes are at:<br>
<a href="http://review.source.kitware.com/#change,2418" target="_blank">http://review.source.kitware.com/#change,2418</a><br><br>One thing to note is that I made it more apparent that a virtual function was getting called in the destructor. In general this is bad practice (see <a href="http://www.artima.com/cppsource/nevercall.html" target="_blank">http://www.artima.com/cppsource/nevercall.html</a>).<br>
<br>I was able to run the test successfully. In your previous email you mentioned an example. Did you mean test? I couldn't find anything called CellTreeLocator.cxx except for the test. If you wanted to add in a different example, please check out: <a href="http://www.vtk.org/Wiki/VTK/Examples" target="_blank">http://www.vtk.org/Wiki/VTK/Examples</a>. This is not required but I'd encourage you to do this to help other people better understand and utilize your code.<br>
<font color="#888888">
<br>Andy</font><div><div></div><div><br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 11:23 AM, Tharindu De Silva <span dir="ltr"><<a href="mailto:tsameera1@gmail.com" target="_blank">tsameera1@gmail.com</a>></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">
Hi,<div><br></div><div> I revert the renaming of internal variables to their original names and made a note on the code that they were derived from avtCellLocatorBIH class in VisIT, so that the people familiar with that code can make improvements. The current code can be found in <a href="http://review.source.kitware.com/#change,2413" target="_blank">http://review.source.kitware.com/#change,2413</a>.</div>
<div><br></div><div> There is an example named CellTreeLocator.cxx at Filtering/Examples/Cxx. Please let me know if you encounter any bugs in running this.</div><div><br></div><div>Thank you.</div><div> <br><br><div class="gmail_quote">
On Tue, Aug 2, 2011 at 5:08 PM, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>></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 link="blue" vlink="purple" lang="EN-GB">
<div>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">I’m not sure that renaming all the internal variables from their original names was a good idea.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">The original code came from the visit avtXXX class and there’s a strong possibility that the visit developers will make changes/improvements similar to the
intersectBox type methods that I’m adding. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">Renaming the internals serves no purpose other than to make it harder to sync our version with theirs.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">I am aware that I have radical opinions about the dreadful kitware code style but for me this is an unnecessary barrier to future collaboration.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">JB<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"><u></u> <u></u></span></p>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10pt" lang="EN-US">From:</span></b><span style="font-size:10pt" lang="EN-US"> Tharindu De Silva [mailto:<a href="mailto:tsameera1@gmail.com" target="_blank">tsameera1@gmail.com</a>]
<br>
<b>Sent:</b> 02 August 2011 18:18<br>
<b>To:</b> Biddiscombe, John A.; Andy Bauer; VTK Developers<br>
<b>Cc:</b> <a href="mailto:trshash@gmail.com" target="_blank">trshash@gmail.com</a></span></p><div><br>
<b>Subject:</b> Re: [vtk-developers] Cell Tree Locator Update<u></u><u></u></div><p></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi,<u></u><u></u></p><div><div></div><div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> I did some formatting changes to the code according to vtk guidelines and added the patch given by John. The code can be found in <a href="http://review.source.kitware.com/#change,2362" target="_blank">http://review.source.kitware.com/#change,2362</a>.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Some formatting still needs to be done.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Helper classes, vtkCellTree and vtkCellTreeNode, are made public in the current version to make them accessible by sub-classing to test for additional functions implemented in vtkModifiedBSPTree. This can be made protected after all the
functions are available in vtkCellTreeLocator.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The standard template library functions are used in this class that might need to be changed as well.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Please let me know if you come across any other bugs or if there are improvements that can be made to this code.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Tharindu <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Jul 29, 2011 at 4:02 PM, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">I’ve fixed the crash caused by a numeric overflow. some compilers might not mind and not cause the segfault – I believe the intent was
to allow the std:::numeric_limits max() to cause a large volume result which would exclude the bucket from consideration.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">I’d added a check to stop it. Might be worth adding a few other tests as this class is new and we have little experience with it. I’ll
add one myself I think.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">patch attached</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)">JB</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;color:rgb(31, 73, 125)"> </span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br>