KiCad PCB EDA Suite
eda_3d_canvas.cpp File Reference

Implementation of a 3d canvas. More...

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
 

Variables

struct EDA_HOTKEY_CONFIG g_3DViewer_Hokeys_Descr []
 

Detailed Description

Implementation of a 3d canvas.

Definition in file eda_3d_canvas.cpp.

Function Documentation

Definition at line 81 of file eda_3d_canvas.cpp.

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

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

Variable Documentation

struct EDA_HOTKEY_CONFIG g_3DViewer_Hokeys_Descr[]

Definition at line 89 of file 3d-viewer/3d_viewer/hotkeys.cpp.

Referenced by EDA_3D_CANVAS::OnRightClick().