|
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 |
| Settings reference in use for this render. | |
| CAMERA & | m_camera |
| bool | m_canvasInitialized |
| Flag if the canvas specific for this render was already initialized. | |
| bool | m_reloadRequested |
| wxSize | m_windowSize |
| The window size that this camera is working. | |
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 38 of file render_3d_base.h.
|
explicit |
Definition at line 43 of file render_3d_base.cpp.
References m_boardAdapter, m_camera, m_canvasInitialized, m_logTrace, m_reloadRequested, and m_windowSize.
Referenced by RENDER_3D_OPENGL::RENDER_3D_OPENGL(), and RENDER_3D_RAYTRACE_BASE::RENDER_3D_RAYTRACE_BASE().
|
pure virtual |
Definition at line 54 of file render_3d_base.cpp.
|
protected |
Return a created busy indicator, if a factory has been set, else a null pointer.
Definition at line 65 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.
|
inline |
Query if there is a pending reload request.
Definition at line 73 of file render_3d_base.h.
References m_reloadRequested.
|
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.
|
inline |
Definition at line 66 of file render_3d_base.h.
References m_reloadRequested.
| 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 59 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.
|
protected |
Settings reference in use for this render.
Definition at line 98 of file render_3d_base.h.
Referenced by RENDER_3D_RAYTRACE_BASE::addCounterborePlating(), RENDER_3D_RAYTRACE_BASE::addCountersinkPlating(), RENDER_3D_RAYTRACE_BASE::addExtrudedBodyToRaytracer(), RENDER_3D_RAYTRACE_BASE::addModels(), RENDER_3D_OPENGL::addObjectTriangles(), RENDER_3D_RAYTRACE_BASE::addPadsAndVias(), RENDER_3D_OPENGL::appendPostMachiningGeometry(), RENDER_3D_OPENGL::backfillPostMachine(), RENDER_3D_RAYTRACE_BASE::backfillPostMachine(), RENDER_3D_OPENGL::createBoard(), RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::generate3dGrid(), RENDER_3D_OPENGL::generateHoles(), RENDER_3D_OPENGL::generateLayerList(), RENDER_3D_OPENGL::generatePlatedHoleShells(), RENDER_3D_OPENGL::generateViaBarrels(), RENDER_3D_OPENGL::generateViaCovers(), 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::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_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_OPENGL::renderBoardBody(), RENDER_3D_OPENGL::renderExtrudedBodies(), RENDER_3D_OPENGL::renderModel(), RENDER_3D_OPENGL::renderOpaqueModels(), RENDER_3D_OPENGL::renderPlaceholderForFootprint(), 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 121 of file render_3d_base.h.
Referenced by CreateBusyIndicator(), and SetBusyIndicatorFactory().
|
protected |
Definition at line 100 of file render_3d_base.h.
Referenced by RENDER_3D_OPENGL::Redraw(), RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_BASE(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_RAYTRACE_BASE::renderPreview(), and RENDER_3D_OPENGL::renderTransparentModels().
|
protected |
Flag if the canvas specific for this render was already initialized.
Definition at line 103 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 |
Definition at line 106 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_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::reload(), ReloadRequest(), and RENDER_3D_BASE().
|
protected |
The window size that this camera is working.
Definition at line 109 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_BASE(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_RAYTRACE_BASE::renderPreview(), RENDER_3D_OPENGL::SetCurWindowSize(), RENDER_3D_RAYTRACE_GL::SetCurWindowSize(), and RENDER_3D_RAYTRACE_RAM::SetCurWindowSize().