Reads in a numbers of offset files and animates the display by iterating through them.
Name | Type | Description | |
in | Mesh+Node_Data | field data representing the input BYU model. | |
scale | float | scale factor for the offset vectors. | |
This macro does not use any specialised parameter blocks, instead it uses the common parameters blocks IndexedFileParams and VideoLoopParams, and their associated macros CreateIndexedFilename and AnimFilename.
The CreateIndexedFilename macro creates a filename from a number of sub-strings and an index. Documentation can be found in the IOWidgets library. The important details of the parameters used are shown below.
Name | Type | Description | UI Control |
dir | string | file directory (e.g. iac_proj/rdmovbyu/) | Directory Text Box |
filename_stub | string | filename without index (e.g. cube) | Filename Stub Text Box |
extension | string | file extension without leading "." (e.g. off) | Extension Text Box |
index_width | int | width of index number in characters | Index Width Edit Box |
The AnimFilename macro uses the CreateIndexedFilename macro to generate a sequence of numbered filenames. Documentation can be found in the IOWidgets library. The important details of the parameters used are shown below.
Name | Type | Description | UI Control |
reset | int | resets loop to start value | VideoControl |
reset_back | int | resets loop to end value | VideoControl |
run | int | runs the animation loop from start | VideoControl |
run_back | int | runs the animation loop from end | VideoControl |
step | int | steps the animation forward 1 frame | VideoControl |
step_back | int | steps the animation backward 1 frame | VideoControl |
cycle | int | when set the animation loops continously | Cycle toggle box |
start_value | double | initial value of loop | Start Value edit box |
end_value | double | final value of loop | End Value edit box |
incr | double | loop increment | Increment edit box |
count | double | current value of loop | Frame number slider |
Name | Type | Description | |
out | Mesh+Node_Data | field data representing the offset BYU model. | |
obj | DataObject | directly renderable offset output object. | |
When instructed the read_movie_animate repeatadly reads in offset files and applies the offset data to the input file data, thereby performing animation of the BYU model data. The base filename and the number of offset files can be specified through the user interface. The animation is also started through the user interface. The offset filenames should typically be of the form 'nameXXX' where XXX is the index number of the offset file. The index numbering begins with 001, therefore the first example file is cube001.
More details on the offset file format can be found in the read_movie_apply_offset and ReadMovieOffsetFile documentation.
in
The field data that the offset is to be applied to. The type of this field is Mesh+Node_Data
scale
The factor by which the offsets from the offset file are scaled by. The type of this field is float. It should be noted that only the offset vectors are scaled, the original data is not scaled by this parameter.
out
The most primitive output field of the read_movie_animate macro. This contains the model read from the BYU file represented as field data, offset by the amount specified in the current offset file.
obj
The directly renderable output field of the read_movie_byu macro. This contains a DataObject object that can be rendered by the standard data viewers. The Data Object is generated from the input field data, after being offset by the amount specified in the current offset file.
This user macro uses the general user macro, read_movie_offsets and adds the functionality required for the macro to act as a section in the visualization pipeline. The read_movie_offsets macro in turn makes use of the functional macro ReadMovieOffset and the UI macros CreateIndexedFilenameUI and AnimFilenameUI. The ReadMovieOffsets macro uses the specialised low level modules ReadMovieOffsetFile and ReadMovieBYUApplyOffset, and the common module AnimFilename.
An example application ReadMovieBYUEg is provided, which uses the read_movie_byu macro to load a BYU file that is then animated by the read_movie_animate macro.
iac_proj/rdmovbyu/rdmbmacs.v contains the read_movie_animate and read_movie_offsets User Macros, the ReadMovieOffsets Functional Macro and the example application ReadMovieBYUEg V definitions. The file also contains several other macro definitions.
This project relies on the successful installation of the following components. Without them it will not function correctly.
The ReadMovieBYUMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level ReadMovieOffsetFile module, executes under the process specified in its library, not the process defined in the high-level library.
Ian Curington Paul G. Lever Andrew Dodd
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
ReadMovieOffsets, ReadMovieBYUApplyOffset, ReadMovieOffsetFile, CreateIndexedFilename, VideoLoop and AnimFilename.