Rhino C++ API  7.24
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoSdkRender Class Referenceabstract

#include <RhinoSdkRender.h>

Inheritance diagram for CRhinoSdkRender:
CRhinoSdkRenderEx CRhinoSdkRenderEx2 CRhinoSdkRenderEx3

Public Types

enum  RenderReturnCodes {
  render_ok = 0, render_empty_scene, render_cancel, render_no_active_view,
  render_on_pre_create_window, render_no_frame_wnd_pointer, render_error_creating_window, render_error_starting_render,
  render_enter_modal_loop, render_exit_modal_loop, render_wm_quit
}
 Render command an helpers. More...
 

Public Member Functions

virtual ~CRhinoSdkRender ()
 
virtual BOOL AddLightToScene (const class CRhinoLight &light)
 
virtual BOOL AddRenderMeshToScene (const CRhinoObject *object, const CRhinoMaterial &material, const ON_Mesh *)
 
CRhinoDocDocument ()
 
double ElapsedTime (ON_wString &out) const
 
DWORD EndTime () const
 
int ErrorCode () const
 
virtual BOOL IgnoreRhinoObject (const CRhinoObject *object)
 
bool InBatchMode () const
 
virtual BOOL NeedToProcessGeometryTable ()
 
virtual BOOL NeedToProcessLightTable ()
 
virtual class CRhinoSdkRenderFrame * NewRenderFrame (CRhinoDoc *doc)=0
 
void OnRenderFrameDestruction ()
 For internal use only. More...
 
virtual void PauseRendering ()
 
CRhinoRenderPlugInPlugIn () const
 
int ProcessGeometryTable ()
 
int ProcessLightTable ()
 
RenderReturnCodes Render (const CRhinoCommandContext &context, LPSIZE sizeImage=0, const wchar_t *lpsWindowTitle=0, UINT nIDResource=0)
 
virtual BOOL RenderContinueModal ()
 
virtual BOOL RenderEnterModalLoop ()
 
virtual BOOL RenderExitModalLoop ()
 
virtual BOOL RenderPreCreateWindow ()
 
void RenderReturnCodesToString (RenderReturnCodes code, ON_wString &out) const
 
virtual BOOL RenderSceneWithNoMeshes ()
 
RenderReturnCodes RenderWindow (const CRhinoCommandContext &context, CRhinoView *view, const LPRECT rect, bool bRenderInWindow)
 
virtual void ResumeRendering ()
 
virtual BOOL StartRenderingInWindow (CRhinoView *view, const LPCRECT rect)
 
DWORD StartTime () const
 
virtual void StopRendering ()
 
virtual bool SupportsPause () const
 

Protected Member Functions

CImplImpl ()
 
RenderReturnCodes ReturnRenderCode (RenderReturnCodes rc)
 
CRhinoViewRhinoView () const
 
void SetRhinoView (CRhinoView *v)
 

Protected Attributes

friend CImpl
 
bool m_batch_mode
 
DWORD m_end_time
 
int m_error_code
 
int m_light_count
 
int m_mesh_count
 
CRhinoRenderPlugInm_plugin
 
BOOL m_render_canceled
 
CRhinoDocm_rhino_doc
 
CRhinoViewm_rhino_view
 
ON__UINT_PTR m_sdk_reserved = 0
 
DWORD m_start_time
 

Friends

class CRhinoSdkRenderEx
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer. This class has been modified, you should now use the CRhinoSdkRenderEx class defined at the bottom of this file.

Member Enumeration Documentation

◆ RenderReturnCodes

Render command an helpers.

Enumerator
render_ok 
render_empty_scene 
render_cancel 
render_no_active_view 
render_on_pre_create_window 
render_no_frame_wnd_pointer 
render_error_creating_window 
render_error_starting_render 
render_enter_modal_loop 
render_exit_modal_loop 
render_wm_quit 

Constructor & Destructor Documentation

◆ ~CRhinoSdkRender()

virtual CRhinoSdkRender::~CRhinoSdkRender ( )
virtual

Member Function Documentation

◆ AddLightToScene()

virtual BOOL CRhinoSdkRender::AddLightToScene ( const class CRhinoLight light)
virtual

