DatamapEditor


Synopsis

edit Graphics Display Kit Datamap

DatamapEditor


macro DatamapEditor
{
GDview_templ &view_in;
GDobject_templ &obj_in{
DatamapTempl &dmap;
};
ilink vis;

macro Read_Colormap {
file map_file{0,1}> {
name+nres =>
<-.<-.DatamapEditorUI.shell_menu.UIfileDialog.filename;
};
int off => file_skip_lines(map_file,0,1);
float Colormap[256][4] => file_array_ascii
(map_file, off, 4, {1,1,1,1});
};

DMAP.DatamapEdit DatamapEdit {
dmap_in => <-.obj_in.dmap;
dmapLibrary => Templates.DATAMAPS;
curDmapName =>
<-.DatamapEditorUI.shell_menu.UIselectionDialog.selectedItem;
controlPointModel = 0;
controlPointData => <-.Read_Colormap.Colormap;
addRange => <-.DatamapEditorUI.AddRangeButton.do;
deleteRange => <-.DatamapEditorUI.DeleteRangeButton.do;
curRange => <-.DatamapEditorUI.curRange;
};

macro DatamapEditorUI<instanced=0> {
DatamapTempl+IPort2 &dmapIn => <-.obj_in.dmap;
.
.
.
};
};

Description

DatamapEditor defines a shell containing the necessary controls to edit the datamap of a subobject. It contains both a datamap editor subobject (DatamapEdit) and a user interface (DatamapEditorUI).

InputPorts

view_in

A view. The DatamapEditor edits the view's picked camera.

obj_in

An object. obj_in can be any group object with a datamap.

vis

An integer indicating whether the DatamapEditor's user interface should appear: 0 means no; 1 means yes. Typically, you should want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To accomplish thi, you connect vis to the UIcmd object's do element.

Examples

Libraries.Main.Viewer3D
Libraries.Main.Viewer2D
Libraries.Main.Viewer

File

v/view.v

See also

Related modules: