you are on the right path. Just cycle through all vertices of the model, check their position and displace them in the way you want.

This is the fastest (and probably only) way you can achieve that with the engine functions. If you need it faster or something you have to look into the dx functions.

Scorpion