<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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 class="">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><div>Same estimate that I gave before: it would take more than an afternoon.</div><div> </div><div><br></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"><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><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> - David</div></div>