On 1/25/07, Aron Stansvik <elvstone@...400...> wrote:
Right there was one last thing I wanted to ask you. The methods in nodepath that I need to use from the toolbar to get node count, position et.c. are declared static (naturally). Should I just make declarations for them in nodepath.h and remove their static-ness, or should I make new methods that wrap a call to the static ones?
Wrappers for wrapping sake are not a good idea. If you see that the function needs exactly what you need, feel free to unstatic it and declare it in .h. Make a wrapper only when you need to add some functionality which is missing in the native function. There may also be cases when a function does _more_ than you need, in which case you'll need to break it into two and export one of them.
A still better approach would be to convert more of the C-style functions of nodepath into methods of the Path class. As you may know, we're in a slow transition from C to C++, and in this case, the struct itself has been made a class long ago, but most of the functions remain separate. If you convert them into class methods, we'll be able to properly sort them into private/public.