KiCad PCB EDA Suite
eda_3d_canvas.cpp File Reference

Implementation of a 3d canvas. More...

#include <GL/glew.h>
#include <wx/tokenzr.h>
#include "../common_ogl/openGL_includes.h"
#include "../common_ogl/ogl_utils.h"
#include "eda_3d_canvas.h"
#include "../3d_viewer_id.h"
#include "../3d_rendering/3d_render_raytracing/c3d_render_raytracing.h"
#include "../3d_viewer/eda_3d_viewer.h"
#include "../3d_rendering/test_cases.h"
#include <class_board.h>
#include "status_text_reporter.h"
#include <gl_context_mgr.h>
#include <profile.h>
#include <bitmaps.h>
#include <hotkeys_basic.h>
#include <menus_helpers.h>

Go to the source code of this file.

Functions

 EVT_MENU_RANGE (ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END, EDA_3D_CANVAS::OnPopUpMenu) EDA_3D_CANVAS
 

Detailed Description

Implementation of a 3d canvas.

Definition in file eda_3d_canvas.cpp.

Function Documentation

◆ EVT_MENU_RANGE()

Definition at line 81 of file eda_3d_canvas.cpp.

92  :
93  HIDPI_GL_CANVAS( aParent,
94  wxID_ANY,
95  aAttribList,
96  wxDefaultPosition,
97  wxDefaultSize,
98  wxFULL_REPAINT_ON_RESIZE
99  ),
100  m_settings( aSettings )
101 {
102  // Run test cases in debug mode, once.
103 
104  wxLogTrace( m_logTrace, "EDA_3D_CANVAS::EDA_3D_CANVAS" );
105 
106  m_editing_timeout_timer.SetOwner( this );
107  Connect( m_editing_timeout_timer.GetId(),
108  wxEVT_TIMER,
109  wxTimerEventHandler( EDA_3D_CANVAS::OnTimerTimeout_Editing ),
110  NULL,
111  this );
112 
113  m_redraw_trigger_timer.SetOwner( this );
114  Connect( m_redraw_trigger_timer.GetId(),
115  wxEVT_TIMER,
116  wxTimerEventHandler( EDA_3D_CANVAS::OnTimerTimeout_Redraw ),
117  NULL,
118  this );
119 
120  m_mouse_was_moved = false;
121  m_mouse_is_moving = false;
122  m_camera_is_moving = false;
123  m_render_pivot = false;
124  m_camera_moving_speed = 1.0f;
125 
126  m_strtime_camera_movement = 0;
127 
128  m_is_opengl_initialized = false;
129 
130  m_render_raytracing_was_requested = false;
131  m_opengl_supports_raytracing = false;
132 
133  m_parentStatusBar = NULL;
134  m_glRC = NULL;
135 
136  m_3d_render = NULL;
137 
138  m_3d_render_raytracing = new C3D_RENDER_RAYTRACING( aSettings );
139  m_3d_render_ogl_legacy = new C3D_RENDER_OGL_LEGACY( aSettings );
140 
141  wxASSERT( m_3d_render_raytracing != NULL );
142  wxASSERT( m_3d_render_ogl_legacy != NULL );
143 
144  RenderEngineChanged();
145 
146  wxASSERT( aBoard != NULL );
147  m_settings.SetBoard( aBoard );
148 
149  wxASSERT( a3DCachePointer != NULL );
150  m_settings.Set3DCacheManager( a3DCachePointer );
151 }
wxGLCanvas wrapper for HiDPI/Retina support.
void OnTimerTimeout_Redraw(wxTimerEvent &event)
The C3D_RENDER_OGL_LEGACY class render the board using openGL legacy mode.
void OnTimerTimeout_Editing(wxTimerEvent &event)

References EDA_3D_CANVAS::OnTimerTimeout_Editing(), and EDA_3D_CANVAS::OnTimerTimeout_Redraw().