More parring down of OBJ loading; still to be pretty-fied.

This commit is contained in:
pahimar 2013-03-14 22:40:05 -04:00
parent ee1e091e9c
commit d2b27fc7c7
4 changed files with 3 additions and 45 deletions

View file

@ -26,8 +26,6 @@ public class WavefrontObject {
private Group currentGroup;
private String contextfolder = "";
public double radius = 0;
public float xScale;
@ -69,16 +67,6 @@ public class WavefrontObject {
this.yScale = yScale;
this.zScale = zScale;
int lastSlashIndex = fileName.lastIndexOf('/');
if (lastSlashIndex != -1) {
contextfolder = fileName.substring(0, lastSlashIndex + 1);
}
lastSlashIndex = fileName.lastIndexOf('\\');
if (lastSlashIndex != -1) {
contextfolder = fileName.substring(0, lastSlashIndex + 1);
}
parse(fileName);
calculateRadius();
@ -100,11 +88,6 @@ public class WavefrontObject {
}
public String getContextfolder() {
return contextfolder;
}
public void parse(String fileName) {
BufferedReader reader = null;

View file

@ -1,24 +0,0 @@
package net.minecraftforge.client.model.obj.parser;
import net.minecraftforge.client.model.obj.WavefrontObject;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class CommentParser extends LineParser {
@Override
public void incoporateResults(WavefrontObject wavefrontObject) {
// TODO Auto-generated method stub
}
@Override
public void parse() {
// TODO Auto-generated method stub
}
}

View file

@ -13,9 +13,8 @@ public class ObjLineParserFactory extends LineParserFactory {
parsers.put("v", new VertexParser());
parsers.put("vn", new NormalParser());
parsers.put("vp", new FreeFormParser());
parsers.put("vt", new TextureCooParser());
parsers.put("vt", new TextureCoordinateParser());
parsers.put("f", new FaceParser(object));
parsers.put("#", new CommentParser());
parsers.put("g", new GroupParser());
}

View file

@ -6,11 +6,11 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class TextureCooParser extends LineParser {
public class TextureCoordinateParser extends LineParser {
private TextureCoordinate coordinate = null;
public TextureCooParser() {
public TextureCoordinateParser() {
}