Exemplo n.º 1
0
 public Scene()
 {
     // define geometry
     plane1 = new Sphere( 0.0f, -4999.0f, 0.0f, 4998.5f * 4998.5f );		// bottom plane
     plane2 = new Sphere( 0.0f, 0.0f, -5000.0f, 4993.0f * 4993f );		// back plane
     for( int i = 0; i < 3; i++ )
     {
     sphere[i] = new Sphere( -0.8f + i * 0.8f, 0, -2, 0.3f * 0.3f );
     sphere[i + 3] = new Sphere( -0.8f + i * 0.8f, -0.8f, -2, 0.5f * 0.5f );
     }
     light = new Sphere( 2.7f, 1.7f, -0.5f, LIGHTSIZE * LIGHTSIZE );
     // load skybox
     skybox = new float[2500 * 1250 * 3];
     WinFileIO wf = new WinFileIO( skybox );
     wf.OpenForReading( "../../assets/sky_15.raw" );
     wf.Read( 2500 * 650 * 4 * 3 );
     for( int i = 2500 * 650 * 3; i < (2500 * 1250 * 3); i++ ) skybox[i] = 0;
     wf.Dispose();
 }