Blender V4.3
GHOST_NDOFManager Class Referenceabstract

#include <GHOST_NDOFManager.hh>

Inherited by GHOST_NDOFManagerCocoa, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerWin32.

Public Member Functions

virtual ~GHOST_NDOFManager ()
 
virtual bool available ()=0
 
NDOF Manager Class
 GHOST_NDOFManager (GHOST_System &)
 
NDOF Device Setup
bool setDevice (unsigned short vendor_id, unsigned short product_id)
 
NDOF Motion
void setDeadZone (float)
 
bool sendMotionEvent ()
 
NDOF Update State
void updateTranslation (const int t[3], uint64_t time)
 
void updateRotation (const int r[3], uint64_t time)
 

Protected Attributes

GHOST_Systemsystem_
 

NDOF Buttons

void updateButton (int button_number, bool press, uint64_t time)
 
void updateButtonsBitmask (int button_bits, uint64_t time)
 
void updateButtonsArray (NDOF_Button_Array buttons, uint64_t time, NDOF_Button_Type type)
 

Detailed Description

Definition at line 40 of file GHOST_NDOFManager.hh.

Constructor & Destructor Documentation

◆ GHOST_NDOFManager()

GHOST_NDOFManager::GHOST_NDOFManager ( GHOST_System & sys)

Definition at line 211 of file GHOST_NDOFManager.cc.

◆ ~GHOST_NDOFManager()

virtual GHOST_NDOFManager::~GHOST_NDOFManager ( )
inlinevirtual

Definition at line 43 of file GHOST_NDOFManager.hh.

Member Function Documentation

◆ available()

virtual bool GHOST_NDOFManager::available ( )
pure virtual

Whether multi-axis functionality is available (via the OS or driver) does not imply that a device is plugged in or being used.

Implemented in GHOST_NDOFManagerCocoa, GHOST_NDOFManagerUnix, and GHOST_NDOFManagerWin32.

◆ sendMotionEvent()

bool GHOST_NDOFManager::sendMotionEvent ( )

Processes and sends most recent raw data as an #NDOFMotion event returns whether an event was sent.

Definition at line 662 of file GHOST_NDOFManager.cc.

References CLOG_INFO, GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kFinished, GHOST_kFinishing, GHOST_kInProgress, GHOST_kNotStarted, GHOST_kStarting, LOG, ndof_progress_string, nearHomePosition(), GHOST_System::pushEvent(), and system_.

◆ setDeadZone()

void GHOST_NDOFManager::setDeadZone ( float dz)

Filter out small/accidental/un-calibrated motions by setting up a "dead zone" around home position set to 0 to disable 0.1 is a safe and reasonable value.

Definition at line 633 of file GHOST_NDOFManager.cc.

References CLOG_INFO, and LOG.

◆ setDevice()

◆ updateButton()

◆ updateButtonsArray()

void GHOST_NDOFManager::updateButtonsArray ( NDOF_Button_Array buttons,
uint64_t time,
NDOF_Button_Type type )

Definition at line 586 of file GHOST_NDOFManager.cc.

References LongButton, and updateButton().

◆ updateButtonsBitmask()

void GHOST_NDOFManager::updateButtonsBitmask ( int button_bits,
uint64_t time )

Definition at line 555 of file GHOST_NDOFManager.cc.

References diff(), mask(), and updateButton().

Referenced by DeviceEvent().

◆ updateRotation()

void GHOST_NDOFManager::updateRotation ( const int r[3],
uint64_t time )

Definition at line 388 of file GHOST_NDOFManager.cc.

References time.

Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().

◆ updateTranslation()

void GHOST_NDOFManager::updateTranslation ( const int t[3],
uint64_t time )

The latest raw axis data from the device.

Note
axis data should be in blender view coordinates
  • +X is to the right.
  • +Y is up.
  • +Z is out of the screen.
  • for rotations, look from origin to each +axis.
  • rotations are + when CCW, - when CW. Each platform is responsible for getting axis data into this form these values should not be scaled (just shuffled or flipped).

Definition at line 381 of file GHOST_NDOFManager.cc.

References time.

Referenced by DeviceEvent(), and GHOST_NDOFManagerUnix::processEvents().

Member Data Documentation

◆ system_

GHOST_System& GHOST_NDOFManager::system_
protected

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