OpenMW-CS: Transient terrain change support
- Transient changes: For example if we deform a piece of terrain via a drag operation these changes are not translated into changed content data directly. That only happens when the user releases the mouse button and the drag ends. Unfortunately our terrain component does not support this function and there is no way around that. Bypassing the command interface by making direct changes to the terrain data during the drag would break things horribly. There are two possible solutions: a) Work with a copy of the terrain data. Not very memory efficient, but it should get the job done. b) Implement some kind of layer between the terrain data and the terrain renderer that inserts the transient changes without actually touching the terrain data.
Example: You want to raise a piece of terrain. You would typically do this by a drag operation (press mouse button, then move mouse). You would then see the terrain deform accordingly. But the changes should take effect only once you release the mouse. And you can discard them at any time by pressing ESC. Therefore the commands can only be issued once the button has been released.