VRML::Base.pm - common basic methods for VRML in/output

- NAME
- SYNOPSIS
- DESCRIPTION
- Internals
- AUTHOR

# NAME

VRML::Base.pm - common basic methods for VRML in/output

# SYNOPSIS

        use VRML::Base;

# DESCRIPTION

Following methods are implemented.

new
  `new`

  Creates a new VRML scene object.

comment
  `comment('string')`

  Inserts a single comment line at the current position. You don't need to write the # in front. If no string is given, the method inserts only a #.

insert
  `insert('string')`

  Inserts the string at the current position in the VRML scene.

insert__DATA__
  `insert__DATA__()`

  Inserts the text block after __DATA__ of the current perl script in the VRML scene. Remember there are two underscores in front and at the end of the word DATA.

include
  `include('filename')`

  Inserts the VRML code of the specified file in the current scene.

print
  `print('mime', 'pipe')`

  Prints the VRML scene to STDOUT. If mime (bool) is given, this method prints the scene to STDOUT with the Content-type of the current scene. If pipe is given, then first the stream is send to the pipe and after that to STDOUT. This is usefull to compress the VRML code with GNU-ZIP.

  Example:

  1. $vrml->print

  2. $vrml->print(1, 'gzip -f9')

save
  `save('filename', 'pipe')`

  Saves the VRML code to the specified name in filename. If no filename is given, this method uses the name of the perl script and changes the extension against `.wrl`. If pipe is given, then first the stream is send to the pipe and after that to STDOUT. This is usefull to compress the VRML code with GNU-ZIP.

  Example:

  1. $vrml->save

  2. $vrml->save(undef, 'gzip -f9')

  3. $vrml->save('myScene.wrl')

as_string
  `as_string`

  Returns the VRML scene as string. Possible it uses too much memory to build the string.

# Internals

You don't need the following 'native' methods. If yet, tell it me and I'll describe it in the next version.

debug
  `debug`

_init
  `_init('VRML')`

_add
  `_add`

_trim
  `_trim`

_swap
  `_swap`

_put
  `_put`

_row
  `_row`

_pos
  `_pos`

_format
  `_format`

# AUTHOR

Hartmut Palm <palm@gfz-potsdam.de>