KiCad PCB EDA Suite
eda_3d_viewer.cpp File Reference

Implements a 3d viewer windows GUI. More...

#include "eda_3d_viewer.h"
#include "../3d_viewer_id.h"
#include <project.h>
#include <gestfich.h>
#include <wx/colordlg.h>
#include <wx/colourdata.h>
#include <lru_cache.h>
#include "../common_ogl/cogl_att_list.h"
#include <hotkeys_basic.h>
#include <wx/toolbar.h>
#include <bitmaps.h>

Go to the source code of this file.

Macros

#define ROT_ANGLE   10.0
 

Functions

 EVT_TOOL_RANGE (ID_ZOOM_IN, ID_ZOOM_REDRAW, EDA_3D_VIEWER::ProcessZoom) EVT_TOOL_RANGE(ID_START_COMMAND_3D
 
EDA_3D_VIEWER::Process_Special_Functions EVT_MENU (wxID_EXIT, EDA_3D_VIEWER::Exit3DFrame) EVT_MENU_RANGE(ID_MENU3D_GRID
 
EDA_3D_VIEWER::Process_Special_Functions EDA_3D_VIEWER::On3DGridSelection EVT_MENU_RANGE (ID_MENU3D_ENGINE, ID_MENU3D_ENGINE_END, EDA_3D_VIEWER::OnRenderEngineSelection) EVT_UPDATE_UI_RANGE(ID_START_COMMAND_3D
 

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 keyMousewheelPanning [] = wxT( "MousewheelPAN3D" )
 
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_MENU_COMMAND_END
 
EDA_3D_VIEWER::Process_Special_Functions ID_MENU3D_GRID_END
 

Detailed Description

Implements a 3d viewer windows GUI.

Definition in file eda_3d_viewer.cpp.

Macro Definition Documentation

#define ROT_ANGLE   10.0

Definition at line 263 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::Process_Special_Functions().

Function Documentation

EVT_TOOL_RANGE ( ID_ZOOM_IN  ,
ID_ZOOM_REDRAW  ,
EDA_3D_VIEWER::ProcessZoom   
)

Variable Documentation

Definition at line 130 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_VIEWER::On3DGridSelection().

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

Definition at line 55 of file eda_3d_viewer.cpp.

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

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

Definition at line 59 of file eda_3d_viewer.cpp.

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

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

Definition at line 54 of file eda_3d_viewer.cpp.

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

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

Definition at line 58 of file eda_3d_viewer.cpp.

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

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

Definition at line 53 of file eda_3d_viewer.cpp.

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

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

Definition at line 57 of file eda_3d_viewer.cpp.

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

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

Definition at line 79 of file eda_3d_viewer.cpp.

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

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

Definition at line 78 of file eda_3d_viewer.cpp.

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

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

Definition at line 77 of file eda_3d_viewer.cpp.

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

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

Definition at line 75 of file eda_3d_viewer.cpp.

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

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

Definition at line 74 of file eda_3d_viewer.cpp.

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

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

Definition at line 73 of file eda_3d_viewer.cpp.

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

const wxChar keyMousewheelPanning[] = wxT( "MousewheelPAN3D" )
static

Definition at line 81 of file eda_3d_viewer.cpp.

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

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().

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

Definition at line 86 of file eda_3d_viewer.cpp.

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

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

Definition at line 88 of file eda_3d_viewer.cpp.

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

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

Definition at line 89 of file eda_3d_viewer.cpp.

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

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

Definition at line 96 of file eda_3d_viewer.cpp.

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

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

Definition at line 92 of file eda_3d_viewer.cpp.

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

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

Definition at line 95 of file eda_3d_viewer.cpp.

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

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

Definition at line 97 of file eda_3d_viewer.cpp.

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

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

Definition at line 94 of file eda_3d_viewer.cpp.

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

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

Definition at line 93 of file eda_3d_viewer.cpp.

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

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

Definition at line 91 of file eda_3d_viewer.cpp.

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

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

Definition at line 105 of file eda_3d_viewer.cpp.

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

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

Definition at line 99 of file eda_3d_viewer.cpp.

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

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

Definition at line 110 of file eda_3d_viewer.cpp.

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

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

Definition at line 109 of file eda_3d_viewer.cpp.

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

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

Definition at line 111 of file eda_3d_viewer.cpp.

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

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

Definition at line 103 of file eda_3d_viewer.cpp.

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

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

Definition at line 102 of file eda_3d_viewer.cpp.

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

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

Definition at line 104 of file eda_3d_viewer.cpp.

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

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

Definition at line 100 of file eda_3d_viewer.cpp.

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

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().

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

Definition at line 106 of file eda_3d_viewer.cpp.

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

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

Definition at line 107 of file eda_3d_viewer.cpp.

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

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

Definition at line 108 of file eda_3d_viewer.cpp.

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

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

Definition at line 101 of file eda_3d_viewer.cpp.

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

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

Definition at line 71 of file eda_3d_viewer.cpp.

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

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

Definition at line 70 of file eda_3d_viewer.cpp.

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

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

Definition at line 69 of file eda_3d_viewer.cpp.

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

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

Definition at line 63 of file eda_3d_viewer.cpp.

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

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

Definition at line 62 of file eda_3d_viewer.cpp.

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

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

Definition at line 61 of file eda_3d_viewer.cpp.

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

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

Definition at line 67 of file eda_3d_viewer.cpp.

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

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

Definition at line 66 of file eda_3d_viewer.cpp.

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

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

Definition at line 65 of file eda_3d_viewer.cpp.

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