#include <VRMLParser.h>
Public Methods | |
VRMLParser () | |
Constructor. | |
Scene * | parse (std::string filename) |
Parse the contents of file <filename> into a Scene object. More... | |
bool | write (Scene *scene, std::string filename) |
Write the contents of the loaded Scene to file <filename>. More... |
|
Parse the contents of file <filename> into a Scene object. This is a very basic, single-pass linear algorithm which reads the contents of <filename> into lists of Vertices, Triangles, Normals, and Colors. Along the way, it sets all this information into the corresponding objects and calculates extra information such as Triangle Colors, center Points, and Normals, which we use in the decimation algorithm. |
|
Write the contents of the loaded Scene to file <filename>. This is a very basic, heirarchically called algorithm which steps iteratively through all Models in the Scene, all Triangles in the Model, and all Vertices in the Triangles, using standard C++ output streams to write the coordinates into a VRML file. |