Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  ExtLoader  (Read 1622 times)
0 Members and 1 Guest are viewing this topic.
Offline croft

Junior Devvie




Java, Java, Java


« Posted 2005-08-25 19:13:04 »

I created a Loader that does the following:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
     * 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?

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2005-08-31 06:28:30 »

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.

Offline croft

Junior Devvie




Java, Java, Java


« Reply #2 - Posted 2005-08-31 19:25:18 »

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.

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 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?

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.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline croft

Junior Devvie




Java, Java, Java


« Reply #3 - Posted 2005-08-31 19:29:24 »

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.

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

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #4 - Posted 2005-09-01 01:16:30 »


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.

Great.

Quote
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.

OK.

Cheers,

Will.

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #5 - Posted 2005-09-01 01:19:14 »

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.

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

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.

Pages: [1]
  ignore  |  Print  
 
 

 
xxMrPHDxx (13 views)
2017-11-21 16:21:00

xxMrPHDxx (10 views)
2017-11-21 16:14:31

xxMrPHDxx (10 views)
2017-11-21 16:10:57

Ecumene (113 views)
2017-09-30 02:57:34

theagentd (148 views)
2017-09-26 18:23:31

cybrmynd (246 views)
2017-08-02 12:28:51

cybrmynd (242 views)
2017-08-02 12:19:43

cybrmynd (242 views)
2017-08-02 12:18:09

Sralse (257 views)
2017-07-25 17:13:48

Archive (875 views)
2017-04-27 17:45:51
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!