.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "BVRML 3pm" .TH BVRML 3pm "2000-01-07" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XRacer::BVRML \- Parser for a tiny subset of VRML generated by Blender .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use XRacer::BVRML; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a parser for a tiny subset of \s-1VRML\s0 generated by Blender, so called Blender-VRML or \s-1BVRML\s0. 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. .PP \&\f(CW\*(C`XRacer::BVRML\*(C'\fR parses a Blender \s-1VRML\s0 file, and stores it in an internal \fIworld\fR representation, which can be inspected and manipulated. \f(CW\*(C`XRacer::BVRML\*(C'\fR can also write out a C function containing \s-1GL\s0 commands which render this \fIworld\fR object, and this function can then be used inside an XRacer track or craft file. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .ie n .IP "$world = XRacer::BVRML\->parse ($filename [, $world]);" 4 .el .IP "\f(CW$world\fR = XRacer::BVRML\->parse ($filename [, \f(CW$world\fR]);" 4 .IX Item "$world = XRacer::BVRML->parse ($filename [, $world]);" This function parses a \s-1BVRML\s0 file called \f(CW$filename\fR, and generates a \f(CW$world\fR object. If the second optional \&\f(CW$world\fR parameter is given, then the \s-1BVRML\s0 file is parsed and the results are merged with the existing \&\f(CW$world\fR object. .Sp If the parsing fails, then this function will print an error message and return \f(CW\*(C`undef\*(C'\fR. .SH "WORLD OBJECT METHODS" .IX Header "WORLD OBJECT METHODS" .ie n .IP "$nr_vertices = $world\->nr_vertices;" 4 .el .IP "\f(CW$nr_vertices\fR = \f(CW$world\fR\->nr_vertices;" 4 .IX Item "$nr_vertices = $world->nr_vertices;" Return the total number of vertices in the world. .ie n .IP "$nr_faces = $world\->nr_faces;" 4 .el .IP "\f(CW$nr_faces\fR = \f(CW$world\fR\->nr_faces;" 4 .IX Item "$nr_faces = $world->nr_faces;" Return the total number of faces in the world. .ie n .IP "@vertices = $world\->vertices;" 4 .el .IP "\f(CW@vertices\fR = \f(CW$world\fR\->vertices;" 4 .IX Item "@vertices = $world->vertices;" Aggregate all vertices in the world, and return it as a list. .ie n .IP "@faces = $world\->faces;" 4 .el .IP "\f(CW@faces\fR = \f(CW$world\fR\->faces;" 4 .IX Item "@faces = $world->faces;" Aggregate all faces in the world, and return it as a list. .ie n .IP "($smallest_x, $largest_x, $smallest_y, $largest_y, $smallest_z, $largest_z) = $world\->bbox;" 4 .el .IP "($smallest_x, \f(CW$largest_x\fR, \f(CW$smallest_y\fR, \f(CW$largest_y\fR, \f(CW$smallest_z\fR, \f(CW$largest_z\fR) = \f(CW$world\fR\->bbox;" 4 .IX Item "($smallest_x, $largest_x, $smallest_y, $largest_y, $smallest_z, $largest_z) = $world->bbox;" Return the bounding box (or bounding cuboid, to be more precise) of this world. .ie n .IP "$world\->write_display_function ([name => $function_name,] [filehandle => $filehandle,] [decl => $decl]);" 4 .el .IP "\f(CW$world\fR\->write_display_function ([name => \f(CW$function_name\fR,] [filehandle => \f(CW$filehandle\fR,] [decl => \f(CW$decl\fR]);" 4 .IX Item "$world->write_display_function ([name => $function_name,] [filehandle => $filehandle,] [decl => $decl]);" Write out a C function containing \s-1GL\s0 calls which, when invoked, will display this world object. The C function is called \f(CW$function_name\fR and will be written to the file specified by the \f(CW$filehandle\fR. The function will be declared as \f(CW\*(C`void function_name (void)\*(C'\fR unless the \&\f(CW$decl\fR 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. .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Richard W.M. Jones, .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" XRacer is copyright (C) 1999\-2000 Richard W.M. Jones (rich@annexia.org) and other contributors listed in the \s-1AUTHORS\s0 file. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), \fIxracer\fR\|(6).