KiCad PCB EDA Suite
Loading...
Searching...
No Matches
HIDPI_GL_3D_CANVAS Class Reference

Provides basic 3D controls ( zoom, rotate, translate, ... ) More...

#include <hidpi_gl_3D_canvas.h>

Inheritance diagram for HIDPI_GL_3D_CANVAS:
HIDPI_GL_CANVAS EDA_3D_CANVAS

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

Detailed Description

Provides basic 3D controls ( zoom, rotate, translate, ... )

Definition at line 39 of file hidpi_gl_3D_canvas.h.

Constructor & Destructor Documentation

◆ HIDPI_GL_3D_CANVAS()

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 )

Member Function Documentation

◆ GetCamera()

CAMERA * HIDPI_GL_3D_CANVAS::GetCamera ( )
inline

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

◆ GetNativePixelSize()

wxSize HIDPI_GL_CANVAS::GetNativePixelSize ( ) const
virtualinherited

◆ GetNativePosition()

wxPoint HIDPI_GL_CANVAS::GetNativePosition ( const wxPoint & aPoint) const
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().

◆ GetScaleFactor()

◆ OnMouseMoveCamera()

◆ OnMouseWheelCamera()

void HIDPI_GL_3D_CANVAS::OnMouseWheelCamera ( wxMouseEvent & event,
bool aPan )

◆ SetVcSettings()

void HIDPI_GL_CANVAS::SetVcSettings ( const KIGFX::VC_SETTINGS & aVcSettings)
inlineinherited

Definition at line 62 of file hidpi_gl_canvas.h.

References m_settings.

Member Data Documentation

◆ m_camera

◆ m_camera_is_moving

◆ m_delta_move_step_factor

const float HIDPI_GL_3D_CANVAS::m_delta_move_step_factor = 0.7f
static

Definition at line 56 of file hidpi_gl_3D_canvas.h.

Referenced by OnMouseWheelCamera(), and EDA_3D_CANVAS::SetView3D().

◆ m_mouse_is_moving

◆ m_mouse_was_moved

◆ m_settings

KIGFX::VC_SETTINGS HIDPI_GL_CANVAS::m_settings
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().


The documentation for this class was generated from the following files: