Exemplo n.º 1
0
        public static _float4 operator/(_float4 a, _float4 b)
        {
            _float4 res = new _float4();

            _f4Api.cycles_f4_div(a, b, ref res);
            return(res);
        }
Exemplo n.º 2
0
        public static _Transform RotateAroundAxis(float angle, _float4 axis)
        {
            _Transform res = new _Transform();

            _tfmApi.cycles_tfm_rotate_around_axis(angle, axis, ref res);

            return(res);
        }
Exemplo n.º 3
0
        public static _Transform LookAt(_float4 position, _float4 look, _float4 up)
        {
            _Transform res = new _Transform();

            _tfmApi.cycles_tfm_lookat(position, look, up, ref res);

            return(res);
        }
Exemplo n.º 4
0
 public _Transform(
     float a, float b, float c, float d,
     float e, float f, float g, float h,
     float i, float j, float k, float l,
     float m, float n, float o, float p
     )
 {
     x = new _float4(a, b, c, d);
     y = new _float4(e, f, g, h);
     z = new _float4(i, j, k, l);
     w = new _float4(m, n, o, p);
 }
Exemplo n.º 5
0
        public         _float4 this[int index]
        {
            get
            {
                switch (index)
                {
                case 0:
                    return(x);

                case 1:
                    return(y);

                case 2:
                    return(z);

                case 3:
                    return(w);

                default:
                    throw new IndexOutOfRangeException("Only 0-3 are acceptable");
                }
            }
            set
            {
                switch (index)
                {
                case 0:
                    x = value;
                    break;

                case 1:
                    y = value;
                    break;

                case 2:
                    z = value;
                    break;

                case 3:
                    w = value;
                    break;

                default:
                    throw new IndexOutOfRangeException("Only 0-3 are acceptable");
                }
            }
        }
Exemplo n.º 6
0
 static public extern void cycles_f4_div([MarshalAs(UnmanagedType.Struct)] _float4 a, [MarshalAs(UnmanagedType.Struct)] _float4 b, [In, Out, MarshalAs(UnmanagedType.Struct)] ref _float4 res);
Exemplo n.º 7
0
 static public extern void cycles_tfm_rotate_around_axis(float angle, [In, MarshalAs(UnmanagedType.Struct)] _float4 axis, [In, Out, MarshalAs(UnmanagedType.Struct)] ref _Transform res);
Exemplo n.º 8
0
 static public extern void cycles_tfm_lookat([In, MarshalAs(UnmanagedType.Struct)] _float4 position, [In, MarshalAs(UnmanagedType.Struct)] _float4 look, [In, MarshalAs(UnmanagedType.Struct)] _float4 up, [In, Out, MarshalAs(UnmanagedType.Struct)] ref _Transform res);