KiCad PCB EDA Suite
|
Provides basic 3D controls ( zoom, rotate, translate, ... ) More...
#include <hidpi_gl_3D_canvas.h>
Public Member Functions | |
HIDPI_GL_3D_CANVAS (const KIGFX::VC_SETTINGS &aVcSettings, CAMERA &aCamera, wxWindow *parent, const wxGLAttributes &aGLAttribs, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette) | |
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. | |
Provides basic 3D controls ( zoom, rotate, translate, ... )
Definition at line 39 of file hidpi_gl_3D_canvas.h.
HIDPI_GL_3D_CANVAS::HIDPI_GL_3D_CANVAS | ( | const KIGFX::VC_SETTINGS & | aVcSettings, |
CAMERA & | aCamera, | ||
wxWindow * | parent, | ||
const wxGLAttributes & | aGLAttribs, | ||
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = 0 , |
||
const wxString & | name = wxGLCanvasName , |
||
const wxPalette & | palette = wxNullPalette |
||
) |
Definition at line 30 of file hidpi_gl_3D_canvas.cpp.
|
inline |
Get the canvas camera.
Definition at line 62 of file hidpi_gl_3D_canvas.h.
Referenced by NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL().
|
virtualinherited |
Definition at line 42 of file hidpi_gl_canvas.cpp.
References HIDPI_GL_CANVAS::GetScaleFactor().
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_MODEL_VIEWER::OnMouseMove(), 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 HIDPI_GL_CANVAS::GetScaleFactor().
Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), OnMouseMoveCamera(), and OnMouseWheelCamera().
|
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(), HIDPI_GL_CANVAS::GetNativePixelSize(), HIDPI_GL_CANVAS::GetNativePosition(), KIGFX::OPENGL_GAL::getScreenPixelSize(), and KIGFX::OPENGL_GAL::ResizeScreen().
void HIDPI_GL_3D_CANVAS::OnMouseMoveCamera | ( | wxMouseEvent & | event | ) |
Definition at line 44 of file hidpi_gl_3D_canvas.cpp.
References CAMERA::Drag(), HIDPI_GL_CANVAS::GetNativePixelSize(), HIDPI_GL_CANVAS::GetNativePosition(), m_camera, m_camera_is_moving, m_mouse_is_moving, m_mouse_was_moved, CAMERA::Pan(), CAMERA::SetCurMousePosition(), and CAMERA::SetCurWindowSize().
Referenced by EDA_3D_CANVAS::OnLeftDown(), and EDA_3D_CANVAS::OnMouseMove().
void HIDPI_GL_3D_CANVAS::OnMouseWheelCamera | ( | wxMouseEvent & | event, |
bool | aPan | ||
) |
Definition at line 68 of file hidpi_gl_3D_canvas.cpp.
References HIDPI_GL_CANVAS::GetNativePosition(), CAMERA::GetZoom(), m_camera, m_camera_is_moving, m_delta_move_step_factor, m_mouse_is_moving, m_mouse_was_moved, KIGFX::VC_SETTINGS::m_scrollModifierPanH, KIGFX::VC_SETTINGS::m_scrollModifierPanV, KIGFX::VC_SETTINGS::m_scrollModifierZoom, KIGFX::VC_SETTINGS::m_scrollReversePanH, KIGFX::VC_SETTINGS::m_scrollReverseZoom, HIDPI_GL_CANVAS::m_settings, CAMERA::Pan(), CAMERA::SetCurMousePosition(), and CAMERA::Zoom().
Referenced by EDA_3D_CANVAS::OnMouseWheel().
|
inlineinherited |
Definition at line 62 of file hidpi_gl_canvas.h.
Referenced by EDA_3D_VIEWER_FRAME::applySettings().
CAMERA& HIDPI_GL_3D_CANVAS::m_camera |
Definition at line 55 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DisplayStatus(), EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::GetProjectionMode(), EDA_3D_CANVAS::getRayAtCurrentMousePosition(), 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::request_start_moving_camera(), EDA_3D_CANVAS::SetProjectionMode(), and EDA_3D_CANVAS::SetView3D().
bool HIDPI_GL_3D_CANVAS::m_camera_is_moving |
Definition at line 53 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), 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::OnRotateGesture(), EDA_3D_CANVAS::OnZoomGesture(), EDA_3D_CANVAS::request_start_moving_camera(), and EDA_3D_CANVAS::SetView3D().
|
static |
Definition at line 56 of file hidpi_gl_3D_canvas.h.
Referenced by OnMouseWheelCamera(), and EDA_3D_CANVAS::SetView3D().
bool HIDPI_GL_3D_CANVAS::m_mouse_is_moving |
Definition at line 51 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::OnLeftUp(), EDA_3D_CANVAS::OnMiddleUp(), OnMouseMoveCamera(), OnMouseWheelCamera(), and EDA_3D_CANVAS::OnTimerTimeout_Editing().
bool HIDPI_GL_3D_CANVAS::m_mouse_was_moved |
Definition at line 52 of file hidpi_gl_3D_canvas.h.
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_CANVAS::OnMouseMove(), OnMouseMoveCamera(), EDA_3D_CANVAS::OnMouseWheel(), OnMouseWheelCamera(), EDA_3D_CANVAS::OnTimerTimeout_Editing(), and EDA_3D_CANVAS::RenderEngineChanged().
|
protectedinherited |
< Current VIEW_CONTROLS settings.
Definition at line 66 of file hidpi_gl_canvas.h.
Referenced by OnMouseWheelCamera().