Description: Called br ProcessGeometryTable() when an light is encountered that should be included in the rendered scene. Returns: TRUE - If plug-in will use this light FALSE - ignore this light

◆ AddRenderMeshToScene()

virtual BOOL CRhinoSdkRender::AddRenderMeshToScene ( const CRhinoObject object,
const CRhinoMaterial material,
const ON_Mesh  
)
virtual

Description: Called br ProcessGeometryTable() when an obect is encountered that contains a render mesh. Returns: TRUE - If plug-in will render this object FALSE - object wont be rendered

◆ Document()

CRhinoDoc& CRhinoSdkRender::Document ( )
inline

◆ ElapsedTime()

double CRhinoSdkRender::ElapsedTime ( ON_wString out) const

◆ EndTime()

DWORD CRhinoSdkRender::EndTime ( ) const
inline

◆ ErrorCode()

int CRhinoSdkRender::ErrorCode ( ) const

Description: Returns code which caused Render() or RenderWindow() to terminate. Returns: Returns code which caused Render() or RenderWindow() to terminate.

◆ IgnoreRhinoObject()

virtual BOOL CRhinoSdkRender::IgnoreRhinoObject ( const CRhinoObject object)
virtual

Description: Called br ProcessGeometryTable() when an obect is encountered that does not contain a render mesh. Returns: TRUE - object wont be rendered FALSE - If plug-in will render this object

◆ Impl()

CImpl* CRhinoSdkRender::Impl ( )
protected

◆ InBatchMode()

bool CRhinoSdkRender::InBatchMode ( ) const

Description: Determines if -Render or -RenderWindow was started command. Returns: A value of true means we are in batch scripting mode.

◆ NeedToProcessGeometryTable()

virtual BOOL CRhinoSdkRender::NeedToProcessGeometryTable ( )
virtual

Virtual interface


Description: Called by Render() to determine if ProcessGeometryTable() will get called. Returns: TRUE - Render() will call ProcessGeometryTable() FALSE - nothing changed so use plug-ins own mesh list

◆ NeedToProcessLightTable()

virtual BOOL CRhinoSdkRender::NeedToProcessLightTable ( )
virtual

Description: Called by Render() to determine if ProcessLightTable() will get called. Returns: TRUE - Render() will call ProcessLightTable() FALSE - nothing changed so use plug-ins own light list

◆ NewRenderFrame()

virtual class CRhinoSdkRenderFrame* CRhinoSdkRender::NewRenderFrame ( CRhinoDoc doc)
pure virtual

Description: Called by Render() just after RenderPreCreateWindow(). The frame returned by this function will be used to display the rendered image in. Parameters: doc - [in] Active Rhino document; Returns: Pointer to CRhinoSdkRenderFrame object. If NULL is returned then Render() will abort.

Implemented in CRhinoSdkRenderEx2.

◆ OnRenderFrameDestruction()

void CRhinoSdkRender::OnRenderFrameDestruction ( )

For internal use only.

◆ PauseRendering()

virtual void CRhinoSdkRender::PauseRendering ( )
virtual

Description: If your renderer supports pause / resume, override this method to pause rendering.

◆ PlugIn()

CRhinoRenderPlugIn* CRhinoSdkRender::PlugIn ( ) const

◆ ProcessGeometryTable()

int CRhinoSdkRender::ProcessGeometryTable ( )

◆ ProcessLightTable()

int CRhinoSdkRender::ProcessLightTable ( )

◆ Render()

RenderReturnCodes CRhinoSdkRender::Render ( const CRhinoCommandContext context,
LPSIZE  sizeImage = 0,
const wchar_t *  lpsWindowTitle = 0,
UINT  nIDResource = 0 
)

◆ RenderContinueModal()

virtual BOOL CRhinoSdkRender::RenderContinueModal ( )
virtual

Description: Called by Render() and RenderWindow() durring modal processing. Modal loop will continue until a cancel event occurs until this function returns false. Returns: If false when rendering is complete. This allows the Render and RenderWindow commands to return control to Rhino when rendering is complete.

◆ RenderEnterModalLoop()

virtual BOOL CRhinoSdkRender::RenderEnterModalLoop ( )
virtual

