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

#include <spnav_viewer_plugin.h>

Inheritance diagram for SPNAV_VIEWER_PLUGIN:
SPACEMOUSE_HANDLER

Public Member Functions

 SPNAV_VIEWER_PLUGIN (EDA_3D_CANVAS *aCanvas)
 
 ~SPNAV_VIEWER_PLUGIN ()
 
void SetFocus (bool aFocus=true)
 
void OnPan (double x, double y, double z) override
 Handle translation (pan) events.
 
void OnRotate (double rx, double ry, double rz) override
 Handle rotational events.
 
void OnButton (int button, bool pressed) override
 Handle button press/release events.
 

Private Member Functions

void onPollTimer (wxTimerEvent &evt)
 

Private Attributes

std::unique_ptr< SPACENAV_DRIVERm_driver
 
wxTimer m_timer
 
EDA_3D_CANVASm_canvas
 
TRACK_BALLm_camera
 
bool m_focused
 

Detailed Description

Definition at line 35 of file spnav_viewer_plugin.h.

Constructor & Destructor Documentation

◆ SPNAV_VIEWER_PLUGIN()

SPNAV_VIEWER_PLUGIN::SPNAV_VIEWER_PLUGIN ( EDA_3D_CANVAS * aCanvas)
explicit

◆ ~SPNAV_VIEWER_PLUGIN()

SPNAV_VIEWER_PLUGIN::~SPNAV_VIEWER_PLUGIN ( )

Definition at line 45 of file spnav_viewer_plugin.cpp.

References m_driver, and m_timer.

Member Function Documentation

◆ OnButton()

void SPNAV_VIEWER_PLUGIN::OnButton ( int button,
bool pressed )
overridevirtual

Handle button press/release events.

Implements SPACEMOUSE_HANDLER.

Definition at line 106 of file spnav_viewer_plugin.cpp.

◆ OnPan()

void SPNAV_VIEWER_PLUGIN::OnPan ( double x,
double y,
double z )
overridevirtual

Handle translation (pan) events.

Units are driver dependent.

Implements SPACEMOUSE_HANDLER.

Definition at line 64 of file spnav_viewer_plugin.cpp.

References m_camera, m_canvas, Pgm(), and scale.

◆ onPollTimer()

void SPNAV_VIEWER_PLUGIN::onPollTimer ( wxTimerEvent & evt)
private

Definition at line 58 of file spnav_viewer_plugin.cpp.

References m_driver, and m_focused.

Referenced by SPNAV_VIEWER_PLUGIN().

◆ OnRotate()

void SPNAV_VIEWER_PLUGIN::OnRotate ( double rx,
double ry,
double rz )
overridevirtual

Handle rotational events.

Units are driver dependent.

Implements SPACEMOUSE_HANDLER.

Definition at line 87 of file spnav_viewer_plugin.cpp.

References m_camera, m_canvas, Pgm(), and scale.

◆ SetFocus()

void SPNAV_VIEWER_PLUGIN::SetFocus ( bool aFocus = true)

Definition at line 53 of file spnav_viewer_plugin.cpp.

References m_focused.

Member Data Documentation

◆ m_camera

TRACK_BALL* SPNAV_VIEWER_PLUGIN::m_camera
private

Definition at line 53 of file spnav_viewer_plugin.h.

Referenced by OnPan(), OnRotate(), and SPNAV_VIEWER_PLUGIN().

◆ m_canvas

EDA_3D_CANVAS* SPNAV_VIEWER_PLUGIN::m_canvas
private

Definition at line 52 of file spnav_viewer_plugin.h.

Referenced by OnPan(), OnRotate(), and SPNAV_VIEWER_PLUGIN().

◆ m_driver

std::unique_ptr<SPACENAV_DRIVER> SPNAV_VIEWER_PLUGIN::m_driver
private

Definition at line 50 of file spnav_viewer_plugin.h.

Referenced by onPollTimer(), SPNAV_VIEWER_PLUGIN(), and ~SPNAV_VIEWER_PLUGIN().

◆ m_focused

bool SPNAV_VIEWER_PLUGIN::m_focused
private

Definition at line 54 of file spnav_viewer_plugin.h.

Referenced by onPollTimer(), SetFocus(), and SPNAV_VIEWER_PLUGIN().

◆ m_timer

wxTimer SPNAV_VIEWER_PLUGIN::m_timer
private

Definition at line 51 of file spnav_viewer_plugin.h.

Referenced by SPNAV_VIEWER_PLUGIN(), and ~SPNAV_VIEWER_PLUGIN().


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