KiCad PCB EDA Suite
C3D_RENDER_BASE Class Referenceabstract

This is a base class to hold data and functions for render targets. More...

#include <c3d_render_base.h>

Inheritance diagram for C3D_RENDER_BASE:
C3D_RENDER_OGL_LEGACY C3D_RENDER_RAYTRACING

Public Member Functions

 C3D_RENDER_BASE (CINFO3D_VISU &aSettings)
 
virtual ~C3D_RENDER_BASE ()=0
 
virtual void SetCurWindowSize (const wxSize &aSize)=0
 SetCurWindowSize - Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed. More...
 
virtual bool Redraw (bool aIsMoving, REPORTER *aStatusTextReporter=NULL)=0
 Redraw - Ask to redraw the view. More...
 
void ReloadRequest ()
 ReloadRequest - !TODO: this must be reviewed to add flags to improve specific render. More...
 
bool IsReloadRequestPending () const
 IsReloadRequestPending - Query if there is a pending reload request. More...
 
virtual int GetWaitForEditingTimeOut ()=0
 GetWaitForEditingTimeOut - Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode) More...
 

Protected Attributes

CINFO3D_VISUm_settings
 settings refrence in use for this render More...
 
bool m_is_opengl_initialized
 flag if the opengl specific for this render was already initialized More...
 
bool m_reloadRequested
 !TODO: this must be reviewed in order to flag change types More...
 
wxSize m_windowSize
 The window size that this camera is working. More...
 

Static Protected Attributes

static const wxChar * m_logTrace = wxT( "KI_TRACE_3D_RENDER" )
 Trace mask used to enable or disable the trace output of this class. More...
 

Detailed Description

This is a base class to hold data and functions for render targets.

Definition at line 41 of file c3d_render_base.h.

Constructor & Destructor Documentation

C3D_RENDER_BASE::C3D_RENDER_BASE ( CINFO3D_VISU aSettings)
explicit

Definition at line 43 of file c3d_render_base.cpp.

References m_is_opengl_initialized, m_logTrace, m_reloadRequested, and m_windowSize.

43  :
44  m_settings( aSettings )
45 {
46  wxLogTrace( m_logTrace, wxT( "C3D_RENDER_BASE::C3D_RENDER_BASE" ) );
48  m_windowSize = wxSize( -1, -1 );
49  m_reloadRequested = true;
50 }
CINFO3D_VISU & m_settings
settings refrence in use for this render
bool m_is_opengl_initialized
flag if the opengl specific for this render was already initialized
wxSize m_windowSize
The window size that this camera is working.
bool m_reloadRequested
!TODO: this must be reviewed in order to flag change types
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
C3D_RENDER_BASE::~C3D_RENDER_BASE ( )
pure virtual

Definition at line 53 of file c3d_render_base.cpp.

54 {
55 }

Member Function Documentation

virtual int C3D_RENDER_BASE::GetWaitForEditingTimeOut ( )
pure virtual

GetWaitForEditingTimeOut - Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode)

Returns
a value in miliseconds

Implemented in C3D_RENDER_OGL_LEGACY, and C3D_RENDER_RAYTRACING.

Referenced by EDA_3D_CANVAS::restart_editingTimeOut_Timer().

bool C3D_RENDER_BASE::IsReloadRequestPending ( ) const
inline

IsReloadRequestPending - Query if there is a pending reload request.

Returns
true if it wants to reload, false if there is no reload pending

Definition at line 79 of file c3d_render_base.h.

References m_reloadRequested.

Referenced by EDA_3D_CANVAS::IsReloadRequestPending().

79 { return m_reloadRequested; }
bool m_reloadRequested
!TODO: this must be reviewed in order to flag change types
virtual bool C3D_RENDER_BASE::Redraw ( bool  aIsMoving,
REPORTER aStatusTextReporter = NULL 
)
pure virtual

Redraw - Ask to redraw the view.

Parameters
aIsMovingif the user is moving the scene, it should be render in preview mode
aStatusTextReportera pointer to the status progress reporter
Returns
it will return true if the render would like to redraw again

Implemented in C3D_RENDER_OGL_LEGACY, and C3D_RENDER_RAYTRACING.

Referenced by EDA_3D_CANVAS::OnPaint().

void C3D_RENDER_BASE::ReloadRequest ( )
inline

ReloadRequest - !TODO: this must be reviewed to add flags to improve specific render.

Definition at line 73 of file c3d_render_base.h.

References m_reloadRequested.

Referenced by EDA_3D_CANVAS::ReloadRequest(), EDA_3D_CANVAS::RenderEngineChanged(), and EDA_3D_CANVAS::RenderRaytracingRequest().

73 { m_reloadRequested = true; }
bool m_reloadRequested
!TODO: this must be reviewed in order to flag change types
virtual void C3D_RENDER_BASE::SetCurWindowSize ( const wxSize &  aSize)
pure virtual

SetCurWindowSize - Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed.

Parameters
aSizethe current size of the render window

Implemented in C3D_RENDER_OGL_LEGACY, and C3D_RENDER_RAYTRACING.

Referenced by EDA_3D_CANVAS::OnPaint().

Member Data Documentation

bool C3D_RENDER_BASE::m_is_opengl_initialized
protected

flag if the opengl specific for this render was already initialized

Definition at line 97 of file c3d_render_base.h.

Referenced by C3D_RENDER_BASE(), C3D_RENDER_RAYTRACING::initializeOpenGL(), C3D_RENDER_OGL_LEGACY::initializeOpenGL(), C3D_RENDER_RAYTRACING::Redraw(), and C3D_RENDER_OGL_LEGACY::Redraw().

const wxChar * C3D_RENDER_BASE::m_logTrace = wxT( "KI_TRACE_3D_RENDER" )
staticprotected

Trace mask used to enable or disable the trace output of this class.

The debug output can be turned on by setting the WXTRACE environment variable to "KI_TRACE_3D_RENDER". See the wxWidgets documentation on wxLogTrace for more information.

Definition at line 111 of file c3d_render_base.h.

Referenced by C3D_RENDER_BASE(), C3D_RENDER_OGL_LEGACY::C3D_RENDER_OGL_LEGACY(), C3D_RENDER_RAYTRACING::C3D_RENDER_RAYTRACING(), C3D_RENDER_RAYTRACING::opengl_init_pbo(), C3D_RENDER_OGL_LEGACY::~C3D_RENDER_OGL_LEGACY(), and C3D_RENDER_RAYTRACING::~C3D_RENDER_RAYTRACING().

bool C3D_RENDER_BASE::m_reloadRequested
protected

The documentation for this class was generated from the following files: