Hi,
I tried to compile the 3ds loader, and find it calls methods
such as setCoordinateIndex, setNormalIndex, etc. that do not exist.
Does this mean the 3ds loader code is too old, or too new, or…?
Thanks for any advice on how to fix this
Hi,
I tried to compile the 3ds loader, and find it calls methods
such as setCoordinateIndex, setNormalIndex, etc. that do not exist.
Does this mean the 3ds loader code is too old, or too new, or…?
Thanks for any advice on how to fix this
Several empty methods were removed from Xith3D recently. It is possible that the 3ds loader called them mistakenly, or that the methods were removed mistakenly. Try removing the offending calls from the 3ds source and see if it works.
Will.
Yes, this worked.
The offending code was inside an “if (false) {…”;
I just removed it.
Someone should update the downloadable code however…
Cool.
You should indicate in your subject that the problem is with the 3DS loader else its author may never notice this thread. It is possible to modify your subject by modifying your first post.
Will.
He did notice, honest.
I’ll mail myself to remind me to fix it. Could you possibly dump the details of the change here?
Kev
Uh, I can’t find the if (false) you’re talking about. Is there a list of things that have been removed.
These methods definitely shouldn’t have been removed unless of course you’re going to remove IndexedTriangleArray altogether?
Kev
The stuff I removed is in ModelContext.java,
starting with
if (indexedGeometryUsed) {
Vector3f normals[] = new Vector3f[vertices.length];
int indices[] = new int[numberOfFaces * 3];
for (i=0; i < numberOfFaces; i++) {
Face f = faces[i];
...
indexedGeometryUsed is set to false earlier on and doesn’t seem to be
reset anywhere.
Note that I’m new to this and am not asserting that this is the right
fix at all. It did allow it to compile however, and it now works on
at least some of the examples.
If you wish to audit the process of removing these unused methods, here are some resources:
Discussion:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1095301671
Commit Log + diff:
https://xith3d.dev.java.net/servlets/ReadMsg?list=cvs&msgNo=412
Last version of Xith3D to have these methods:
http://www.xith.org/download/builds/2004-09-13_cvs/
I was very careful in only removing empty methods but mistakes are certainly possible.
I’m not surprised to hear that these methods were in use - I had some in my code too :-/. They were however only placebos.
Will.
I suppose that might have explained why they didn’t seem to actually work 
The fix is probably valid, I’ll update the toolkit source tonight. Sorry, my fault, didn’t catch on by if (false) { you meant if (indexedGeometryUsed) { where it was set to false.
No worries, I’ll update tonight…
Cheers,
Kev