KiCad PCB EDA Suite
|
Implement a canvas based on a wxGLCanvas. More...
#include <eda_3d_canvas.h>
Public Member Functions | |
EDA_3D_CANVAS (wxWindow *aParent, const wxGLAttributes &aGLAttribs, BOARD_ADAPTER &aSettings, CAMERA &aCamera, S3D_CACHE *a3DCachePointer) | |
Create a new 3D Canvas with an attribute list. | |
~EDA_3D_CANVAS () override | |
void | SetEventDispatcher (TOOL_DISPATCHER *aEventDispatcher) |
Set a dispatcher that processes events and forwards them to tools. | |
void | SetStatusBar (wxStatusBar *aStatusBar) |
void | SetInfoBar (WX_INFOBAR *aInfoBar) |
void | ReloadRequest (BOARD *aBoard=nullptr, S3D_CACHE *aCachePointer=nullptr) |
bool | IsReloadRequestPending () const |
Query if there is a pending reload request. | |
RENDER_3D_BASE * | GetCurrentRender () const |
void | RenderRaytracingRequest () |
Request to render the current view in Raytracing mode. | |
void | GetScreenshot (wxImage &aDstImage) |
Request a screenshot and output it to the aDstImage. | |
bool | SetView3D (VIEW3D_TYPE aRequestedView) |
Select a specific 3D view or operation. | |
void | SetAnimationEnabled (bool aEnable) |
Enable or disable camera animation when switching to a pre-defined view. | |
bool | GetAnimationEnabled () const |
void | SetMovingSpeedMultiplier (int aMultiplier) |
Set the camera animation moving speed multiplier option. | |
int | GetMovingSpeedMultiplier () const |
int | GetProjectionMode () const |
void | SetProjectionMode (int aMode) |
void | RenderEngineChanged () |
Notify that the render engine was changed. | |
void | DisplayStatus () |
Update the status bar with the position information. | |
void | Request_refresh (bool aRedrawImmediately=true) |
Schedule a refresh update of the canvas. | |
void | OnEvent (wxEvent &aEvent) |
Used to forward events to the canvas from popups, etc. | |
const BOARD_ADAPTER & | GetBoardAdapter () const |
Get information used to display 3D board. | |
bool | GetRenderPivot () |
Get a value indicating whether to render the pivot. | |
void | SetRenderPivot (bool aValue) |
Set aValue indicating whether to render the pivot. | |
bool | GetRender3dmousePivot () |
Get a value indicating whether to render the 3dmouse pivot. | |
void | SetRender3dmousePivot (bool aValue) |
Set aValue indicating whether to render the 3dmouse pivot. | |
void | Set3dmousePivotPos (const SFVEC3F &aPos) |
Set the position of the the 3dmouse pivot. | |
void | DoRePaint () |
The actual function to repaint the canvas. | |
void | RenderToFrameBuffer (unsigned char *aBuffer, int aWidth, int aHeight) |
void | OnCloseWindow (wxCloseEvent &event) |
CAMERA * | GetCamera () |
Get the canvas camera. | |
void | OnMouseMoveCamera (wxMouseEvent &event) |
void | OnMouseWheelCamera (wxMouseEvent &event, bool aPan) |
virtual wxSize | GetNativePixelSize () const |
wxPoint | GetNativePosition (const wxPoint &aPoint) const |
Convert the given point from client coordinates to native pixel coordinates. | |
double | GetScaleFactor () const |
Get the current scale factor. | |
void | SetVcSettings (const KIGFX::VC_SETTINGS &aVcSettings) |
Public Attributes | |
bool | m_mouse_is_moving |
bool | m_mouse_was_moved |
bool | m_camera_is_moving |
CAMERA & | m_camera |
Static Public Attributes | |
static const float | m_delta_move_step_factor = 0.7f |
Protected Attributes | |
KIGFX::VC_SETTINGS | m_settings |
< Current VIEW_CONTROLS settings. | |
Private Member Functions | |
void | OnPaint (wxPaintEvent &aEvent) |
void | OnEraseBackground (wxEraseEvent &event) |
void | OnRefreshRequest (wxEvent &aEvent) |
void | OnMouseWheel (wxMouseEvent &event) |
void | OnMagnify (wxMouseEvent &event) |
void | OnMouseMove (wxMouseEvent &event) |
void | OnLeftDown (wxMouseEvent &event) |
void | OnLeftUp (wxMouseEvent &event) |
void | OnMiddleUp (wxMouseEvent &event) |
void | OnMiddleDown (wxMouseEvent &event) |
void | OnRightUp (wxMouseEvent &event) |
void | OnRightDown (wxMouseEvent &event) |
void | OnTimerTimeout_Editing (wxTimerEvent &event) |
void | OnResize (wxSizeEvent &event) |
void | OnTimerTimeout_Redraw (wxTimerEvent &event) |
void | OnZoomGesture (wxZoomGestureEvent &event) |
void | OnPanGesture (wxPanGestureEvent &event) |
void | OnRotateGesture (wxRotateGestureEvent &event) |
void | stop_editingTimeOut_Timer () |
Stop the editing time so it will not timeout. | |
void | restart_editingTimeOut_Timer () |
Reset the editing timer. | |
void | request_start_moving_camera (float aMovingSpeed=2.0f, bool aRenderPivot=true) |
Start a camera movement. | |
void | move_pivot_based_on_cur_mouse_position () |
This function hits a ray to the board and start a movement. | |
void | render_pivot (float t, float aScale) |
Render the pivot cursor. | |
void | render3dmousePivot (float aScale) |
Render the 3dmouse pivot cursor. | |
bool | initializeOpenGL () |
void | releaseOpenGL () |
Free created targets and openGL context. | |
RAY | getRayAtCurrentMousePosition () |
Static Private Attributes | |
static const wxChar * | m_logTrace = wxT( "KI_TRACE_EDA_3D_CANVAS" ) |
Trace mask used to enable or disable the trace output of this class. | |
Implement a canvas based on a wxGLCanvas.
Definition at line 50 of file eda_3d_canvas.h.
EDA_3D_CANVAS::EDA_3D_CANVAS | ( | wxWindow * | aParent, |
const wxGLAttributes & | aGLAttribs, | ||
BOARD_ADAPTER & | aSettings, | ||
CAMERA & | aCamera, | ||
S3D_CACHE * | a3DCachePointer ) |
Create a new 3D Canvas with an attribute list.
aParent | the parent creator of this canvas. |
aGLAttribs | openGL attributes created by OGL_ATT_LIST::GetAttributesList. |
aBoard | The board. |
aSettings | the settings options to be used by this canvas. |
Definition at line 100 of file eda_3d_canvas.cpp.
References EDA_3D_CANVAS(), EDA_3D_CANVAS_ID, HIDPI_GL_3D_CANVAS::HIDPI_GL_3D_CANVAS(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, m_boardAdapter, HIDPI_GL_3D_CANVAS::m_camera, m_editing_timeout_timer, m_eventDispatcher, m_is_currently_painting, m_logTrace, m_redraw_trigger_timer, OnEvent(), OnTimerTimeout_Editing(), and OnTimerTimeout_Redraw().
Referenced by EDA_3D_CANVAS().
|
override |
Definition at line 171 of file eda_3d_canvas.cpp.
References m_accelerator3DShapes, m_logTrace, and releaseOpenGL().
void EDA_3D_CANVAS::DisplayStatus | ( | ) |
Update the status bar with the position information.
Definition at line 332 of file eda_3d_canvas.cpp.
References HIDPI_GL_3D_CANVAS::m_camera, m_parentStatusBar, X_POS, Y_POS, and ZOOM_LEVEL.
Referenced by DoRePaint(), OnMagnify(), OnMouseMove(), OnMouseWheel(), OnPanGesture(), OnRotateGesture(), OnZoomGesture(), and request_start_moving_camera().
void EDA_3D_CANVAS::DoRePaint | ( | ) |
The actual function to repaint the canvas.
It is usually called by OnPaint() but because it does not use a wxPaintDC it can be called outside a wxPaintEvent
Definition at line 358 of file eda_3d_canvas.cpp.
References _, ACTIVITY, SPHERES_GIZMO::Count, GL_CONTEXT_MANAGER::CreateCtx(), DisplayStatus(), INFOBAR_REPORTER::Finalize(), PGM_BASE::GetGLContextManager(), HIDPI_GL_CANVAS::GetNativePixelSize(), GetRunningMicroSecs(), initializeOpenGL(), GL_CONTEXT_MANAGER::LockCtx(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, m_boardAdapter, HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_camera_moving_speed, m_glRC, m_is_currently_painting, m_is_opengl_initialized, m_is_opengl_version_supported, m_logTrace, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, m_opengl_supports_raytracing, m_parentInfoBar, m_parentStatusBar, m_render3dmousePivot, m_render_pivot, m_render_raytracing_was_requested, m_strtime_camera_movement, OPENGL, Pgm(), render3dmousePivot(), render_pivot(), INFOBAR_REPORTER::Report(), STATUSBAR_REPORTER::Report(), Request_refresh(), restart_editingTimeOut_Timer(), RPT_SEVERITY_ERROR, scale, SetView3D(), GL_CONTEXT_MANAGER::UnlockCtx(), VIEW3D_BACK, VIEW3D_BOTTOM, VIEW3D_FRONT, VIEW3D_LEFT, VIEW3D_RIGHT, and VIEW3D_TOP.
Referenced by OnPaint().
|
inline |
Definition at line 130 of file eda_3d_canvas.h.
References m_animation_enabled.
|
inline |
Get information used to display 3D board.
Definition at line 169 of file eda_3d_canvas.h.
References m_boardAdapter.
Referenced by NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::GetModelExtents().
|
inlineinherited |
Get the canvas camera.
Definition at line 62 of file hidpi_gl_3D_canvas.h.
References m_camera.
Referenced by SPNAV_VIEWER_PLUGIN::SPNAV_VIEWER_PLUGIN().
|
inline |
Definition at line 104 of file eda_3d_canvas.h.
References m_3d_render.
|
inline |
Definition at line 138 of file eda_3d_canvas.h.
References m_moving_speed_multiplier.
|
virtualinherited |
Definition at line 42 of file hidpi_gl_canvas.cpp.
References GetScaleFactor().
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), EDA_3D_MODEL_VIEWER::OnPaint(), and KIGFX::OPENGL_GAL::OPENGL_GAL().
|
inherited |
Convert the given point from client coordinates to native pixel coordinates.
Definition at line 54 of file hidpi_gl_canvas.cpp.
References GetScaleFactor().
Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), and HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().
|
inline |
Definition at line 140 of file eda_3d_canvas.h.
References HIDPI_GL_3D_CANVAS::m_camera.
|
private |
Definition at line 1413 of file eda_3d_canvas.cpp.
References RAY::Init(), and HIDPI_GL_3D_CANVAS::m_camera.
Referenced by move_pivot_based_on_cur_mouse_position(), OnLeftDown(), and OnMouseMove().
|
inline |
Get a value indicating whether to render the 3dmouse pivot.
Definition at line 186 of file eda_3d_canvas.h.
References m_render3dmousePivot.
|
inline |
Get a value indicating whether to render the pivot.
Definition at line 174 of file eda_3d_canvas.h.
References m_render_pivot.
|
inherited |
Get the current scale factor.
Definition at line 66 of file hidpi_gl_canvas.cpp.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::PREVIEW::GetConstantGlyphHeight(), GetNativePixelSize(), GetNativePosition(), KIGFX::OPENGL_GAL::getScreenPixelSize(), and KIGFX::OPENGL_GAL::ResizeScreen().
void EDA_3D_CANVAS::GetScreenshot | ( | wxImage & | aDstImage | ) |
Request a screenshot and output it to the aDstImage.
aDstImage | - Screenshot destination image. |
Definition at line 298 of file eda_3d_canvas.cpp.
References OglGetScreenshot().
|
private |
Definition at line 219 of file eda_3d_canvas.cpp.
References From_UTF8(), ID_DISABLE_RAY_TRACING, m_is_opengl_initialized, m_is_opengl_version_supported, m_logTrace, m_opengl_supports_raytracing, SetOpenGLInfo(), and GL_UTILS::SetSwapInterval().
Referenced by DoRePaint(), and RenderToFrameBuffer().
|
inline |
Query if there is a pending reload request.
Definition at line 93 of file eda_3d_canvas.h.
References m_3d_render.
|
private |
This function hits a ray to the board and start a movement.
Definition at line 1281 of file eda_3d_canvas.cpp.
References RAY::at(), BEZIER, getRayAtCurrentMousePosition(), m_boardAdapter, HIDPI_GL_3D_CANVAS::m_camera, and request_start_moving_camera().
Referenced by OnMiddleUp(), and SetView3D().
void EDA_3D_CANVAS::OnCloseWindow | ( | wxCloseEvent & | event | ) |
Definition at line 205 of file eda_3d_canvas.cpp.
References releaseOpenGL().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 826 of file eda_3d_canvas.cpp.
References m_logTrace.
Referenced by wxDEFINE_EVENT().
void EDA_3D_CANVAS::OnEvent | ( | wxEvent & | aEvent | ) |
Used to forward events to the canvas from popups, etc.
Definition at line 815 of file eda_3d_canvas.cpp.
References m_eventDispatcher, and Refresh().
Referenced by EDA_3D_CANVAS().
|
private |
Definition at line 1050 of file eda_3d_canvas.cpp.
References CTX_IPC, EscapeString(), KIWAY::ExpressMail(), FRAME_PCB_EDITOR, FRAME_SCH, getRayAtCurrentMousePosition(), FOOTPRINT::GetReference(), KIWAY_HOLDER::Kiway(), m_3d_render_raytracing, MAIL_SELECTION, HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_PAD_T, stop_editingTimeOut_Timer(), and EDA_ITEM::Type().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1109 of file eda_3d_canvas.cpp.
References m_3d_render_opengl, HIDPI_GL_3D_CANVAS::m_camera_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, Refresh(), and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 848 of file eda_3d_canvas.cpp.
References DisplayStatus(), HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, Request_refresh(), and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1161 of file eda_3d_canvas.cpp.
References stop_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1168 of file eda_3d_canvas.cpp.
References HIDPI_GL_3D_CANVAS::m_camera_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, move_pivot_based_on_cur_mouse_position(), and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 936 of file eda_3d_canvas.cpp.
References _, DisplayStatus(), ZONE::GetIsRuleArea(), getRayAtCurrentMousePosition(), FOOTPRINT::GetReference(), ZONE::GetZoneName(), HOVERED_ITEM, ZONE::IsOnCopperLayer(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, m_boardAdapter, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_currentRollOverItem, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, m_parentStatusBar, HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), OPENGL, pad, PCB_ARC_T, PCB_FOOTPRINT_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, STATUSBAR_REPORTER::Report(), Request_refresh(), and EDA_ITEM::Type().
Referenced by wxDEFINE_EVENT().
|
inherited |
Definition at line 44 of file hidpi_gl_3D_canvas.cpp.
References HIDPI_GL_CANVAS::GetNativePixelSize(), HIDPI_GL_CANVAS::GetNativePosition(), m_camera, m_camera_is_moving, m_mouse_is_moving, m_mouse_was_moved, HIDPI_GL_CANVAS::m_settings, and PAN.
Referenced by EDA_3D_CANVAS::OnLeftDown(), EDA_3D_CANVAS::OnMouseMove(), and EDA_3D_CANVAS::OnRightDown().
|
private |
Definition at line 833 of file eda_3d_canvas.cpp.
References DisplayStatus(), m_boardAdapter, m_logTrace, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, HIDPI_GL_3D_CANVAS::OnMouseWheelCamera(), Request_refresh(), and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
inherited |
Definition at line 80 of file hidpi_gl_3D_canvas.cpp.
References HIDPI_GL_CANVAS::GetNativePosition(), m_camera, m_camera_is_moving, m_delta_move_step_factor, m_mouse_is_moving, m_mouse_was_moved, and HIDPI_GL_CANVAS::m_settings.
Referenced by EDA_3D_CANVAS::OnMouseWheel().
|
private |
Definition at line 351 of file eda_3d_canvas.cpp.
References DoRePaint().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 894 of file eda_3d_canvas.cpp.
References DisplayStatus(), HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, and Request_refresh().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1225 of file eda_3d_canvas.cpp.
References Refresh().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 213 of file eda_3d_canvas.cpp.
References Request_refresh().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1138 of file eda_3d_canvas.cpp.
References HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), and stop_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1148 of file eda_3d_canvas.cpp.
References HIDPI_GL_3D_CANVAS::m_camera_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 912 of file eda_3d_canvas.cpp.
References DisplayStatus(), HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_gestureLastAngle, and Request_refresh().
Referenced by wxDEFINE_EVENT().
|
private |
Definition at line 1185 of file eda_3d_canvas.cpp.
References m_editing_timeout_timer, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, and Request_refresh().
Referenced by EDA_3D_CANVAS().
|
private |
Definition at line 1213 of file eda_3d_canvas.cpp.
References m_redraw_trigger_timer, and Request_refresh().
Referenced by EDA_3D_CANVAS().
|
private |
Definition at line 867 of file eda_3d_canvas.cpp.
References DisplayStatus(), HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_gestureLastZoomFactor, Request_refresh(), and restart_editingTimeOut_Timer().
Referenced by wxDEFINE_EVENT().
|
private |
Free created targets and openGL context.
Definition at line 182 of file eda_3d_canvas.cpp.
References GL_CONTEXT_MANAGER::DestroyCtx(), PGM_BASE::GetGLContextManager(), GL_CONTEXT_MANAGER::LockCtx(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, m_glRC, Pgm(), and GL_CONTEXT_MANAGER::UnlockCtx().
Referenced by OnCloseWindow(), and ~EDA_3D_CANVAS().
Definition at line 304 of file eda_3d_canvas.cpp.
References m_3d_render, and m_boardAdapter.
|
private |
Render the 3dmouse pivot cursor.
aScale | scale to apply on the cursor. |
Definition at line 123 of file eda_3d_canvas_pivot.cpp.
References m_3dmousePivotPos, and HIDPI_GL_3D_CANVAS::m_camera.
Referenced by DoRePaint().
|
private |
Render the pivot cursor.
t | time between 0.0 and 1.0. |
aScale | scale to apply on the cursor. |
Definition at line 76 of file eda_3d_canvas_pivot.cpp.
References HIDPI_GL_3D_CANVAS::m_camera, and pivot_render_triangles().
Referenced by DoRePaint().
void EDA_3D_CANVAS::RenderEngineChanged | ( | ) |
Notify that the render engine was changed.
Definition at line 1392 of file eda_3d_canvas.cpp.
References GetAppSettings(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, OPENGL, RAYTRACING, and Request_refresh().
Referenced by EDA_3D_CONTROLLER::ToggleRaytracing().
void EDA_3D_CANVAS::RenderRaytracingRequest | ( | ) |
Request to render the current view in Raytracing mode.
Definition at line 319 of file eda_3d_canvas.cpp.
References m_3d_render, m_3d_render_raytracing, m_render_raytracing_was_requested, and Request_refresh().
void EDA_3D_CANVAS::RenderToFrameBuffer | ( | unsigned char * | aBuffer, |
int | aWidth, | ||
int | aHeight ) |
Definition at line 599 of file eda_3d_canvas.cpp.
References _, GL_CONTEXT_MANAGER::CreateCtx(), PGM_BASE::GetGLContextManager(), GetRunningMicroSecs(), initializeOpenGL(), GL_CONTEXT_MANAGER::LockCtx(), m_3d_render, m_3d_render_opengl, m_3d_render_raytracing, m_boardAdapter, HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_camera_moving_speed, m_glRC, m_is_currently_painting, m_is_opengl_initialized, m_is_opengl_version_supported, m_logTrace, HIDPI_GL_3D_CANVAS::m_mouse_is_moving, HIDPI_GL_3D_CANVAS::m_mouse_was_moved, m_opengl_supports_raytracing, m_render_pivot, m_render_raytracing_was_requested, m_strtime_camera_movement, OPENGL, Pgm(), and GL_CONTEXT_MANAGER::UnlockCtx().
void EDA_3D_CANVAS::Request_refresh | ( | bool | aRedrawImmediately = true | ) |
Schedule a refresh update of the canvas.
aRedrawImmediately | true will request a redraw, false will schedule a redraw after a short timeout. |
Definition at line 1231 of file eda_3d_canvas.cpp.
References ID_CUSTOM_EVENT_1, and m_redraw_trigger_timer.
Referenced by DoRePaint(), OnMagnify(), OnMouseMove(), OnMouseWheel(), OnPanGesture(), OnResize(), OnRotateGesture(), OnTimerTimeout_Editing(), OnTimerTimeout_Redraw(), OnZoomGesture(), RenderEngineChanged(), RenderRaytracingRequest(), and request_start_moving_camera().
|
private |
Start a camera movement.
aMovingSpeed | the time speed. |
aRenderPivot | if it should display pivot cursor while move. |
Definition at line 1250 of file eda_3d_canvas.cpp.
References DisplayStatus(), GetRunningMicroSecs(), m_animation_enabled, HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, m_camera_moving_speed, m_moving_speed_multiplier, m_render_pivot, m_strtime_camera_movement, Request_refresh(), and stop_editingTimeOut_Timer().
Referenced by move_pivot_based_on_cur_mouse_position(), and SetView3D().
|
private |
Reset the editing timer.
Definition at line 1206 of file eda_3d_canvas.cpp.
References m_3d_render, and m_editing_timeout_timer.
Referenced by DoRePaint(), OnLeftUp(), OnMagnify(), OnMiddleUp(), OnMouseWheel(), OnRightUp(), and OnZoomGesture().
|
inline |
Set the position of the the 3dmouse pivot.
aPos | is the position of the 3dmouse rotation pivot |
Definition at line 208 of file eda_3d_canvas.h.
References m_3dmousePivotPos.
|
inline |
Enable or disable camera animation when switching to a pre-defined view.
Definition at line 129 of file eda_3d_canvas.h.
References m_animation_enabled.
void EDA_3D_CANVAS::SetEventDispatcher | ( | TOOL_DISPATCHER * | aEventDispatcher | ) |
Set a dispatcher that processes events and forwards them to tools.
#DRAW_PANEL_GAL does not take over the ownership. Passing NULL disconnects all event handlers from the DRAW_PANEL_GAL and parent frame.
aEventDispatcher | is the object that will be used for dispatching events. |
Definition at line 809 of file eda_3d_canvas.cpp.
References m_eventDispatcher.
|
inline |
Definition at line 81 of file eda_3d_canvas.h.
References m_parentInfoBar.
|
inline |
Set the camera animation moving speed multiplier option.
aMultiplier | one of the possible integer options: [1,2,3,4,5]. |
Definition at line 137 of file eda_3d_canvas.h.
References m_moving_speed_multiplier.
|
inline |
Definition at line 141 of file eda_3d_canvas.h.
References HIDPI_GL_3D_CANVAS::m_camera.
|
inline |
Set aValue indicating whether to render the 3dmouse pivot.
aValue | true will cause the pivot to be rendered on the next redraw. |
Definition at line 197 of file eda_3d_canvas.h.
References m_render3dmousePivot.
|
inline |
Set aValue indicating whether to render the pivot.
aValue | true will cause the pivot to be rendered on the next redraw. |
Definition at line 181 of file eda_3d_canvas.h.
References m_render_pivot.
|
inline |
Definition at line 76 of file eda_3d_canvas.h.
References m_parentStatusBar.
|
inlineinherited |
Definition at line 62 of file hidpi_gl_canvas.h.
References m_settings.
bool EDA_3D_CANVAS::SetView3D | ( | VIEW3D_TYPE | aRequestedView | ) |
Select a specific 3D view or operation.
aRequestedView | the view to move to. |
Definition at line 1300 of file eda_3d_canvas.cpp.
References BEZIER, LINEAR, HIDPI_GL_3D_CANVAS::m_camera, HIDPI_GL_3D_CANVAS::m_camera_is_moving, HIDPI_GL_3D_CANVAS::m_delta_move_step_factor, move_pivot_based_on_cur_mouse_position(), request_start_moving_camera(), VIEW3D_BACK, VIEW3D_BOTTOM, VIEW3D_FIT_SCREEN, VIEW3D_FLIP, VIEW3D_FRONT, VIEW3D_LEFT, VIEW3D_PAN_DOWN, VIEW3D_PAN_LEFT, VIEW3D_PAN_RIGHT, VIEW3D_PAN_UP, VIEW3D_PIVOT_CENTER, VIEW3D_RIGHT, VIEW3D_TOP, VIEW3D_ZOOM_IN, and VIEW3D_ZOOM_OUT.
Referenced by DoRePaint().
|
private |
Stop the editing time so it will not timeout.
Definition at line 1200 of file eda_3d_canvas.cpp.
References m_editing_timeout_timer.
Referenced by OnLeftDown(), OnMiddleDown(), OnRightDown(), and request_start_moving_camera().
|
private |
Definition at line 325 of file eda_3d_canvas.h.
Referenced by DoRePaint(), EDA_3D_CANVAS(), GetCurrentRender(), IsReloadRequestPending(), OnMouseMove(), releaseOpenGL(), ReloadRequest(), RenderEngineChanged(), RenderRaytracingRequest(), RenderToFrameBuffer(), and restart_editingTimeOut_Timer().
|
private |
Definition at line 327 of file eda_3d_canvas.h.
Referenced by DoRePaint(), EDA_3D_CANVAS(), OnLeftUp(), OnMouseMove(), releaseOpenGL(), RenderEngineChanged(), and RenderToFrameBuffer().
|
private |
Definition at line 326 of file eda_3d_canvas.h.
Referenced by DoRePaint(), EDA_3D_CANVAS(), OnLeftDown(), OnMouseMove(), releaseOpenGL(), RenderEngineChanged(), RenderRaytracingRequest(), and RenderToFrameBuffer().
|
private |
Definition at line 337 of file eda_3d_canvas.h.
Referenced by render3dmousePivot(), and Set3dmousePivotPos().
|
private |
Definition at line 332 of file eda_3d_canvas.h.
Referenced by ~EDA_3D_CANVAS().
|
private |
Definition at line 321 of file eda_3d_canvas.h.
Referenced by GetAnimationEnabled(), request_start_moving_camera(), and SetAnimationEnabled().
|
private |
Definition at line 324 of file eda_3d_canvas.h.
Referenced by DoRePaint(), EDA_3D_CANVAS(), GetBoardAdapter(), move_pivot_based_on_cur_mouse_position(), OnMouseMove(), OnMouseWheel(), ReloadRequest(), and RenderToFrameBuffer().
|
inherited |
Definition at line 55 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DisplayStatus(), EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::EDA_3D_CANVAS(), GetCamera(), EDA_3D_CANVAS::GetProjectionMode(), EDA_3D_CANVAS::getRayAtCurrentMousePosition(), HIDPI_GL_3D_CANVAS(), EDA_3D_CANVAS::move_pivot_based_on_cur_mouse_position(), EDA_3D_CANVAS::OnMagnify(), OnMouseMoveCamera(), OnMouseWheelCamera(), EDA_3D_CANVAS::OnPanGesture(), EDA_3D_CANVAS::OnRotateGesture(), EDA_3D_CANVAS::OnZoomGesture(), EDA_3D_CANVAS::render3dmousePivot(), EDA_3D_CANVAS::render_pivot(), EDA_3D_CANVAS::RenderToFrameBuffer(), EDA_3D_CANVAS::request_start_moving_camera(), EDA_3D_CANVAS::SetProjectionMode(), and EDA_3D_CANVAS::SetView3D().
|
inherited |
Definition at line 53 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), HIDPI_GL_3D_CANVAS(), EDA_3D_CANVAS::OnLeftUp(), EDA_3D_CANVAS::OnMagnify(), EDA_3D_CANVAS::OnMiddleUp(), EDA_3D_CANVAS::OnMouseMove(), OnMouseMoveCamera(), OnMouseWheelCamera(), EDA_3D_CANVAS::OnPanGesture(), EDA_3D_CANVAS::OnRightUp(), EDA_3D_CANVAS::OnRotateGesture(), EDA_3D_CANVAS::OnZoomGesture(), EDA_3D_CANVAS::RenderToFrameBuffer(), EDA_3D_CANVAS::request_start_moving_camera(), and EDA_3D_CANVAS::SetView3D().
|
private |
Definition at line 319 of file eda_3d_canvas.h.
Referenced by DoRePaint(), RenderToFrameBuffer(), and request_start_moving_camera().
|
private |
Definition at line 334 of file eda_3d_canvas.h.
Referenced by OnMouseMove().
|
staticinherited |
Definition at line 56 of file hidpi_gl_3D_canvas.h.
Referenced by OnMouseWheelCamera(), and EDA_3D_CANVAS::SetView3D().
|
private |
Definition at line 313 of file eda_3d_canvas.h.
Referenced by EDA_3D_CANVAS(), OnTimerTimeout_Editing(), restart_editingTimeOut_Timer(), and stop_editingTimeOut_Timer().
|
private |
Definition at line 305 of file eda_3d_canvas.h.
Referenced by EDA_3D_CANVAS(), OnEvent(), and SetEventDispatcher().
|
private |
Definition at line 341 of file eda_3d_canvas.h.
Referenced by OnRotateGesture().
|
private |
Used to track gesture events.
Definition at line 340 of file eda_3d_canvas.h.
Referenced by OnZoomGesture().
|
private |
Definition at line 309 of file eda_3d_canvas.h.
Referenced by DoRePaint(), releaseOpenGL(), and RenderToFrameBuffer().
|
private |
Definition at line 316 of file eda_3d_canvas.h.
Referenced by DoRePaint(), EDA_3D_CANVAS(), and RenderToFrameBuffer().
|
private |
Definition at line 310 of file eda_3d_canvas.h.
Referenced by DoRePaint(), initializeOpenGL(), and RenderToFrameBuffer().
|
private |
Definition at line 311 of file eda_3d_canvas.h.
Referenced by DoRePaint(), initializeOpenGL(), and RenderToFrameBuffer().
|
inherited |
Definition at line 51 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), HIDPI_GL_3D_CANVAS(), EDA_3D_CANVAS::OnLeftUp(), EDA_3D_CANVAS::OnMiddleUp(), OnMouseMoveCamera(), OnMouseWheelCamera(), EDA_3D_CANVAS::OnRightUp(), EDA_3D_CANVAS::OnTimerTimeout_Editing(), and EDA_3D_CANVAS::RenderToFrameBuffer().
|
inherited |
Definition at line 52 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), HIDPI_GL_3D_CANVAS(), EDA_3D_CANVAS::OnMouseMove(), OnMouseMoveCamera(), EDA_3D_CANVAS::OnMouseWheel(), OnMouseWheelCamera(), EDA_3D_CANVAS::OnTimerTimeout_Editing(), EDA_3D_CANVAS::RenderEngineChanged(), and EDA_3D_CANVAS::RenderToFrameBuffer().
|
private |
Definition at line 322 of file eda_3d_canvas.h.
Referenced by GetMovingSpeedMultiplier(), request_start_moving_camera(), and SetMovingSpeedMultiplier().
|
private |
Definition at line 329 of file eda_3d_canvas.h.
Referenced by DoRePaint(), initializeOpenGL(), and RenderToFrameBuffer().
|
private |
Definition at line 307 of file eda_3d_canvas.h.
Referenced by DoRePaint(), and SetInfoBar().
|
private |
Definition at line 306 of file eda_3d_canvas.h.
Referenced by DisplayStatus(), DoRePaint(), OnMouseMove(), and SetStatusBar().
|
private |
Definition at line 315 of file eda_3d_canvas.h.
Referenced by EDA_3D_CANVAS(), OnTimerTimeout_Redraw(), and Request_refresh().
|
private |
Definition at line 336 of file eda_3d_canvas.h.
Referenced by DoRePaint(), GetRender3dmousePivot(), and SetRender3dmousePivot().
|
private |
Definition at line 318 of file eda_3d_canvas.h.
Referenced by DoRePaint(), GetRenderPivot(), RenderToFrameBuffer(), request_start_moving_camera(), and SetRenderPivot().
|
private |
Definition at line 330 of file eda_3d_canvas.h.
Referenced by DoRePaint(), RenderRaytracingRequest(), and RenderToFrameBuffer().
|
protectedinherited |
< Current VIEW_CONTROLS settings.
Definition at line 66 of file hidpi_gl_canvas.h.
Referenced by HIDPI_GL_CANVAS(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), HIDPI_GL_3D_CANVAS::OnMouseWheelCamera(), and SetVcSettings().
|
private |
Definition at line 320 of file eda_3d_canvas.h.
Referenced by DoRePaint(), RenderToFrameBuffer(), and request_start_moving_camera().