/* this sample apply a "water" operator onto a grid */

scene clip(1,8000);
scene position(0,+2,-2);
scene rotation(+2,0,0);
scene color(0,0,1);
scene speed(1,1);

/* the sea, it must be defined as a grid of vertices */
SEA = load("seaplane2");
object SEA rotation(-180,0,0);
object SEA cull(2);
object SEA test(0);
object SEA diffuse(1,1,1);
object SEA scale(100);
object SEA active(1);

/* apply a wave effect onto the grid */
H2O = new cWater(SEA);
//water H2O sorttriangles(0);
water H2O speed (50,1000);   //refresh,impulse
water H2O wave(0,0.2,0.02); //type=0,height=30,force= 0.02f
water H2O active(1);

Rotor = new cTexgfx(H2O);
texgfx Rotor defobj(H2O,0,0);
texgfx Rotor addtex(load("tex0"));
texgfx Rotor addtex(load("tex1"));
texgfx Rotor addtex(load("tex2"));
texgfx Rotor target(1);
texgfx Rotor change(1000);
texgfx Rotor active(1);

scene focus(-2);
scene keybd(1);

scene start;

