/*
this advanced script shows how to implement
a simple reflection on an entire object
*/

//the usual stuff
scene clip(1,8000);
scene position(-600,200,-600);
scene color(0.1,0.1,0.2);
scene rotation(-10,45,0);
//reflections require a non-mipmapped texture
//we switch on a good non mipmapped trilinear filter
scene tfilter(3);

//a particle system
LITE = new cParticle(-1);
particle LITE texture(load("flaretex"));
particle LITE total(100);
particle LITE life(200);
particle LITE position(0,400,0);
particle LITE test(1);
particle LITE radius(0.5);
particle LITE accel(-0.02,-0.02,0);
particle LITE size(10);
particle LITE active(1);

//the floor
FLOOR = load("FLOOR");
object FLOOR scale(0.5);
object FLOOR test(0);
object FLOOR diffuse(1,1,1);
object FLOOR active(1);

//now the reflection operator...
reFlect = new cTexgfx(FLOOR);
//it reflect the scene from the following angle and position:
texgfx reFlect position(0,+200,0);
texgfx reFlect angle(-90,0,0);
/*
reflect parameters are: 
refresh every (20) millisecond
use a 128x128 pixel texture
use the current (-1) field of view
*/
texgfx reFlect reflect(20,128,-1);
//the reflection replaces the lightmap (it sound lika a light)
texgfx reFlect target(2);
/* we have also these options:
target(0); replace the standard texture
target(1); replace the envmap
target(3); replace the bumpmap
*/
texgfx reFlect active(1);


scene speed(5,1);
scene focus(-2);
scene start;

