fast_glyph_3D

Synopsis

Fast 3D Mesh glyph mapper macro, that efficiently replicates glyph geometry at given coordinates.

Input Ports

Name Type Description

glyph_fld Mesh geometry that should be placed at coordinates.
coords float[][2] coordinate position list.

Name Type Description UI Control

scale float scaling factor for each glyph. UIslider

Output Ports

Name Type Description

out_mesh Mesh output mesh containing the replicated glyphs.
out_obj DataObject directly renderable output object.

Description

The fast_glyph_3D macro takes a list of 3D coordinate positions and a glyph shape, and replicates that glyph at all coordinate positions. The macro outputs a 3D mesh and a directly renderable DataObject.

The fast_glyph_3D macro and the low-level FastGlyph3DCore module were developed from the fast_glyph_2D macro and modules. They share many of the same features and limitations of the original modules. The most important difference is that the fast_glyph_3D macro provides no control over the orientation of the replicated glyphs. The module is also only able to deal with and output 3D data. It expects that the coordinates are supplied as a series of x-y-z triplets. The advantage of these limitations is that the fast_glyph_3D macro is at least 4 times faster than the standard glyph macro.

Inputs

glyph_fld

Connection to the glyph geometry that should be replicated at each supplied point. It is assumed that the glyph is 3D, has no node data and has a single cell set. If this is not the case the node data will be discarded by the module and only the first cell set will be used for the output glyphs.

coords[][3]

Connection to a float array containing the 3D positions of each point. Examples of how to construct this array from arrays of x, y and z coordinates and from Field data can be seen in the example applications.

Parameters

scale

Floating point parameter that specifies how much the glyphs should be scaled by. This parameter applies globally to the glyphs generated and will mostly be used to size the glyphs appropriately for the data set.

Outputs

out_mesh

Mesh containing the replicated glyph geometry. This mesh will only contain a single cell set and no node data or cell data.

out_obj

The directly renderable output of the fast_glyph_3D macro. The DataObject contained within this output is generated from the same data as that output by out_mesh. This renderable output is the output that will normally be used.

Utility Macros

The fast_glyph_3D use macro makes use of the FastGlyph3D functional macro and the FastGlyph3D user interface macro. The FastGlyph3D functional macro is a wrapper around the FastGlyph3DCore low-level module. This module contains all the C++ code necessary for this macro.

Example

Two example applications are provided, FastGlyph3D_SimpleEg and FastGlyph3D_SizeEg. The FastGlyph3D_SimpleEg application demonstrates how 3 arrays containing x coordinates, y coordinates and z coordinates can be input into the fast_glyph_3D macro to generate 4 diamond glyphs. The FastGlyph3D_SizeEg application demonstrates the fast_glyph_3D macro generating a large number of cross glyphs. The hydrogen data-set is read, several visualizations performed and a glyph drawn at each node point of each of these visualizations.

Files

iac_proj/fglyph/fgmods.v contains the V definitions of the FastGlyph3DCore module.

iac_proj/fglyph/fgmacs.v contains the V definitions of the FastGlyph3D Functional macro, the FastGlyph3DUI UI macro, the fast_glyph_3D user macro and the example applications.

Other Notes

To gain the extra performance necessary this macro makes a number of assumptions and is less general than the original glyph module. The important assumptions are mentioned above. A complete list of assumptions is shown below:

The module is written in C++, uses simple arrays for input/output. The algorithm is very simple and can be extended to perform different tasks.

The low-level FastGlyphMods library containing the module FastGlyph3DCore does not specify a process. By default the express process will be used.

Authors


Mark Lambert, Ian Curington
Advanced Visual Systems, Inc.

Andrew Dodd
International AVS Centre

Contact

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