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
 

Detailed Description

Implementation of a 3d canvas.

Definition in file eda_3d_canvas.cpp.

Function Documentation

Definition at line 76 of file eda_3d_canvas.cpp.

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

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