Go a bit deeper in parsing the OBJ file. Now we parse each lines into token, and it's now ready to try to execute them.

This commit is contained in:
Godzil
2020-03-06 01:29:26 +00:00
parent c17bfadc76
commit 2725b5f657
3 changed files with 122 additions and 6 deletions

View File

@@ -36,6 +36,8 @@ protected:
void addGroup(Shape *group);
void addVertex(Tuple *vertex);
void parseLine(char *line);
int execLine(int argc, char *argv[]);
BoundingBox bounds;
public:
@@ -44,8 +46,15 @@ public:
int parseOBJFile(const char *content);
Intersect intersect(Ray r);
BoundingBox getLocalBounds();
bool haveFiniteBounds() { return true; };
BoundingBox getBounds();
void updateBoundingBox();
void updateTransform();
void dumpMe(FILE * fp);
};
#endif /* DORAYME_OBJFILE_H */