radius_data, rgb_data, argb_data, node_colors, node_normals, node_uv, node_uvw


Synopsis

data mappers that create Node_Data objects representing particular types of data

Input Ports

in_data

any numeric primitive

 

Output Port

out

Node_Data

 

Description

These macros output a Node_Data object with preset identifiers that tell the renderer that the data is to be used for a particular purpose. They create Node_Data objects that can merge with a Mesh object (and possibly other node data) to create a field. A Node_Data object represents the values of some dataset at the node points of a field, while the Mesh represents the locations of that field's nodes in space.

These macros simplify the process of generating field data by reducing the amount of data you must supply to create a field. Usually the output of one of these macros is combined, using combine_mesh_data and possibly combine_node_datas, with the output of one of the mesh mapper macros to create a field. These macros are subclassed from node_scalar and node_vector; the only difference is that the id member of the Node_Data object is preset to particular values.

The amount of data provided in the in_data array must match the number of nodes in the eventual field to be constructed.

radius_data specifies scalar data (one value per node). Whenever the nodes in the resulting field are rendered as spheres, this data will control the radius of the sphere for each node. Input is of the form in_data[nnodes].

rgb_data and argb_data specify that the data is a 3 or 4 element vector with byte values, and that it should be rendered as an image. Input is of the form byte in_data[nnodes][3] or byte in_data[nnodes][4].

node_colors specifies that the data is a 3 element vector of floats in the range [0,1], and those floats are to be interpreted as red, green, and blue values to color the field at that node. Input is of the form float in_data[nnodes][3].

node_normals specifies that the data is a 3 element vector of floats, and those floats are to be interpreted as the direction normal to the field at that point for lighting purposes.

node_uv and node_uvw specify that the data is a 2 or 3 element vector of floats, and that it should be interpreted as 2D or 3D texture coordinates.

Output Port

out

Node_Data. The node data object.

Example

Not available.

File

v/fld_map.v

See also

Related modules