Toolkit cleanup

We need to clean up the xith toolkit :

  • For the geometry classes, some extends GeometryArray, some Shape3D. We need a common interface/design here.
  • For the loaders, we need a common interface too (does the actual Loader interface fit ?). Loader3ds isn’t a good name for a package. Ext isn’t at the good place (don’t need a specific package).

Hi,

Common interface for loaders was discussed a time ago, but discussion end up with nothing (OK, not really, but with the point that it is too complicated to find common points for most of the formats, especially ones that support animations etc., because of animation is defined and controlled format-specific way, and callers want to control animation etc. etc. etc.).

My suggestion is that you search through older (really older - maybe 1-1.5 years ago) posts in this forum, and we may give “loader standartization” effort another try - why not? at my opinion, at least static model loading can be standartized at least on very high level (like "Node loadFromResource(…)).

Yuri

I agree.

Maybe we can have classes StaticModel, MD2AnimModel, 3DSAnimModel, etc… And we haven’t a skeletal animation lib yet…

[quote="<MagicSpark.org [ BlueSky ]>,post:1,topic:26341"]
For the loaders, we need a common interface too (does the actual Loader interface fit ?). Loader3ds isn’t a good name for a package. Ext isn’t at the good place (don’t need a specific package).
[/quote]
For the Loaders, I strongly recommend that they extend from this abstract class:
http://xith.org/javadoc/com/xith3d/loaders/LoaderBase.html

Which implements this interface:
http://xith.org/javadoc/com/xith3d/loaders/Loader.html

This interface is based on the Java 3D API standard.

Here are two that I modified to implement this interface:
http://xith.org/javadoc/org/xith3d/loaders/obj/OBJLoader2.html
http://xith.org/javadoc/org/xith3d/loaders/md2/MD2Loader2.html

Here are two that were built to implement this interface orginally:
http://xith.org/javadoc/org/xith3d/loader3ds/Loader3DS.html
http://cvs.sourceforge.net/viewcvs.py/whoola/core/src/com/whoola/core/media/xith/XithColladaLoader.java?rev=1.22&view=auto

If they all implement the Loader interface, you minimize learning time and you can do tricks like this:
https://xith-tk.dev.java.net/source/browse/xith-tk/src/org/xith3d/loaders/ext/ExtensionLoader.java?rev=1.5&view=auto&content-type=text/vnd.viewcvs-markup
https://xith-tk.dev.java.net/source/browse/xith-tk/src/org/xith3d/loaders/ext/DefaultLoader.java?rev=1.5&view=auto&content-type=text/vnd.viewcvs-markup