writeVGF, writeVGF_GD, writeVGF_ARR

Synopsis

Writes the contents of a field, a Graphic Display object (red renderable port) or a group of Graphic Display objects to a dVision VGF format file.

Input Ports

User Macro Name Type Description

writeVGF in_fld Mesh+Node_Data single set of field data
writeVGF_GD obj GD Object single Graphic Display Object
writeVGF_ARR top_obj GroupObject group of Graphic Display Objects

Description

These user macros all write data to dVision VGF format files. The exact purpose of each of these three macros is described below:

These macros parse the appropriate input and then create an ASCII VGF output file containing the Cell_Sets of 2D elements such as triangles, quads, lines, polylines and polytristrips. The module takes cell mesh topology from the input field structure, and writes them out to a file in ASCII VGF file format.

This format is part of the dVision dVise virtual reality system, which can store 3D geometric objects in the scene in this format. It is able to pass normals through if they exist on the input mesh, colors, and scalar numerical values at nodes using UV texture coordinates.

The cell-set hierarchy is preserved in the file format.

Inputs

Note that each of the user macros has a different input port.

in_fld - writeVGF

Reference to a set of field data that should be written to the VGF file. The field data should consist of Mesh and Node Data.

obj - writeVGF_GD

Reference to a Graphic Display object (red renderable port) that should be written to the VGF file. The field data to be written is extracted from the supplied Graphic Display object.

top_obj - writeVGF_ARR

Reference to a GroupObject (red renderable port) that should be written to the VGF file. The GroupObject should contain a number of child Graphic Display objects. These are output as GEOGROUP blocks in the VGF file. GroupObjects are generated by ARR library modules.

Outputs

(none)

Utility Modules

The User Macro writeVGF uses the low-level module WriteVGFCore and the UI macro WriteVGF_UI. As both of the other User Macros are derived from the writeVGF macro they also make use of these components.

Example

Two example applications are provided. WriteVGFEg demonstrates the use of the writeVGF macro by generating an isosurface and writing that isosurface to a file. WriteVGF_ARR_Eg demonstrates the use of the writeVGF_ARR macro by loading a multiblock set of data and generating a series of visualizations. The isosurface can then be written to a file. If the resultant file is examined then it is apparent that the isosurface is written out in several chunks, one per block of data.

Files

iac_proj/wr_vgf/wvgfmacs.v contains the V definitions of the writeVGF, writeVGF_GD and writeVGF_ARR User Macros, the WriteVGF_UI UI Macro, and the example applications WriteVGFEg and WriteVGF_ARR_Eg.

Other Notes

The WriteVGFMacs library inherits its process. As this library contains no procedural code, the process is not important.

Author

Ian Curington
Advanced Visual Systems, Ltd.
Hanworth Lane, Chertsey Surrey, UK
KT16 9JX
<a HREF="mailto:ianc@avs.com">ianc@avs.com</a>

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

WriteVGFCore, WriteVGF_UI, WriteVGFEg, WriteVGF_ARR_Eg, Write STL