Interactive profile editor. A dedicated area in the User Interface is used as a conceptual touchpad to draw an outline in the Scene Window.
Name | Type | Description | UI Control |
nx | int | number of pixels in a line | |
ny | int | number of pixels in column | |
x | int | x-coordinate of the mouse position | UIframe |
y | int | y-coordinate of the mouse position | UIframe |
state | int | current state of the left mouse button | UIframe |
mode | int | current mode of drawing image
0 = constant colour on the right side of line 1 = colour on the right side of the line depends on drawing speed 2 = colour on the left side of the line depends on drawing speed |
UIslider |
Name | Type | Description |
line_out | mesh | data of the point mesh representing the points on the drawn lines |
line_obj | data object | directly renderable object |
img_out | uniform field | represents the image generated with by the drawn lines |
img_obj | data object | directly renderable object |
The Parameters the module needs are given by the user by drawing with the mouse in the UIframe. Whenever there is a mouse event the profile update function is called. The functoin ignores the mouse event button up.
If the mouse position is outside the UIframe the current local position (local_x, local_y) is set to the border of the frame (clipping).
When the left mouse button is down the previuos position (local_px, local_py) is initialized by the local position before the local position is set to the new mouse position.
The module sets the pixel of the image between the old and the new mouse position in the map_array to a certain value corresponding to the mode parameter given by the user. Moreover it sets the x-values for each y coordinate in the line_arr.
nx, ny
The Maximums of pixels in the x- and y-direction are given by the random size of the UIframe. The UIframe is quadratic. That is why nx equals ny.
x, y
state
The current state of the left mouse button can be button down, running or button has been released
mode
The current mode of drawing image can have the following values:
0 = constant colour on the right side of line
1 = colour on the right side of the line depends on drawing speed
2 = colour on the left side of the line depends on drawing speed
line_out
Contains point coordinates which x-values are taken from the line_arr mentioned in Descriptions
line_obj
img_out
Uses the data from the map_arr which is described in Descriptions
img_obj
There are two example applications. ProfileEg_line views the line object and ProfileEg_img views the image with the help of a Uviewer2D.
iac_proj/profile/profile.v Creates the IAC_PROJ.Profile library
iac_proj/profile/profmods.v Creates the ProfileMods library containing the low-level module ProfileCore and the parameter block ProfileParams.
iac_proj/profile/profmacs.v Creates the ProfileMacs library containing the high-level functional macro ProfileFunc, user interface macro ProfileUI and the user macro Profile.macro definition
iac_proj/profile/profapps.v Creates the ProfileApps library containing the example applications ProfileEg_line and ProfileEg_img.
Ian Curington, Advanced Visual Systems Inc.
Simone Herrmann Manchester Visualization Centre
International AVS Centre Manchester Visualization Centre Kilburn Building University of Manchester Oxford Road Manchester United Kingdom M13 9PL