5#ifndef VRPN_INERTIAMOUSE_H
6#define VRPN_INERTIAMOUSE_H
8#include "vrpn_Analog.h"
9#include "vrpn_Button.h"
10#include "vrpn_Configure.h"
11#include "vrpn_Connection.h"
12#include "vrpn_Shared.h"
13#include "vrpn_Types.h"
31 t = in_; in_ = o.in_; o.in_ = t;
32 t = out_; out_ = o.out_; o.out_ = t;
40 double filter (
double s)
42 out_ = s - in_ + (0.95 * out_);
69 double filter (
double s)
72 in_[1] = s / 6.242183581;
74 out_[1] = in_[0] + in_[1] + (0.6795992982 * out_[0]);
79 in_[0] = in_[1] = out_[0] = out_[1] = 0.0;
92 Update_Interval_Hz = 7372800 / 64 / 13 / Channels,
94 static const double Vel_Decay;
114 fprintf(stderr,
"vrpn_inertiamouse::~vrpn_inertiamouse(): delete failed\n");
125 virtual int reset(
void);
133 unsigned char buffer_[512];
139 struct timeval timestamp;
147 virtual void clear_values(
void);
155 = vrpn_CONNECTION_LOW_LATENCY);
157 virtual void report (vrpn_uint32 class_of_service
158 = vrpn_CONNECTION_LOW_LATENCY);
定义 vrpn_inertiamouse.h:16
定义 vrpn_inertiamouse.h:59
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
定义 vrpn_inertiamouse.h:86
virtual int get_report(void)
virtual void mainloop()
Called once through each main loop iteration to handle updates.
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report whether or not changed
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report iff changed