Axiom.Demos.DynamicTextures.Setup C# (CSharp) 메소드

Setup() 공개 메소드

public Setup ( ) : bool
리턴 bool
		public override bool Setup()
		{
			if ( base.Setup() )
			{
				tim = 0;
				rpressed = false;
				// Create  colour lookup
				for ( int col = 0; col < 1024; col++ )
				{
					ColorEx c;
					c = HSVtoRGB( ( 1.0f - col / 1024.0f ) * 90.0f + 225.0f, 0.9f, 0.75f + 0.25f * ( 1.0f - col / 1024.0f ) );
					c.a = 1.0f - col / 1024.0f;
					unsafe
					{
						fixed ( uint* dest = clut )
						{
							PixelConverter.PackColor( c, PixelFormat.A8R8G8B8, (IntPtr)( &dest[ col ] ) );
						}
					}
				}
				// Setup
				LogManager.Instance.Write( "Creating chemical containment" );
				mSize = reactorExtent * reactorExtent;
				chemical[ 0 ] = new int[ mSize ];
				chemical[ 1 ] = new int[ mSize ];
				delta[ 0 ] = new int[ mSize ];
				delta[ 1 ] = new int[ mSize ];

				dt = FROMFLOAT( 2.0f );
				hdiv0 = FROMFLOAT( 2.0E-5f / ( 2.0f * 0.01f * 0.01f ) ); // a / (2.0f*h*h); -- really diffusion rate
				hdiv1 = FROMFLOAT( 1.0E-5f / ( 2.0f * 0.01f * 0.01f ) ); // a / (2.0f*h*h); -- really diffusion rate
				//k = FROMFLOAT(0.056f);
				//F = FROMFLOAT(0.020f);
				k = FROMFLOAT( 0.0619f );
				F = FROMFLOAT( 0.0316f );

				resetReactor();
				fireUpReactor();
				updateInfoParamF();
				updateInfoParamK();
				updateInfoParamA0();
				updateInfoParamA1();

				LogManager.Instance.Write( "Cthulhu dawn" );
				return true;
			}
			return false;
		}