vrpn 07.35
Virtual Reality Peripheral Network
 
Loading...
Searching...
No Matches
vrpn_Tracker_NovintFalcon.h
Go to the documentation of this file.
1// -*- c++ -*-
2// This file provides an interface to a Novint Falcon.
3// http://home.novint.com/products/novint_falcon.php
4// It uses libnifalcon to communicate with the device.
5// http://libnifalcon.nonpolynomial.org/
6//
7// file: vrpn_Tracker_NovintFalcon.h
8// author: Axel Kohlmeyer akohlmey@gmail.com 2010-04-14
9// copyright: (C) 2010 Axel Kohlmeyer
10// license: Released to the Public Domain.
11// depends: libnifalcon-1.0.1, libusb-1.0, VRPN 07_26
12// tested on: Linux x86_64 w/ gcc 4.4.1
13
14#ifndef __TRACKER_NOVINTFALCON_H
15#define __TRACKER_NOVINTFALCON_H
16
17#include "vrpn_Configure.h" // IWYU pragma: keep
18
19#if defined(VRPN_USE_LIBNIFALCON)
20
21#include "vrpn_Tracker.h"
22#include "vrpn_Button.h"
23#include "vrpn_ForceDevice.h"
24
25// Forward declaration for proxy class that wraps
26// the device management of the falcon.
27class vrpn_NovintFalcon_Device;
28
29// Forward declaration for proxy class that maintains
30// the list of objects that contribute to the force.
31class vrpn_NovintFalcon_ForceObjects;
32
33class VRPN_API vrpn_Tracker_NovintFalcon
34 : public vrpn_Tracker, public vrpn_Button_Filter, public vrpn_ForceDevice {
35
36public:
38 vrpn_Tracker_NovintFalcon(const char *name,
39 vrpn_Connection *c = NULL,
40 const int devidx = 0,
41 const char *grip = NULL,
42 const char *kine = NULL,
43 const char *damp = NULL);
44
46 ~vrpn_Tracker_NovintFalcon();
47
49 virtual void mainloop();
50
51protected: // methods for tracker and button functionality
52 virtual void reset();
53 virtual int get_report(void);
54 virtual void send_report(void);
55 virtual void clear_values(void);
56
57protected: // methods for force feedback functionality
59 virtual void handle_forces(void);
60public:
62 virtual int update_forcefield_effect(vrpn_HANDLERPARAM p);
63protected:
64 int m_devflags; //< device configuration flags
65 vrpn_float64 m_update_rate; //< update rate of device
66 vrpn_float64 m_damp; //< damping factor for force updates
67 struct timeval m_timestamp; //< last update of device status
68 vrpn_NovintFalcon_Device *m_dev; //< device handle
69 vrpn_NovintFalcon_ForceObjects *m_obj; //< handle to force generating objects
70};
71
72#endif /* defined(VRPN_USE_LIBNIFALCON) */
73#endif
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition vrpn_Button.h:66
class VRPN_API vrpn_Connection
Definition vrpn_3Space.h:7
#define VRPN_API