DVgeo_glyph


Synopsis

take an array of glyphs as input and output glyphs at nodes using node data as an index into the glyph array


module DVgeo_glyph { /* produces scaled, colored glyphs at nodal locations */
Mesh+Iparam &in { /* input field */
nnodes+req;
coordinates+req;
coordinates.values+req;
int+opt nnode_data;
Data_Array+opt node_data[nnode_data];
};
Mesh+Iparam &glyph[] { /* glyph geometry */
nnodes+req;
coordinates+req;
coordinates.values+req;
};
float+Iparam scale; /* scale factor applied to glyph */
float+Iparam color[3]; /* color applied to glyph */
int+Iparam normalize; /* normalize glyph index */
Mesh+Node_Data+Oparam out { /* output field */
xform+nowrite;
};
method+notify_val+notify_inst geo_glyph_update<status=1> =
"DVgeo_glyph";
};

Description

DVgeo_glyph takes an input field and an array of glyphs, and draws one glyph at each node location of the in_field. The glyph drawn is selected by using the data at that node as an index into the glyph array.

If normalize is off, floating point values are converted to integers by truncation. If normalize is on, the data range is mapped to the number of glyphs so that each glyph represents the same fraction of the data range.

If the data is out of the bounds of the glyph array, the minimum or maximum glyph is drawn, as appropriate.

The glyphs' colors are determined by the color parameters unless the glyphs themselves provide node data for coloring, and their size is scaled by the scale parameter. Their orientation is unchanged.

Input Ports

in

Mesh. Glyphs will be placed at the nodes of this mesh.

glyph

Mesh[]. Array of geometries for the glyphs.

scale

float. The glyphs are scaled by this amount.

color

float[3]. The color to be applied to each glyph.

normalize

int. If zero, the glyphs are scaled to the data value at the node. If nonzero, the glyphs are only scaled by the scale input.

Output Ports

out

Mesh+Node_Data. Contains all the glyphs as geometry data.

Example

Not available.

File

v/dv.v

See also

Not applicable.