KiCad PCB EDA Suite
c3d_render_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 <mrluzeiro@ua.pt>
5  * Copyright (C) 1992-2016 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, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
31 #include "c3d_render_base.h"
32 
33 
40 const wxChar * C3D_RENDER_BASE::m_logTrace = wxT( "KI_TRACE_3D_RENDER" );
41 
42 
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 }
51 
52 
54 {
55 }
56 
57 
59 {
60  m_busyIndicatorFactory = aNewFactory;
61 }
62 
63 
64 std::unique_ptr<BUSY_INDICATOR> C3D_RENDER_BASE::CreateBusyIndicator() const
65 {
66  std::unique_ptr<BUSY_INDICATOR> busy;
67 
69  busy = m_busyIndicatorFactory();
70 
71  return busy;
72 }
std::function< std::unique_ptr< BUSY_INDICATOR >()> FACTORY
A factory function that returns a new busy indicator.
void SetBusyIndicatorFactory(BUSY_INDICATOR::FACTORY aNewFactory)
Set a new busy indicator factory.
virtual ~C3D_RENDER_BASE()=0
bool m_is_opengl_initialized
flag if the opengl specific for this render was already initialized
C3D_RENDER_BASE(CINFO3D_VISU &aSettings)
Class CINFO3D_VISU Helper class to handle information needed to display 3D board.
Definition: cinfo3d_visu.h:70
wxSize m_windowSize
The window size that this camera is working.
std::unique_ptr< BUSY_INDICATOR > CreateBusyIndicator() const
Return a created busy indicator, if a factory has been set, else a null pointer.
bool m_reloadRequested
!TODO: this must be reviewed in order to flag change types
BUSY_INDICATOR::FACTORY m_busyIndicatorFactory
Factory that returns a suitable busy indicator for the context.
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.