KiCad PCB EDA Suite
Loading...
Searching...
No Matches
render_3d_base.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2015-2016 Mario Luzeiro <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
25
26
27#include "render_3d_base.h"
28#include <wx/log.h>
29
30
40const wxChar* RENDER_3D_BASE::m_logTrace = wxT( "KI_TRACE_3D_RENDER" );
41
42
44 m_boardAdapter( aBoardAdapter ),
45 m_camera( aCamera )
46{
47 wxLogTrace( m_logTrace, wxT( "RENDER_3D_BASE::RENDER_3D_BASE" ) );
48 m_canvasInitialized = false;
49 m_windowSize = wxSize( -1, -1 );
50 m_reloadRequested = true;
51}
52
53
57
58
63
64
65std::unique_ptr<BUSY_INDICATOR> RENDER_3D_BASE::CreateBusyIndicator() const
66{
67 std::unique_ptr<BUSY_INDICATOR> busy;
68
71
72 return busy;
73}
Helper class to handle information needed to display 3D board.
std::function< std::unique_ptr< BUSY_INDICATOR >()> FACTORY
A factory function that returns a new busy indicator.
A class used to derive camera objects from.
Definition camera.h:99
BUSY_INDICATOR::FACTORY m_busyIndicatorFactory
Factory that returns a suitable busy indicator for the context.
std::unique_ptr< BUSY_INDICATOR > CreateBusyIndicator() const
Return a created busy indicator, if a factory has been set, else a null pointer.
RENDER_3D_BASE(BOARD_ADAPTER &aBoardAdapter, CAMERA &aCamera)
bool m_canvasInitialized
Flag if the canvas specific for this render was already initialized.
virtual ~RENDER_3D_BASE()=0
wxSize m_windowSize
The window size that this camera is working.
BOARD_ADAPTER & m_boardAdapter
Settings reference in use for this render.
void SetBusyIndicatorFactory(BUSY_INDICATOR::FACTORY aNewFactory)
Set a new busy indicator factory.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.