man XRacer::BVRML () - Parser for a tiny subset of VRML generated by Blender
NAME
XRacer::BVRML - Parser for a tiny subset of VRML generated by Blender
SYNOPSIS
use XRacer::BVRML;
DESCRIPTION
This is a parser for a tiny subset of VRML generated by Blender, so called Blender-VRML or BVRML. In fact, this parser is by no means guaranteed to be able to parse everything that Blender could generate. I will add parsing capability to it as I see the need.
CWXRacer::BVRML parses a Blender VRML file, and stores it in an internal world representation, which can be inspected and manipulated. CWXRacer::BVRML can also write out a C function containing GL commands which render this world object, and this function can then be used inside an XRacer track or craft file.
CLASS METHODS
This function parses a BVRML file called CW$filename, and generates a CW$world object. If the second optional CW$world parameter is given, then the BVRML file is parsed and the results are merged with the existing CW$world object. If the parsing fails, then this function will print an error message and return CWundef.
WORLD OBJECT METHODS
Return the total number of vertices in the world. Return the total number of faces in the world. Aggregate all vertices in the world, and return it as a list. Aggregate all faces in the world, and return it as a list. Return the bounding box (or bounding cuboid, to be more precise) of this world. Write out a C function containing GL calls which, when invoked, will display this world object. The C function is called CW$function_name and will be written to the file specified by the CW$filehandle. The function will be declared as CWvoid function_name (void) unless the CW$decl parameter is given, which gives the return declaration. The C function is suitable for directly linking into XRacer craft and track files. However, it requires some support. In particular, you will need to include the header file GL/gl.h, and probably xracer.h before the function.
AUTHOR
Richard W.M. Jones, <rich@annexia.org>
COPYRIGHT
XRacer is copyright (C) 1999-2000 Richard W.M. Jones (rich@annexia.org) and other contributors listed in the AUTHORS file.