KiCad PCB EDA Suite
eda_3d_viewer.cpp File Reference
#include "eda_3d_viewer.h"
#include "../3d_viewer_id.h"
#include "../common_ogl/cogl_att_list.h"
#include <3d_actions.h>
#include <bitmaps.h>
#include <dpi_scaling.h>
#include <gestfich.h>
#include <pgm_base.h>
#include <project.h>
#include <wildcards_and_files_ext.h>
#include <tool/tool_manager.h>
#include <tool/common_control.h>
#include <hotkeys_basic.h>
#include <wx/colordlg.h>
#include <wx/toolbar.h>

Go to the source code of this file.

Macros

#define ROT_ANGLE   10.0
 

Functions

 EVT_TOOL_RANGE (ID_START_COMMAND_3D, ID_MENU_COMMAND_END, EDA_3D_VIEWER::Process_Special_Functions) EVT_UPDATE_UI_RANGE(ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL
 

Variables

static const wxChar keyBgColor_Red [] = wxT( "BgColor_Red" )
 
static const wxChar keyBgColor_Green [] = wxT( "BgColor_Green" )
 
static const wxChar keyBgColor_Blue [] = wxT( "BgColor_Blue" )
 
static const wxChar keyBgColor_Red_Top [] = wxT( "BgColor_Red_Top" )
 
static const wxChar keyBgColor_Green_Top [] = wxT( "BgColor_Green_Top" )
 
static const wxChar keyBgColor_Blue_Top [] = wxT( "BgColor_Blue_Top" )
 
static const wxChar keySMaskColor_Red [] = wxT( "SMaskColor_Red" )
 
static const wxChar keySMaskColor_Green [] = wxT( "SMaskColor_Green" )
 
static const wxChar keySMaskColor_Blue [] = wxT( "SMaskColor_Blue" )
 
static const wxChar keySPasteColor_Red [] = wxT( "SPasteColor_Red" )
 
static const wxChar keySPasteColor_Green [] = wxT( "SPasteColor_Green" )
 
static const wxChar keySPasteColor_Blue [] = wxT( "SPasteColor_Blue" )
 
static const wxChar keySilkColor_Red [] = wxT( "SilkColor_Red" )
 
static const wxChar keySilkColor_Green [] = wxT( "SilkColor_Green" )
 
static const wxChar keySilkColor_Blue [] = wxT( "SilkColor_Blue" )
 
static const wxChar keyCopperColor_Red [] = wxT( "CopperColor_Red" )
 
static const wxChar keyCopperColor_Green [] = wxT( "CopperColor_Green" )
 
static const wxChar keyCopperColor_Blue [] = wxT( "CopperColor_Blue" )
 
static const wxChar keyBoardBodyColor_Red [] = wxT( "BoardBodyColor_Red" )
 
static const wxChar keyBoardBodyColor_Green [] = wxT( "BoardBodyColor_Green" )
 
static const wxChar keyBoardBodyColor_Blue [] = wxT( "BoardBodyColor_Blue" )
 
static const wxChar keyShowRealisticMode [] = wxT( "ShowRealisticMode" )
 
static const wxChar keyRenderEngine [] = wxT( "RenderEngine" )
 
static const wxChar keyRenderMaterial [] = wxT( "Render_Material" )
 
static const wxChar keyRenderOGL_ShowCopperTck [] = wxT( "Render_OGL_ShowCopperThickness" )
 
static const wxChar keyRenderOGL_ShowModelBBox [] = wxT( "Render_OGL_ShowModelBoudingBoxes" )
 
static const wxChar keyRenderRAY_Shadows [] = wxT( "Render_RAY_Shadows" )
 
static const wxChar keyRenderRAY_Backfloor [] = wxT( "Render_RAY_Backfloor" )
 
static const wxChar keyRenderRAY_Refractions [] = wxT( "Render_RAY_Refractions" )
 
static const wxChar keyRenderRAY_Reflections [] = wxT( "Render_RAY_Reflections" )
 
static const wxChar keyRenderRAY_PostProcess [] = wxT( "Render_RAY_PostProcess" )
 
static const wxChar keyRenderRAY_AAliasing [] = wxT( "Render_RAY_AntiAliasing" )
 
static const wxChar keyRenderRAY_ProceduralT [] = wxT( "Render_RAY_ProceduralTextures" )
 
static const wxChar keyShowAxis [] = wxT( "ShowAxis" )
 
static const wxChar keyShowGrid [] = wxT( "ShowGrid3D" )
 
static const wxChar keyShowZones [] = wxT( "ShowZones" )
 
static const wxChar keyShowFootprints_Normal [] = wxT( "ShowFootprints_Normal" )
 
static const wxChar keyShowFootprints_Insert [] = wxT( "ShowFootprints_Insert" )
 
static const wxChar keyShowFootprints_Virtual [] = wxT( "ShowFootprints_Virtual" )
 
static const wxChar keyShowAdhesiveLayers [] = wxT( "ShowAdhesiveLayers" )
 
static const wxChar keyShowSilkScreenLayers [] = wxT( "ShowSilkScreenLayers" )
 
static const wxChar keyShowSolderMaskLayers [] = wxT( "ShowSolderMasLayers" )
 
static const wxChar keyShowSolderPasteLayers [] = wxT( "ShowSolderPasteLayers" )
 
static const wxChar keyShowCommentsLayer [] = wxT( "ShowCommentsLayers" )
 
static const wxChar keyShowBoardBody [] = wxT( "ShowBoardBody" )
 
static const wxChar keyShowEcoLayers [] = wxT( "ShowEcoLayers" )
 
 ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE
 

Macro Definition Documentation

◆ ROT_ANGLE

#define ROT_ANGLE   10.0

Definition at line 265 of file eda_3d_viewer.cpp.

Function Documentation

◆ EVT_TOOL_RANGE()

Variable Documentation

◆ ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE

ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE

◆ keyBgColor_Blue

const wxChar keyBgColor_Blue[] = wxT( "BgColor_Blue" )
static

Definition at line 57 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBgColor_Blue_Top

const wxChar keyBgColor_Blue_Top[] = wxT( "BgColor_Blue_Top" )
static

Definition at line 61 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBgColor_Green

const wxChar keyBgColor_Green[] = wxT( "BgColor_Green" )
static

Definition at line 56 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBgColor_Green_Top

const wxChar keyBgColor_Green_Top[] = wxT( "BgColor_Green_Top" )
static

Definition at line 60 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBgColor_Red

const wxChar keyBgColor_Red[] = wxT( "BgColor_Red" )
static

Definition at line 55 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBgColor_Red_Top

const wxChar keyBgColor_Red_Top[] = wxT( "BgColor_Red_Top" )
static

Definition at line 59 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBoardBodyColor_Blue

const wxChar keyBoardBodyColor_Blue[] = wxT( "BoardBodyColor_Blue" )
static

Definition at line 81 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBoardBodyColor_Green

const wxChar keyBoardBodyColor_Green[] = wxT( "BoardBodyColor_Green" )
static

Definition at line 80 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyBoardBodyColor_Red

const wxChar keyBoardBodyColor_Red[] = wxT( "BoardBodyColor_Red" )
static

Definition at line 79 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyCopperColor_Blue

const wxChar keyCopperColor_Blue[] = wxT( "CopperColor_Blue" )
static

Definition at line 77 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyCopperColor_Green

const wxChar keyCopperColor_Green[] = wxT( "CopperColor_Green" )
static

Definition at line 76 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyCopperColor_Red

const wxChar keyCopperColor_Red[] = wxT( "CopperColor_Red" )
static

Definition at line 75 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderEngine

const wxChar keyRenderEngine[] = wxT( "RenderEngine" )
static

Definition at line 84 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderMaterial

const wxChar keyRenderMaterial[] = wxT( "Render_Material" )
static

Definition at line 85 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderOGL_ShowCopperTck

const wxChar keyRenderOGL_ShowCopperTck[] = wxT( "Render_OGL_ShowCopperThickness" )
static

Definition at line 87 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderOGL_ShowModelBBox

const wxChar keyRenderOGL_ShowModelBBox[] = wxT( "Render_OGL_ShowModelBoudingBoxes" )
static

Definition at line 88 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_AAliasing

const wxChar keyRenderRAY_AAliasing[] = wxT( "Render_RAY_AntiAliasing" )
static

Definition at line 95 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_Backfloor

const wxChar keyRenderRAY_Backfloor[] = wxT( "Render_RAY_Backfloor" )
static

Definition at line 91 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_PostProcess

const wxChar keyRenderRAY_PostProcess[] = wxT( "Render_RAY_PostProcess" )
static

Definition at line 94 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_ProceduralT

const wxChar keyRenderRAY_ProceduralT[] = wxT( "Render_RAY_ProceduralTextures" )
static

Definition at line 96 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_Reflections

const wxChar keyRenderRAY_Reflections[] = wxT( "Render_RAY_Reflections" )
static

Definition at line 93 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_Refractions

const wxChar keyRenderRAY_Refractions[] = wxT( "Render_RAY_Refractions" )
static

Definition at line 92 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyRenderRAY_Shadows

const wxChar keyRenderRAY_Shadows[] = wxT( "Render_RAY_Shadows" )
static

Definition at line 90 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowAdhesiveLayers

const wxChar keyShowAdhesiveLayers[] = wxT( "ShowAdhesiveLayers" )
static

Definition at line 104 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowAxis

const wxChar keyShowAxis[] = wxT( "ShowAxis" )
static

Definition at line 98 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowBoardBody

const wxChar keyShowBoardBody[] = wxT( "ShowBoardBody" )
static

Definition at line 109 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowCommentsLayer

const wxChar keyShowCommentsLayer[] = wxT( "ShowCommentsLayers" )
static

Definition at line 108 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowEcoLayers

const wxChar keyShowEcoLayers[] = wxT( "ShowEcoLayers" )
static

Definition at line 110 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowFootprints_Insert

const wxChar keyShowFootprints_Insert[] = wxT( "ShowFootprints_Insert" )
static

Definition at line 102 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowFootprints_Normal

const wxChar keyShowFootprints_Normal[] = wxT( "ShowFootprints_Normal" )
static

Definition at line 101 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowFootprints_Virtual

const wxChar keyShowFootprints_Virtual[] = wxT( "ShowFootprints_Virtual" )
static

Definition at line 103 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowGrid

const wxChar keyShowGrid[] = wxT( "ShowGrid3D" )
static

Definition at line 99 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowRealisticMode

const wxChar keyShowRealisticMode[] = wxT( "ShowRealisticMode" )
static

Definition at line 83 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowSilkScreenLayers

const wxChar keyShowSilkScreenLayers[] = wxT( "ShowSilkScreenLayers" )
static

Definition at line 105 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowSolderMaskLayers

const wxChar keyShowSolderMaskLayers[] = wxT( "ShowSolderMasLayers" )
static

Definition at line 106 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowSolderPasteLayers

const wxChar keyShowSolderPasteLayers[] = wxT( "ShowSolderPasteLayers" )
static

Definition at line 107 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keyShowZones

const wxChar keyShowZones[] = wxT( "ShowZones" )
static

Definition at line 100 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySilkColor_Blue

const wxChar keySilkColor_Blue[] = wxT( "SilkColor_Blue" )
static

Definition at line 73 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySilkColor_Green

const wxChar keySilkColor_Green[] = wxT( "SilkColor_Green" )
static

Definition at line 72 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySilkColor_Red

const wxChar keySilkColor_Red[] = wxT( "SilkColor_Red" )
static

Definition at line 71 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySMaskColor_Blue

const wxChar keySMaskColor_Blue[] = wxT( "SMaskColor_Blue" )
static

Definition at line 65 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySMaskColor_Green

const wxChar keySMaskColor_Green[] = wxT( "SMaskColor_Green" )
static

Definition at line 64 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySMaskColor_Red

const wxChar keySMaskColor_Red[] = wxT( "SMaskColor_Red" )
static

Definition at line 63 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySPasteColor_Blue

const wxChar keySPasteColor_Blue[] = wxT( "SPasteColor_Blue" )
static

Definition at line 69 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySPasteColor_Green

const wxChar keySPasteColor_Green[] = wxT( "SPasteColor_Green" )
static

Definition at line 68 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().

◆ keySPasteColor_Red

const wxChar keySPasteColor_Red[] = wxT( "SPasteColor_Red" )
static

Definition at line 67 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::LoadSettings(), and EDA_3D_VIEWER::SaveSettings().