ExtLoader

I created a Loader that does the following:


     * Chooses delegate Loader to instantiate based on filename extension.
     *
     * <p>
     * Filename extension mapping is case insensitive.
     * The following mappings are established by default:
     * <table border="1">
     * <tr><td>3ds</td><td>org.xith3d.loader3ds.Loader3DS  </td></tr>
     * <tr><td>md2</td><td>org.xith3d.loaders.md2.MD2Loader</td></tr>
     * <tr><td>obj</td><td>org.xith3d.loaders.obj.OBJLoader</td></tr>
     * </table>
     * </p>
     * 
     * <p>
     * ExtLoader is extensible in that additional filename extensions and
     * associated Loader classes can be added or replaced using the map()
     * method.
     * Mapped classes must implement interface com.xith3d.loaders.Loader
     * and must provide a no-argument constructor method.
     * </p>

The 3DS loading has not been tested yet because I do not have any 3DS models on hand but the MD2 and OBJ loading work fine. I used Loader3DS instead of TDSLoader for “.3ds” files because I just now discovered that Loader3DS already implemented interface Loader.

The source code for ExtLoader will be available for viewing here within 24 hours:
http://cvs.sourceforge.net/viewcvs.py/whoola/core/src/com/whoola/core/media/xith/

Does Xith want this class. If so, should I put it in package org.xith3d.loaders or org.xith3d.loaders.ext?

Looks good. Probably org.xith3d.loaders.ext would be best, that way it’s self-contained and can have it’s own package level javadocs (like this one: http://xith.org/javadoc/org/xith3d/loaders/obj/package-summary.html if you look at the bottom it lists the dependancies, etc). The main reason for this is to make it easy for people to chop out bits of the toolkit they don’t need if the .jar size matters.

I didn’t realise there was a second 3DS loader until you mentioned it. Apart from the difference you outlined (implementing the Loader interface), do you know of any other differences?

Will.

OK, I checked them in. I split it into two classes, one with dependencies and one without. Use is documented in the javadoc and package.html.

I just stumbled onto it. I know nothing about it and I have not tested it, mainly because I do not have any 3DS models in the company library. I’m going to be lazy on that one and wait for someone else to test for me. We can fix or remove as required in the future.

Does Xith accept Java 5.0 language syntax or are we sticking to 1.4?

Great.

OK.

Cheers,

Will.

The core is 1.4, and there are no current plans to change yet, so it’s best that the xith-tk project sticks to 1.4 for now as well.

Cheers,

Will.