Main Page   Class Hierarchy   Compound List   File List   Compound Members  

VRMLParser Class Reference

Class definition for the VRMLParser, which parses and writes VRML files. More...

#include <VRMLParser.h>

List of all members.

Public Methods

 VRMLParser ()
 Constructor.

Sceneparse (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...


Detailed Description

Class definition for the VRMLParser, which parses and writes VRML files.


Member Function Documentation

Scene * VRMLParser::parse std::string    filename
 

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.

bool VRMLParser::write Scene   scene,
std::string    filename
 

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.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 00:16:49 2001 for Mesh Decimation by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001