<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 27, 2015 at 11:21 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Mar 27, 2015 at 8:49 AM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Mar 27, 2015 at 10:38 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">No, neither the Tcl wrappers or the the Java wrappers can wrap<div>vtkBoundingBox as an "object".  But they could convert it into an</div><div>array of six floats.  For example, if a method takes an argument</div><div>of type "vtkBoundingBox" in C++, it could be wrapped as a Tcl</div><div>method that takes six floats.  If a method returns a vtkBoundingBox</div><div>in C++, it could be wrapped as a Tcl method that returns six floats.</div></div></blockquote><div><br></div></span><div>That'd be ok from a usability standpoint. Effort-wise, would this be a lot of work?</div></div></div></div></blockquote><div><br></div></span><div>Same estimate that I gave before: it would take more than an afternoon.</div></div></div></div></blockquote><div><br></div><div>Would you have time to do this? It looks like we're going to need to bite the bullet and train the wrappers one way or another. No worries, If you're too busy, I can give it a shot, though I may need to bug you a bit while going through. But I really wouldn't mind taking some time to learn how the wrapping mechanisms work.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I'm not introducing any API that takes vtkBoundingBox as input, so we'd just have to wrap the case where they're returned, if that makes it easier.</div><div><br></div><div>As an aside, would it be difficult to have these handled as objects? If we could handle vtkBoundingBox, we could probably start using the wonderful vtkVector implementations, too.</div></div></div></div></blockquote><div><br></div></span><div>It would be lots of work (I'm guessing two weeks minimum, probably much more).  It would be very nice for Java, not sure if it would be worthwhile for Tcl.</div><div><br></div><div>Wrapping vtkVector in python was especially tricky, because it was a templated class, and interpreted languages don't really support the concept of "templates".  So the python wrappers automatically wrap a dozen or so instantiations of the vtkVector template and store them in a mapping so that you can do this:</div><div><br></div><div><div>  v = vtkVector[float,2]()</div><div>  print v</div><div>    [0.0, 0.0]</div></div><div><br></div><div>So, in the python wrappers, vtkVector[float, 2] is equivalent to vtkVector<double, 2> in C++ (because python "float" is C++ "double").</div></div></div></div></blockquote><div><br></div><div>I was thinking more along the lines of the concrete vtkVector3d, etc subclasses to avoid the templating issues. Is lifetime management the main problem with these classes?</div><div><br></div><div>Dave</div></div></div></div>