KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_3D_display_options.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) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
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
21#include <3d_enums.h>
22#include <pgm_base.h>
26
27
32
33
35{
38}
39
40
59
60
66
67
69{
71 {
72 // Set visibility of items
73 cfg->m_Render.show_zones = m_checkBoxAreas->GetValue();
74 cfg->m_Render.subtract_mask_from_silk = m_checkBoxSubtractMaskFromSilk->GetValue();
75 cfg->m_Render.clip_silk_on_via_annuli = m_checkBoxClipSilkOnViaAnnulus->GetValue();
76 cfg->m_Render.differentiate_plated_copper = m_checkBoxRenderPlatedPadsAsPlated->GetValue();
77
78 cfg->m_Render.material_mode = static_cast<MATERIAL_MODE>( m_materialProperties->GetSelection() );
79
80 // Camera Options
81 cfg->m_Camera.animation_enabled = m_checkBoxEnableAnimation->GetValue();
82 cfg->m_Camera.moving_speed_multiplier = m_sliderAnimationSpeed->GetValue();
83 cfg->m_Camera.rotation_increment = m_spinCtrlRotationAngle->GetValue();
84 }
85
86 return true;
87}
88
89
91{
93 cfg.Load(); // Loading without a file will init to defaults
94
95 loadViewSettings( &cfg );
96}
declared enumerations and flags
MATERIAL_MODE
Render 3d model shape materials mode.
Definition 3d_enums.h:67
virtual void Load()
Updates the parameters of this object based on the current JSON document contents.
PANEL_3D_DISPLAY_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void OnCheckEnableAnimation(wxCommandEvent &WXUNUSED(event)) override
void ResetPanel() override
Reset the contents of this panel.
PANEL_3D_DISPLAY_OPTIONS(wxWindow *aParent)
void loadViewSettings(EDA_3D_VIEWER_SETTINGS *aCfg)
see class PGM_BASE
T * GetAppSettings(const char *aFilename)