예제 #1
0
        /// <summary>
        /// 重载"*"号操作符
        /// </summary>
        /// <param name="plane">平面对象</param>
        /// <param name="scale">缩放值</param>
        /// <returns>返回计算后的平面对象</returns>
        public static Plane operator *(Plane plane, float scale)
        {
            Plane result;

            unsafe
            {
                IDllImportApi.v3dxPlaneScale((Plane *)(&result), (Plane *)(&plane), scale);
            }
            return(result);
        }
예제 #2
0
        public static Plane Multiply(Plane plane, float scale)
        {
            Plane result;

            unsafe
            {
                IDllImportApi.v3dxPlaneScale((Plane *)&result, (Plane *)&plane, scale);
            }

            return(result);
        }
예제 #3
0
 public static void Multiply(ref Plane plane, float scale, out Plane result)
 {
     unsafe
     {
         fixed(Plane *pResult = &result)
         {
             fixed(Plane *pPlane = &plane)
             {
                 IDllImportApi.v3dxPlaneScale(pResult, pPlane, scale);
             }
         }
     }
 }