<<<<<<<<<<<<<<<<<

data_operator(visage) VISAGE data_operator(visage)

NAME

data_operator - a converter from generic_data to visage_vector and visage_scalar.

DESCRIPTION

data_operator selects components of arbitrarily- dimensioned vectors in generic_data and creates a one- dimensional visage_scalar or a three dimensional visage_vector. A selection list specifies which components of the generic_data vector are used. If scalarization is off, the selection list must contain either one component or three components, in which case an instance of either visage_scalar or visage_vector, respectively, will be created. If scalarization is on, the selection list may contain any number of components, and an instance of visage_scalar will be created, containing the magnitudes of the vectors whose components are specified by the selection list.

The instance of data_operator may itself by treated as an instance of visage_scalar or visage_vector, depending on the above conditions. The user need not deal with the instances created by data_operator, since all messages that it doesn't understand will be forwarded to these visage data instances, through a mechanism similar to that used by "collection".

SUPERCLASS

object

INSTANCE VARIABLES

data_source The name of the instance of generic_data from which vector components are extracted.

scalarize A scalar indicating whether or not scalarization of the vector specified by the selection list is performed. Zero means scalarization is off, non-zero means scalarization is on.

MESSAGES

data_source= Sets the name of the generic_data instance supplying the data.

data_source? Returns the name of the generic_data instance supplying the data.

scalarize= Sets the current scalarization mode: 0 = off, non-0 = on

scalarize? Returns the current scalarization mode.

selection= Sets the list of components to extract from each vector in generic_data

selection? Returns the list of components to extract from each vector in generic_data

data? Returns a pointer to the data contained in the instance of visage_scalar or visage_vector. If necessary, it first creates the instance, and extracts the specified components from the generic_data instance.

dimension? Returns the number of components specified by the selection list

in addition... any messages that would normally be handled by an instance of visage_scalar or visage_vector can be sent to data_operator. The message will be forwarded to the instance of visage_scalar or visage_vector associated with it.

EXAMPLE

avs_field_reader new: "areader" file_prefix="/home/kreskin/u0/volpe/oscar/data/curvilinear" read!;

visage_geometry new: p1 extent=(1,1,1,32,1,32);

data_operator new: curvilinear_scalardata; curvilinear_scalardata data_source= "curvilinear_gendata" selection=(1);

curvilinear_gridset displays=(outline,p1) scalar_data=curvilinear_scalardata;

actor new: a color=(1,1,1) modeller=curvilinear;

/* insert whatever code needed to display an actor. E.g., lights, cameras,

renderers */

SEE ALSO

avs_field_reader, generic_data


Please send comments and suggestions to
consult@rpi.edu