I am having trouble compiling org.xith3d.loaders.tds.TexMapProcessor. It looks like it is relying upon a previous version of com.xith3d.scenegraph.Texture.
Correct, the Texture class was refactored to better account for mipmap textures. I didn’t notice the error as I hadn’t updated my Eclipse loaded version of Xith3D with the recent texture changes
I have made the nessesary changes to the 3DS loader, so please cvs update.
Incidently, this is one of the good reasons for having code such as this in the xith-tk – the code is kept up to date by the Xith3D maintainers whenever something changes.
OBJLoader2 and MaterialLibLoader2 are now stable. I was able to successfully test by using them in the Whoola 3D Browser. Any comments or suggested changes to the code from those tracking? If none, I will use the modified classes to overwrite the original OBJLoader and MaterialLibLoader sometime next week. I will then move on to the MD2 and 3DS loaders.
I have had a chance to look at your changes. They look great to me. I think your enhancements are very useful.
I have a few non-functionality related issues which may sound petty but I feel are important for a community project such as this one:
1. When making changes to code such as this, it’s better not to combine formatting changes with functionality changes, as the latter can get lost in the former (making it harder for someone evaluating to actually see what’s changed). I’m referring to changes like this:
By all means make formatting changes that help readability as they do in this example, but please keep those changes to a seperate commit.
2. Is there any reason the entire class is indented one level? Because every line is changed, diff will show the entire file being removed and replaced. While on my machine I can (and did) use the -w argument, the diff’s generated by Collabnet (which can be handy) will be useless.
3 Is there any reason why you havn’t followed the coding style of the original MD2Loader / xith3d project in general? We don’t put brackets on a new line, nor use the bulk slashes for comments. To me, MD2Loader is more readable than MD2Loader2, but stylistic preferences aside, I think it is always best to stick to the one style for a project, and at least stick to the same style for a single package-tool. If you were adding a stand-alone tool of your own creation, I wouldn’t mind, but having two different styles used in the one package I think makes it harder to understand the package as a whole.
To summarise: I think the API changes are excellent, but the formatting changes not so. Would it be possible to keep the code style as it is?
I really hope I havn’t offended you, the last thing I want to do is push away someone who is making a valuable contribution to Xith3D as you are - but I feel I need to raise these issues.
Whenever I substantially revise a class written by someone else, I often reformat as I go so that it gradually becomes comprehensible to me. I learned to program in the military which means using a format that is as readable as possible to ensure maintainability. The style you see there is something that I evolved over 25 years.
I’m not willing to spend the time to revert the code style but I would have no objections if someone else did so, perhaps using an automated tool such as an IDE.
Fair enough. Do you agree with my comments though?
Comment #3 was made from a maintainability point of view as I think it is best to have one formatting style for one module. Comment #1 I do feel is important because if someone is trying to isolate a regression bug by looking back though the commit logs and at changes, it’s much easier when any stylistic changes are in their own commits (and therefore can simply be ignored by the bug hunter).
Like I said, I’m only referring to the modification of existing modules here.
Thanks again for the enhancements, if I find the time I will merge the changes and commit, until then it’s perfectly usable as it is.
The most recent one that I wrote at a company, however, was much more lenient. I pretty much just said read Chapter 7 in Java in a Nutshell and don’t use tab characters. I will nag novice junior Java programmers about some things but I don’t put up a fuss if they ignore me. I’m pretty much a believer in code ownership.
When I’m working with code that someone else wrote, I will keep the same style if the changes are minor and I’m not inheriting the code on a permanent basis. If the changes are major such as an overhaul of most of a class or I am inheriting the code permanently, I will make the changes.