KiCad PCB EDA Suite
|
This is a base class to hold data and functions for render targets. More...
#include <render_3d_base.h>
Public Member Functions | |
RENDER_3D_BASE (BOARD_ADAPTER &aBoardAdapter, CAMERA &aCamera) | |
virtual | ~RENDER_3D_BASE ()=0 |
virtual void | SetCurWindowSize (const wxSize &aSize)=0 |
Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed. | |
virtual bool | Redraw (bool aIsMoving, REPORTER *aStatusReporter=nullptr, REPORTER *aWarningReporter=nullptr)=0 |
Redraw the view. | |
void | ReloadRequest () |
bool | IsReloadRequestPending () const |
Query if there is a pending reload request. | |
virtual int | GetWaitForEditingTimeOut ()=0 |
Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode). | |
void | SetBusyIndicatorFactory (BUSY_INDICATOR::FACTORY aNewFactory) |
Set a new busy indicator factory. | |
Protected Member Functions | |
std::unique_ptr< BUSY_INDICATOR > | CreateBusyIndicator () const |
Return a created busy indicator, if a factory has been set, else a null pointer. | |
Protected Attributes | |
BOARD_ADAPTER & | m_boardAdapter |
CAMERA & | m_camera |
Flag if the canvas specific for this render was already initialized. | |
bool | m_canvasInitialized |
bool | m_reloadRequested |
The window size that this camera is working. | |
wxSize | m_windowSize |
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. | |
Private Attributes | |
BUSY_INDICATOR::FACTORY | m_busyIndicatorFactory |
< Factory that returns a suitable busy indicator for the context. | |
This is a base class to hold data and functions for render targets.
Definition at line 42 of file render_3d_base.h.
|
explicit |
Definition at line 47 of file render_3d_base.cpp.
References m_canvasInitialized, m_logTrace, m_reloadRequested, and m_windowSize.
|
pure virtual |
Definition at line 58 of file render_3d_base.cpp.
|
protected |
Return a created busy indicator, if a factory has been set, else a null pointer.
Settings reference in use for this render.
Definition at line 69 of file render_3d_base.cpp.
References m_busyIndicatorFactory.
Referenced by RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), and RENDER_3D_RAYTRACE_RAM::Redraw().
|
pure virtual |
Give the interface the time (in ms) that it should wait for editing or movements before (this works for display preview mode).
Implemented in RENDER_3D_OPENGL, and RENDER_3D_RAYTRACE_BASE.
Referenced by EDA_3D_CANVAS::restart_editingTimeOut_Timer().
|
inline |
Query if there is a pending reload request.
Definition at line 77 of file render_3d_base.h.
References m_reloadRequested.
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::IsReloadRequestPending(), and EDA_3D_CANVAS::OnMouseMove().
|
pure virtual |
Redraw the view.
aIsMoving | if the user is moving the scene, it should be render in preview mode. |
aStatusReporter | a pointer to the status progress reporter. |
Implemented in RENDER_3D_OPENGL, RENDER_3D_RAYTRACE_GL, and RENDER_3D_RAYTRACE_RAM.
Referenced by EDA_3D_CANVAS::DoRePaint().
|
inline |
Definition at line 70 of file render_3d_base.h.
References m_reloadRequested.
Referenced by EDA_3D_CANVAS::ReloadRequest(), EDA_3D_CANVAS::RenderEngineChanged(), and EDA_3D_CANVAS::RenderRaytracingRequest().
void RENDER_3D_BASE::SetBusyIndicatorFactory | ( | BUSY_INDICATOR::FACTORY | aNewFactory | ) |
Set a new busy indicator factory.
When set, this factory will be used to generate busy indicators when suitable. If not set, no busy indicator will be used.
Definition at line 63 of file render_3d_base.cpp.
References m_busyIndicatorFactory.
|
pure virtual |
Before each render, the canvas will tell the render what is the size of its windows, so render can take actions if it changed.
aSize | the current size of the render window |
Implemented in RENDER_3D_OPENGL, RENDER_3D_RAYTRACE_GL, and RENDER_3D_RAYTRACE_RAM.
Referenced by EDA_3D_CANVAS::DoRePaint().
|
protected |
Definition at line 102 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::addModels(), RENDER_3D_OPENGL::addObjectTriangles(), RENDER_3D_RAYTRACE_BASE::addPadsAndVias(), RENDER_3D_OPENGL::createBoard(), RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::generate3dGrid(), RENDER_3D_OPENGL::generateHoles(), RENDER_3D_OPENGL::generateLayerList(), RENDER_3D_OPENGL::generateViasAndPads(), RENDER_3D_OPENGL::get3dModelsFromFootprint(), RENDER_3D_OPENGL::get3dModelsSelected(), RENDER_3D_OPENGL::getLayerZPos(), RENDER_3D_RAYTRACE_BASE::getModelMaterial(), RENDER_3D_RAYTRACE_BASE::insertHole(), RENDER_3D_RAYTRACE_BASE::load3DModels(), RENDER_3D_OPENGL::load3dModels(), RENDER_3D_RAYTRACE_BASE::postProcessBlurFinish(), RENDER_3D_RAYTRACE_BASE::postProcessShading(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_RAYTRACE_BASE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_OPENGL::renderBoardBody(), RENDER_3D_OPENGL::renderModel(), RENDER_3D_OPENGL::renderOpaqueModels(), RENDER_3D_RAYTRACE_BASE::renderPreview(), RENDER_3D_OPENGL::renderSolderMaskLayer(), RENDER_3D_RAYTRACE_BASE::renderTracing(), RENDER_3D_OPENGL::renderTransparentModels(), RENDER_3D_OPENGL::setLayerMaterial(), RENDER_3D_OPENGL::setupMaterials(), RENDER_3D_RAYTRACE_BASE::setupMaterials(), and RENDER_3D_RAYTRACE_BASE::shadeHit().
|
private |
< Factory that returns a suitable busy indicator for the context.
Definition at line 125 of file render_3d_base.h.
Referenced by CreateBusyIndicator(), and SetBusyIndicatorFactory().
|
protected |
Flag if the canvas specific for this render was already initialized.
Definition at line 104 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_OPENGL::render3dArrows(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), and RENDER_3D_OPENGL::renderTransparentModels().
|
protected |
Definition at line 107 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::initializeOpenGL(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), and RENDER_3D_BASE().
|
protected |
The window size that this camera is working.
Definition at line 110 of file render_3d_base.h.
Referenced by IsReloadRequestPending(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), ReloadRequest(), and RENDER_3D_BASE().
|
protected |
Definition at line 113 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::initializeBlockPositions(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_OPENGL::render3dArrows(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_OPENGL::SetCurWindowSize(), RENDER_3D_RAYTRACE_GL::SetCurWindowSize(), and RENDER_3D_RAYTRACE_RAM::SetCurWindowSize().