virtual ZRESULT apply( core::IProcParams* pProcParams=NULL, DWORD* pRetVal=NULL);
The primary tool's function. It's purpose is to apply the tool to supplied data subset. In case procudure paraments (pProcParams) are not supplied, they can be obtained with IModeler::getProcParams method call. Tool can obtain subset that can be affected and should respect selected mode if needed.
If your tool modifies some node, make sure to invoke INode::changes method to indicate node changes. Also make sure to set pRetVal arguemt with proper update/redraw indications, so ZModeler can redraw view(s).