Description: Called by Render() and RenderWindow() just prior to entering modal loop. Returns: If false is returned Render() and RenderWindow() will abort.

◆ RenderExitModalLoop()

virtual BOOL CRhinoSdkRender::RenderExitModalLoop ( )
virtual

Description: Called by Render() and RenderWindow() just after modal loop is exited. Returns: If false is returned Render() and and RenderWindow() will cancel.

◆ RenderPreCreateWindow()

virtual BOOL CRhinoSdkRender::RenderPreCreateWindow ( )
virtual

Description: Called by Render() just prior to calling NewRenderFrame(). Called by RenderWindow() just prior to calling StartRenderingInWindow(); Returns: If false is returned then the Render() or RenderWindow() will abort.

◆ RenderReturnCodesToString()

void CRhinoSdkRender::RenderReturnCodesToString ( RenderReturnCodes  code,
ON_wString out 
) const

◆ RenderSceneWithNoMeshes()

virtual BOOL CRhinoSdkRender::RenderSceneWithNoMeshes ( )
virtual

Description: Called br Render() when no meshes are added to scene. Returns: TRUE - If plug-in will render scene with no meshes FALSE - abort, nothing to render

◆ RenderWindow()

RenderReturnCodes CRhinoSdkRender::RenderWindow ( const CRhinoCommandContext context,
CRhinoView view,
const LPRECT  rect,
bool  bRenderInWindow 
)

◆ ResumeRendering()

virtual void CRhinoSdkRender::ResumeRendering ( )
virtual

Description: If your renderer supports pause / resume, override this method to resume rendering.

◆ ReturnRenderCode()

RenderReturnCodes CRhinoSdkRender::ReturnRenderCode ( RenderReturnCodes  rc)
protected

◆ RhinoView()

CRhinoView* CRhinoSdkRender::RhinoView ( ) const
inlineprotected

◆ SetRhinoView()

void CRhinoSdkRender::SetRhinoView ( CRhinoView v)
inlineprotected

◆ StartRenderingInWindow()

virtual BOOL CRhinoSdkRender::StartRenderingInWindow ( CRhinoView view,
const LPCRECT  rect 
)
virtual

Description: Called by RenderWindow when plug-in should start render processing. Parameters: view - [in] View user selected 2d render rectangle in. rect - [in] Screen rectangle user selected. Minimum size is 16x16 pixels. Returns: If false is returned then the Render() or RenderWindow() will abort.

◆ StartTime()

DWORD CRhinoSdkRender::StartTime ( ) const
inline

◆ StopRendering()

virtual void CRhinoSdkRender::StopRendering ( )
virtual

Description: Called by Render or RenderWindow() when a key press or mouse down event occurs durring rendering. To interupt rendering make ContinueModal() return false.

◆ SupportsPause()

virtual bool CRhinoSdkRender::SupportsPause ( ) const
virtual

Description: Override this method and return true if your renderer supports pause / resume.

Friends And Related Function Documentation

◆ CRhinoSdkRenderEx

friend class CRhinoSdkRenderEx
friend

Member Data Documentation

◆ CImpl

friend CRhinoSdkRender::CImpl
protected

◆ m_batch_mode

bool CRhinoSdkRender::m_batch_mode
protected

◆ m_end_time

DWORD CRhinoSdkRender::m_end_time
protected

◆ m_error_code

int CRhinoSdkRender::m_error_code
protected

◆ m_light_count

int CRhinoSdkRender::m_light_count
protected

◆ m_mesh_count

int CRhinoSdkRender::m_mesh_count
protected

◆ m_plugin

CRhinoRenderPlugIn* CRhinoSdkRender::m_plugin
protected

◆ m_render_canceled

BOOL CRhinoSdkRender::m_render_canceled
protected

◆ m_rhino_doc

CRhinoDoc& CRhinoSdkRender::m_rhino_doc
protected

◆ m_rhino_view

CRhinoView* CRhinoSdkRender::m_rhino_view
protected

◆ m_sdk_reserved

ON__UINT_PTR CRhinoSdkRender::m_sdk_reserved = 0
protected

◆ m_start_time

DWORD CRhinoSdkRender::m_start_time
protected