Scale() public method

public Scale ( float3 _Scale ) : void
_Scale float3
return void
Example #1
0
        // 		void timer1_Tick(object sender, System.EventArgs e) {
        // 			throw new System.NotImplementedException();
        // 		}
        //////////////////////////////////////////////////////////////////////////
        // Test methods compile
        static void TestFloat3x3()
        {
            if ( System.Runtime.InteropServices.Marshal.SizeOf(typeof(float3x3)) != 36 )
            throw new Exception( "Not the appropriate size!" );

            float3x3	test1 = new float3x3( new float[9] { 9, 8, 7, 6, 5, 4, 3, 2, 1 } );
            float3x3	test2 = new float3x3( new float3( 1, 0, 0 ), new float3( 0, 1, 0 ), new float3( 0, 0, 1 ) );
            float3x3	test3 = new float3x3( 0, 1, 2, 3, 4, 5, 6, 7, 8 );
            float3x3	test0;
                test0 = test3;
            test2.Scale( new float3( 2, 2, 2 ) );
            float3x3	mul0 = test1 * test2;
            float3x3	mul1 = 3.0f * test2;
            float3		mul2 = new float3( 1, 1, 1 ) * test3;
            float3		access0 = test3[2];
            test3[1] = new float3( 12, 13, 14 );
            float		access1 = test3[1,2];
            test3[1,2] = 18;
            //	float		coFactor = test3.CoFactor( 0, 2 );
            float		det = test3.Determinant;
            float3x3	inv = test2.Inverse;
            float3x3	id = float3x3.Identity;

            test3.BuildRotationX( 0.5f );
            test3.BuildRotationY( 0.5f );
            test3.BuildRotationZ( 0.5f );
            test3.BuildFromAngleAxis( 0.5f, float3.UnitY );
        }