Hi, I am working on a basic .obj renderer and ran into a problem when parsing, I was trying to get float values out of a vector of strings ( I just used Scanner to get the file's strings into a vector )
my current approach is to use split() then valueOf() but valueOf() seems to be giving me nothing but trouble
current code is as follows
public static void getFloats(Scanner scn){
i = 0;
while(scn.hasNextLine()){
String[] str = File.get(i).split(" "); // obj fileLine = "v 1 0 1"
float value = str[2].valueOf(float);
Floats.add(value);
i++;
}
}
is there an easier way to get those values or am I just doing it wrong?