コード例 #1
0
ファイル: rdk_sdkrender.cs プロジェクト: xNETHook/rhinocommon
 /// <summary>
 /// Call this function to render the scene in a view window. The function returns when rendering is complete (or cancelled).
 /// </summary>
 /// <param name="view">the view that the user selected a rectangle in.</param>
 /// <param name="rect">rectangle that the user selected.</param>
 /// <param name="inWindow">true to render directly into the view window.</param>
 /// <returns>A code that explains how rendering completed.</returns>
 /// //TODO - ViewInfo is wrong here
 public RenderReturnCode RenderWindow(Rhino.Display.RhinoView view, System.Drawing.Rectangle rect, bool inWindow)
 {
     m_ReturnCode = RenderReturnCode.InternalError;
     if (m_pSdkRender != IntPtr.Zero)
     {
         m_ReturnCode = (RenderReturnCode)UnsafeNativeMethods.Rdk_SdkRender_RenderWindow(m_pSdkRender, view.ConstPointer(), rect.Top, rect.Left, rect.Bottom, rect.Right, inWindow);
     }
     return(m_ReturnCode);
 }
コード例 #2
0
ファイル: rdk_sdkrender.cs プロジェクト: xNETHook/rhinocommon
 /// <summary>
 /// Call this function to render the scene normally. The function returns when rendering is complete (or cancelled).
 /// </summary>
 /// <returns>A code that explains how rendering completed.</returns>
 public RenderReturnCode Render()
 {
     m_ReturnCode = RenderReturnCode.InternalError;
     if (IntPtr.Zero != m_pSdkRender)
     {
         m_ReturnCode = (RenderReturnCode)UnsafeNativeMethods.Rdk_SdkRender_Render(m_pSdkRender, m_size.Height, m_size.Width);
     }
     return(m_ReturnCode);
 }
コード例 #3
0
ファイル: rdk_sdkrender.cs プロジェクト: xNETHook/rhinocommon
 /// <summary>
 /// Convert RenderReturnCode to
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 static Rhino.Commands.Result CommandResultFromReturnCode(RenderReturnCode code)
 {
     if (code == RenderReturnCode.Ok)
     {
         return(Commands.Result.Success);
     }
     if (code == RenderReturnCode.Cancel)
     {
         return(Commands.Result.Cancel);
     }
     if (code == RenderReturnCode.EmptyScene)
     {
         return(Commands.Result.Nothing);
     }
     if (code == RenderReturnCode.ExitRhino)
     {
         return(Commands.Result.ExitRhino);
     }
     return(Commands.Result.Failure);
 }
コード例 #4
0
 /// <summary>
 /// Convert RenderReturnCode to 
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 static Rhino.Commands.Result CommandResultFromReturnCode(RenderReturnCode code)
 {
   if (code == RenderReturnCode.Ok)
     return Commands.Result.Success;
   if (code == RenderReturnCode.Cancel)
     return Commands.Result.Cancel;
   if (code == RenderReturnCode.EmptyScene)
     return Commands.Result.Nothing;
   if (code == RenderReturnCode.ExitRhino)
     return Commands.Result.ExitRhino;
   return Commands.Result.Failure;
 }
コード例 #5
0
 /// <summary>
 /// Call this function to render the scene in a view window. The function returns when rendering is complete (or cancelled).
 /// </summary>
 /// <param name="view">the view that the user selected a rectangle in.</param>
 /// <param name="rect">rectangle that the user selected.</param>
 /// <param name="inWindow">true to render directly into the view window.</param>
 /// <returns>A code that explains how rendering completed.</returns>
 /// //TODO - ViewInfo is wrong here
 public RenderReturnCode RenderWindow(Rhino.Display.RhinoView view, System.Drawing.Rectangle rect, bool inWindow)
 {
   m_ReturnCode = RenderReturnCode.InternalError;
   if (m_pSdkRender != IntPtr.Zero)
   {
     m_ReturnCode = (RenderReturnCode)UnsafeNativeMethods.Rdk_SdkRender_RenderWindow(m_pSdkRender, view.ConstPointer(), rect.Top, rect.Left, rect.Bottom, rect.Right, inWindow);
   }
   return m_ReturnCode;
 }
コード例 #6
0
 /// <summary>
 /// Call this function to render the scene normally. The function returns when rendering is complete (or cancelled).
 /// </summary>
 /// <returns>A code that explains how rendering completed.</returns>
 public RenderReturnCode Render()
 {
   m_ReturnCode = RenderReturnCode.InternalError;
   if (IntPtr.Zero != m_pSdkRender)
   {
     m_ReturnCode = (RenderReturnCode)UnsafeNativeMethods.Rdk_SdkRender_Render(m_pSdkRender, m_size.Height, m_size.Width);
   }
   return m_ReturnCode;
 }