From: Alan W. I. <ir...@be...> - 2002-06-20 07:32:51
|
The current plpoly3 API is c_plpoly3(PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *draw) where abs(n) is the dimension of the x, y, z, and draw arrays. The sign of n is used for an entirely different purpose, if positive, the points are drawn in a clockwise way, if negative they are drawn counter-clockwise way, and this direction of drawing combined with the point data affects the choice of whether the 3D polygon is facing the viewer or not and whether it will be drawn or not. On general grounds, I would prefer to separate the two different purposes (dimensions and clockwise flag) into two separate parameters. Also, our python, yorick, and java front ends carry the dimensions of vectors as part of the array object, and those dimensions cannot be negative. So in any case I want to make a C function which is identical to plpoly3 except its first argument is not allowed to be negative and it has an additional (sixth) argument which is a clockwise flag. This C function will be the one wrapped for python (and presumably the other front ends with vector objects). That leaves the question of what to do with plpoly3, and I especially invite Maurice and Geoffrey to discuss this. Should we preserve it for a while as a deprecated function that we will eventually drop? Or should we simply change the argument list of plpoly3 so that it has the required 6 arguments? If the latter, does that mean everybody would have to change any programme that called plpoly3 or would a 5-argument call still work with the 6th argument being taken as NULL? I am showing my complete ignorance of the consequences of increasing the number of arguments for a shared library, and I don't really know what compiler error (if any) or warning would result from a 5 parameter call to a function which is declared in a header to have 6 parameters. But I am prepared to be educated on these matters....;-) Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |