BspLib
 
INTRODUCTION
 
BspLib is a C++ class library from which a BSP compiler for 3-D objects can be built very easily. It consists of a class hierarchy for handling three-dimensional objects, together with various processing functions, the most important of which is BSP compilation. An I/O class hierarchy is provided for importing and exporting 3-D data. Aside from proprietary formats BspLib is capable of reading VRML V1.0 data files. A slightly modified version of Silicon Graphics' QvLib is employed for parsing the VRML V1.0 file format. Apart from the included version of QvLib, BspLib is completely self-contained, i.e., only the standard C++ run-time library (no STL needed!) need be linked to be able to use all functions. This, for example, means that VRML primitives (spheres, boxes, cones, cylinders) have to be tessellated on-the-fly prior to BSP compilation, in order to convert them to b-reps that can be BSP compiled. Since BspLib is able to create BSP trees for entire VRML scene graphs this also means that all transformations and modifications demanded by the scene graph have to be applied to achieve correct spatial relationships between contained objects, without which BSP compilation is not possible. Normally, all this would only be done when rendering the scene, since OpenGL supports exactly those operations very easily. That is, primitives would be submitted to OpenGL in implicit (non-polygonal) form and transformations would be done on-the-fly through OpenGL's matrix stack. Since one goal of BspLib was to make it possible to build a purely command-line BSP compiler without any additional libraries, potentially running on a large variety of platforms (which only need to support C++), OpenGL could not be used to alleviate the problem of supporting an entire VRML scene graph. So, in contrast to many VRML viewers, some basic OpenGL functionality had to be duplicated within BspLib.
 
CONTENTS
 
The BspLib documentation consists of the following sections: 

1. GENERAL STRUCTURE 
2. CLASS HIERARCHIES 
3. INPUT/OUTPUT CLASS HIERARCHY 
4. GEOMETRY CLASSES 
5. BSP TREE TYPES 
6. PROCESSING FUNCTIONS 
7. A MINIMAL BSP COMPILER 

There is also a Comprehensive BspLib Documentation (all sections in a single document) available!


back to main page.
BspLib documentation copyright (c) by Markus Hadwiger, 1998. ALL RIGHTS RESERVED.