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

91  :
92 
93  wxGLCanvas( 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  //DBG( Run_3d_viewer_test_cases() );
104 
105  wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::EDA_3D_CANVAS" ) );
106 
107  m_editing_timeout_timer.SetOwner( this );
108  Connect( m_editing_timeout_timer.GetId(),
109  wxEVT_TIMER,
110  wxTimerEventHandler( EDA_3D_CANVAS::OnTimerTimeout_Editing ),
111  NULL,
112  this );
113 
114  m_redraw_trigger_timer.SetOwner( this );
115  Connect( m_redraw_trigger_timer.GetId(),
116  wxEVT_TIMER,
117  wxTimerEventHandler( EDA_3D_CANVAS::OnTimerTimeout_Redraw ),
118  NULL,
119  this );
120 
121  m_mouse_was_moved = false;
122  m_mouse_is_moving = false;
123  m_camera_is_moving = false;
124  m_render_pivot = false;
125  m_camera_moving_speed = 1.0f;
126 
127  m_strtime_camera_movement = 0;
128 
129  m_is_opengl_initialized = false;
130 
131  m_render_raytracing_was_requested = 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 }
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 1244 of file eda_3d_viewer.cpp.

Referenced by EDA_3D_CANVAS::OnRightClick().