Rhino C++ API  8.13
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 BOOL32 AddLightToScene (const class CRhinoLight &light)
 
virtual BOOL32 AddRenderMeshToScene (const CRhinoObject *object, const CRhinoMaterial &material, const ON_Mesh *)
 
CRhinoDocDocument ()
 
double ElapsedTime (ON_wString &out) const
 
DWORD EndTime () const
 
int ErrorCode () const
 
virtual BOOL32 IgnoreRhinoObject (const CRhinoObject *object)
 
bool InBatchMode () const
 
virtual BOOL32 NeedToProcessGeometryTable ()
 
virtual BOOL32 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 BOOL32 RenderContinueModal ()
 
virtual BOOL32 RenderEnterModalLoop ()
 
virtual BOOL32 RenderExitModalLoop ()
 
virtual BOOL32 RenderPreCreateWindow ()
 
void RenderReturnCodesToString (RenderReturnCodes code, ON_wString &out) const
 
virtual BOOL32 RenderSceneWithNoMeshes ()
 
RenderReturnCodes RenderWindow (const CRhinoCommandContext &context, CRhinoView *view, const LPRECT rect, bool bRenderInWindow)
 
virtual void ResumeRendering ()
 
virtual BOOL32 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
 
BOOL32 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 BOOL32 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 BOOL32 CRhinoSdkRender::AddRenderMeshToScene ( const CRhinoObject object,
const CRhinoMaterial material,
const ON_Mesh  
)
virtual

Description: Called br ProcessGeometryTable() when an object is encountered that contains a render mesh. Returns: TRUE - If plug-in will render this object FALSE - object won't 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 BOOL32 CRhinoSdkRender::IgnoreRhinoObject ( const CRhinoObject object)
virtual

Description: Called br ProcessGeometryTable() when an object is encountered that does not contain a render mesh. Returns: TRUE - object won't 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 BOOL32 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 BOOL32 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 BOOL32 CRhinoSdkRender::RenderContinueModal ( )
virtual

Description: Called by Render() and RenderWindow() during 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 BOOL32 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 BOOL32 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 BOOL32 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 BOOL32 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 BOOL32 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 during rendering. To interrupt 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

BOOL32 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