MorphoGraphX
|
This namespace contains all the classes needed to define processes. More...
This namespace contains all the classes needed to define processes.
To create a new process, you first need to decide the category of the process: Stack, Mesh or Global. Remember it will appear in the appropriate section. Also, stack processes will be able to access only 3D data, and mesh processes only the meshes. Here is a template of a minimal stack process:
Then, in the implementation file, you need to add:
Which will take care of registering the process to the system when the library is loaded.
Beside the minimal process, it is recommended to structure the process in two functions: the first one taking generic arguments (i.e. a string list and a float list), the other one taking specific arguments. This way, your process will be easier to use from another C++ process.
Also, to help providing meaningful (and uniform) error messages, and to help you testing the current state of the process, the checkState() method is provided.
The structure then typically becomes: