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.
 
void SetScaleFactor (double aFactor)
 Set the canvas scale factor, probably for a hi-DPI display.
 
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.
 

Private Attributes

double m_scale_factor
 The current scale factor (e.g.
 

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 
)

Definition at line 30 of file hidpi_gl_3D_canvas.cpp.

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.

Referenced by NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL().

◆ 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 55 of file hidpi_gl_canvas.cpp.

References HIDPI_GL_CANVAS::GetScaleFactor().

Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), OnMouseMoveCamera(), and OnMouseWheelCamera().

◆ GetScaleFactor()

◆ OnMouseMoveCamera()

◆ OnMouseWheelCamera()

◆ SetScaleFactor()

void HIDPI_GL_CANVAS::SetScaleFactor ( double  aFactor)
inherited

◆ SetVcSettings()

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

Definition at line 67 of file hidpi_gl_canvas.h.

Referenced by EDA_3D_VIEWER_FRAME::applySettings().

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_scale_factor

double HIDPI_GL_CANVAS::m_scale_factor
privateinherited

The current scale factor (e.g.

for hi-DPI displays)

Definition at line 77 of file hidpi_gl_canvas.h.

Referenced by HIDPI_GL_CANVAS::GetScaleFactor(), and HIDPI_GL_CANVAS::SetScaleFactor().

◆ m_settings

KIGFX::VC_SETTINGS HIDPI_GL_CANVAS::m_settings
protectedinherited

< Current VIEW_CONTROLS settings.

Definition at line 71 of file hidpi_gl_canvas.h.

Referenced by OnMouseWheelCamera().


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