90 m_mainToolBar(
nullptr ),
92 m_currentCamera( m_trackBallCamera ),
95 wxLogTrace( m_logTrace, wxT(
"EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
97 m_disable_ray_tracing =
false;
98 m_aboutTitle =
_(
"KiCad 3D Viewer" );
106 static const int status_dims[4] = { -1, 170, 130, 130 };
108 wxStatusBar *status_bar = CreateStatusBar(
arrayDim( status_dims ) );
109 SetStatusWidths(
arrayDim( status_dims ), status_dims );
113 m_boardAdapter, m_currentCamera,
114 Prj().Get3DCacheManager() );
117 LoadSettings( config );
120 loadCommonSettings();
128 m_canvas->SetEventDispatcher( m_toolDispatcher );
133 m_toolManager->InitTools();
137 if(
EDA_3D_CONTROLLER* ctrlTool = GetToolManager()->GetTool<EDA_3D_CONTROLLER>() )
138 ctrlTool->SetRotationIncrement(
config->m_Camera.rotation_increment );
141 m_toolManager->InvokeTool(
"3DViewer.Control" );
144 ReCreateMainToolbar();
146 m_infoBar =
new WX_INFOBAR(
this, &m_auimgr );
148 m_auimgr.SetManagedWindow(
this );
150 m_auimgr.AddPane( m_mainToolBar,
EDA_PANE().HToolbar().Name(
"MainToolbar" ).Top().Layer( 6 ) );
151 m_auimgr.AddPane( m_infoBar,
EDA_PANE().InfoBar().Name(
"InfoBar" ).Top().Layer(1) );
152 m_auimgr.AddPane( m_canvas,
EDA_PANE().Canvas().Name(
"DrawFrame" ).
Center() );
159 m_auimgr.GetPane(
"InfoBar" ).Hide();
162 m_canvas->SetInfoBar( m_infoBar );
163 m_canvas->SetStatusBar( status_bar );
168 m_canvas->SetFocus();
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
Implement a canvas based on a wxGLCanvas.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
static const int * GetAttributesList(ANTIALIASING_MODE aAntiAliasingMode)
Get a list of attributes to pass to wxGLCanvas.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Handle actions that are shared between different applications.
Specialization of the wxAuiPaneInfo class for KiCad panels.
A modified version of the wxInfoBar class that allows us to:
#define QUALIFIED_VIEWER3D_FRAMENAME(parent)
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.