VRPN Scol plugin
Loading...
Searching...
No Matches
scolplugin.cpp
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
25/*
26 VRPN interface for Scol
27 First version : July 2013
28 Author : Bastien BOURINEAU - I-Maginer
29*/
30
31#include "sVrpn.h"
32#include <scolMemoryHelper.hpp>
33
35#ifdef SCOL_STATIC
36extern cbmachine ww;
37extern mmachine mm;
38#else
39cbmachine ww;
40mmachine mm;
41#endif
42
43int OBJ_VRPN_SCOL;
44
45int VRPN_ANALOG_CB;
46int SCOL_VRPN_ANALOG_CB = 0;
47
48int VRPN_BTN_CB;
49int SCOL_VRPN_BTN_CB = 1;
50int VRPN_BTN_STATE_CB;
51int SCOL_VRPN_BTN_STATE_CB = 2;
52
53int VRPN_TRACKER_CB;
54int SCOL_VRPN_TRACKER_CB = 3;
55int VRPN_TRACKER_VEL_CB;
56int SCOL_VRPN_TRACKER_VEL_CB = 4;
57int VRPN_TRACKER_ACC_CB;
58int SCOL_VRPN_TRACKER_ACC_CB = 5;
59
60int VRPN_DIAL_CB;
61int SCOL_VRPN_DIAL_CB = 6;
62
63int VRPN_TEXT_CB;
64int SCOL_VRPN_TEXT_CB = 7;
65
87int destroyVRPNObj(mmachine m, SCOL_PTR_TYPE handsys, int handscol)
88{
89 // Read the first element of a TAB element (table of object)
90 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(handscol));
91
92 // Safely dispose of "vrpnObj" pointer
93 sVrpnThread::GetInstance()->RemoveDevice(vrpnObj);
94
95 MMsetPointer<SVrpn*>(m, MTOP(handscol), 0);
96
97 // Display debug message
98 MMechostr(MSKDEBUG, "ObjVRPN destroyed.\n");
99 return 0;
100}
101
102
113int _CRvrpnDevice(mmachine m)
114{
115#ifdef _SCOL_DEBUG_
116 MMechostr(0,"_CRvrpnDevice\n");
117#endif
118 // Declare local variables
119 int k = 0;
120
121 int sDevice = MMpull(m);
122 int sHost = MMpull(m);
123
124 // Get the channel without pulling it (first element in the stack)
125 int channel = MMget(m, 0);
126
127 // Test the channel
128 if (channel == NIL || sDevice == NIL)
129 {
130 MMechostr(MSKDEBUG, "Channel NIL\n");
131 MMset(m, 0, NIL);
132 return 0;
133 }
134
135 std::string hostName = "localhost";
136
137 if (sHost != NIL)
138 hostName = MMstartstr(m, MTOP(sHost));
139
140 std::string deviceName = MMstartstr(m, MTOP(sDevice));
141 SVrpn* vrpnObj = sVrpnThread::GetInstance()->AddDevice(hostName, deviceName);
142 if (vrpnObj == NULL)
143 {
144 MMechostr(MSKDEBUG,"vrpnObj failed\n");
145 MMset(m, 0, NIL);
146 return 0;
147 }
148
149 // Allocate a space in the stack for a table of joypad object
150 if ((MMpushPointer(m, vrpnObj) != 0))
151 {
152 sVrpnThread::GetInstance()->RemoveDevice(vrpnObj);
153 MMset(m, 0, NIL);
154 return MERRMEM;
155 }
156
157 // Create a new scol joypad object
158 k = OBJcreate(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, NIL, 0);
159
160#ifdef _SCOL_DEBUG_
161 MMechostr(0,"ok\n");
162#endif
163
164 return k;
165}
166
174int _DSvrpnDevice(mmachine m)
175{
176#ifdef _SCOL_DEBUG_
177 MMechostr(MSKDEBUG,"_DSvrpnDevice\n");
178#endif
179
180 int vrpnTab = MMget(m,0);
181 if (vrpnTab == NIL)
182 {
183 MMset(m, 0, NIL);
184 return 0;
185 }
186
187 OBJdelTM(m, OBJ_VRPN_SCOL, vrpnTab);
188 MMset(m, 0, ITOM(0));
189
190#ifdef _SCOL_DEBUG_
191 MMechostr(MSKDEBUG,"ok\n");
192#endif
193 return 0;
194}
195
196
209int _CBvrpnAnalogData(mmachine m)
210{
211 int vrpnTab = MMget(m, 2);
212 int cb = MMget(m, 1);
213
214 if (vrpnTab != NIL)
215 {
216 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
217 vrpnObj->EnableAnalogData(cb == NIL ? false : true);
218 }
219
220 // Add a reflex
221 MMechostr(MSKDEBUG, "_CBvrpnAnalogData ...adding reflex\n");
222 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_ANALOG_CB);
223}
224
228int getVRPNAnalogCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
229{
230 SVrpn* vrpnObj = (SVrpn*) wParam;
231 SCbData* vrpnData = (SCbData*) lParam;
232
233 //call the scol callback
234 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_ANALOG_CB))
235 {
236 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
237 delete(vrpnData);
238 return 0;
239 }
240
241 for (unsigned int i = 0; i < vrpnData->analogData.size(); i++)
242 {
243 if (MMpush(m, FTOM(vrpnData->analogData[i])))
244 return MERRMEM;
245 }
246
247 if(MMpush(m, NIL))
248 return MERRMEM;
249
250 for(unsigned int j = 0; j < vrpnData->analogData.size(); j++)
251 {
252 if (MMpush(m, 2*2))
253 return MERRMEM;
254
255 if (int k=MBdeftab(m))
256 return k;
257 }
258
259 // Call reflex previously defined
260 int k = OBJcallreflex(m, 1 /*nb param after obj and u0*/);
261
262 // free data
263 delete(vrpnData);
264 return k;
265}
266
267
280int _CBvrpnButtonData(mmachine m)
281{
282 int vrpnTab = MMget(m, 2);
283 int cb = MMget(m, 1);
284
285 if (vrpnTab != NIL)
286 {
287 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
288 vrpnObj->EnableButtonData(cb == NIL ? false : true);
289 }
290
291 // Add a reflex
292 MMechostr(MSKDEBUG, "_CBvrpnButtonData ...adding reflex\n");
293 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_BTN_CB);
294}
295
299int getVRPNBtnCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
300{
301 SVrpn* vrpnObj = (SVrpn*) wParam;
302 SCbData* vrpnData = (SCbData*) lParam;
303
304 //call the scol callback
305 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_BTN_CB))
306 {
307 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
308 delete(vrpnData);
309 return 0;
310 }
311
312 for (unsigned int i = 0; i < vrpnData->btnData.size(); i++)
313 {
314 if (MMpush(m, ITOM(vrpnData->btnData[i])))
315 return MERRMEM;
316 }
317
318 if(MMpush(m, NIL))
319 return MERRMEM;
320
321 for(unsigned int j = 0; j < vrpnData->btnData.size(); j++)
322 {
323 if (MMpush(m, 2*2))
324 return MERRMEM;
325
326 if (int k=MBdeftab(m))
327 return k;
328 }
329
330 // Call reflex previously defined
331 int k = OBJcallreflex(m, 1 /*nb param after obj and u0*/);
332
333 // free data
334 delete(vrpnData);
335 return k;
336}
337
338
352int _CBvrpnButtonState(mmachine m)
353{
354 int vrpnTab = MMget(m, 2);
355 int cb = MMget(m, 1);
356
357 if (vrpnTab != NIL)
358 {
359 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
360 vrpnObj->EnableButtonStateData(cb == NIL ? false : true);
361 }
362
363 // Add a reflex
364 MMechostr(MSKDEBUG, "_CBvrpnButtonState ...adding reflex\n");
365 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_BTN_STATE_CB);
366}
367
371int getVRPNBtnStateCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
372{
373 SVrpn* vrpnObj = (SVrpn*) wParam;
374 SCbData* vrpnData = (SCbData*) lParam;
375
376 //call the scol callback
377 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_BTN_STATE_CB))
378 {
379 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
380 delete(vrpnData);
381 return 0;
382 }
383
384 MMpush(m, ITOM(vrpnData->valueId));
385 MMpush(m, ITOM(vrpnData->btnState));
386
387 // Call reflex previously defined
388 int k = OBJcallreflex(m, 2 /*nb param after obj and u0*/);
389
390 // free data
391 delete(vrpnData);
392 return k;
393}
394
395
410int _CBvrpnTrackerData(mmachine m)
411{
412 int vrpnTab = MMget(m, 2);
413 int cb = MMget(m, 1);
414
415 if (vrpnTab != NIL)
416 {
417 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
418 vrpnObj->EnableTrackerData(cb == NIL ? false : true);
419 }
420
421 // Add a reflex
422 MMechostr(MSKDEBUG, "_CBvrpnTrackerData ...adding reflex\n");
423 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_TRACKER_CB);
424}
425
429int getVRPNTrackerCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
430{
431 SVrpn* vrpnObj = (SVrpn*) wParam;
432 SCbData* vrpnData = (SCbData*) lParam;
433
434 //call the scol callback
435 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_TRACKER_CB))
436 {
437 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
438 delete(vrpnData);
439 return 0;
440 }
441
442 MMpush(m, ITOM(vrpnData->valueId));
443
444 int vec = MMmalloc(m, 3, TYPETAB);
445 if(vec == NIL)
446 return MERRMEM;
447
448 MMstore(m, vec, 0, FTOM(vrpnData->vectorData[0]));
449 MMstore(m, vec, 1, FTOM(vrpnData->vectorData[1]));
450 MMstore(m, vec, 2, FTOM(vrpnData->vectorData[2]));
451 MMpush(m, PTOM(vec));
452
453 int quat = MMmalloc(m, 4, TYPETAB);
454 if(quat == NIL)
455 return MERRMEM;
456
457 MMstore(m, quat, 0, FTOM(vrpnData->quatData[0]));
458 MMstore(m, quat, 1, FTOM(vrpnData->quatData[1]));
459 MMstore(m, quat, 2, FTOM(vrpnData->quatData[2]));
460 MMstore(m, quat, 3, FTOM(vrpnData->quatData[3]));
461 MMpush(m, PTOM(quat));
462
463 // Call reflex previously defined
464 int k = OBJcallreflex(m, 3 /*nb param after obj and u0*/);
465
466 // free data
467 delete(vrpnData);
468 return k;
469}
470
486{
487 int vrpnTab = MMget(m, 2);
488 int cb = MMget(m, 1);
489
490 if (vrpnTab != NIL)
491 {
492 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
493 vrpnObj->EnableTrackerVelData(cb == NIL ? false : true);
494 }
495
496 // Add a reflex
497 MMechostr(MSKDEBUG, "_CBvrpnTrackerVelocityData ...adding reflex\n");
498 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_TRACKER_VEL_CB);
499}
500
504int getVRPNTrackerVelocityCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
505{
506 SVrpn* vrpnObj = (SVrpn*) wParam;
507 SCbData* vrpnData = (SCbData*) lParam;
508
509 //call the scol callback
510 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_TRACKER_VEL_CB))
511 {
512 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
513 delete(vrpnData);
514 return 0;
515 }
516
517 MMpush(m, ITOM(vrpnData->valueId));
518
519 int vec = MMmalloc(m, 3, TYPETAB);
520 if(vec == NIL)
521 return MERRMEM;
522
523 MMstore(m, vec, 0, FTOM(vrpnData->vectorData[0]));
524 MMstore(m, vec, 1, FTOM(vrpnData->vectorData[1]));
525 MMstore(m, vec, 2, FTOM(vrpnData->vectorData[2]));
526 MMpush(m, PTOM(vec));
527
528 int quat = MMmalloc(m, 4, TYPETAB);
529 if(quat == NIL)
530 return MERRMEM;
531
532 MMstore(m, quat, 0, FTOM(vrpnData->quatData[0]));
533 MMstore(m, quat, 1, FTOM(vrpnData->quatData[1]));
534 MMstore(m, quat, 2, FTOM(vrpnData->quatData[2]));
535 MMstore(m, quat, 3, FTOM(vrpnData->quatData[3]));
536 MMpush(m, PTOM(quat));
537
538 // Call reflex previously defined
539 int k = OBJcallreflex(m, 3 /*nb param after obj and u0*/);
540
541 // free data
542 delete(vrpnData);
543 return k;
544}
545
561{
562 int vrpnTab = MMget(m, 2);
563 int cb = MMget(m, 1);
564
565 if (vrpnTab != NIL)
566 {
567 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
568 vrpnObj->EnableTrackerAccelData(cb == NIL ? false : true);
569 }
570
571 // Add a reflex
572 MMechostr(MSKDEBUG, "_CBvrpnTrackerAccelData ...adding reflex\n");
573 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_TRACKER_ACC_CB);
574}
575
579int getVRPNTrackerAccelCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
580{
581 SVrpn* vrpnObj = (SVrpn*) wParam;
582 SCbData* vrpnData = (SCbData*) lParam;
583
584 //call the scol callback
585 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_TRACKER_ACC_CB))
586 {
587 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
588 delete(vrpnData);
589 return 0;
590 }
591
592 MMpush(m, ITOM(vrpnData->valueId));
593
594 int vec = MMmalloc(m, 3, TYPETAB);
595 if(vec == NIL)
596 return MERRMEM;
597
598 MMstore(m, vec, 0, FTOM(vrpnData->vectorData[0]));
599 MMstore(m, vec, 1, FTOM(vrpnData->vectorData[1]));
600 MMstore(m, vec, 2, FTOM(vrpnData->vectorData[2]));
601 MMpush(m, PTOM(vec));
602
603 int quat = MMmalloc(m, 4, TYPETAB);
604 if(quat == NIL)
605 return MERRMEM;
606
607 MMstore(m, quat, 0, FTOM(vrpnData->quatData[0]));
608 MMstore(m, quat, 1, FTOM(vrpnData->quatData[1]));
609 MMstore(m, quat, 2, FTOM(vrpnData->quatData[2]));
610 MMstore(m, quat, 3, FTOM(vrpnData->quatData[3]));
611 MMpush(m, PTOM(quat));
612
613 // Call reflex previously defined
614 int k = OBJcallreflex(m, 3 /*nb param after obj and u0*/);
615
616 // free data
617 delete(vrpnData);
618 return k;
619}
620
633int _CBvrpnTextData(mmachine m)
634{
635 int vrpnTab = MMget(m, 2);
636 int cb = MMget(m, 1);
637
638 if (vrpnTab != NIL)
639 {
640 SVrpn* vrpnObj = MMgetPointer<SVrpn*>(m, MTOP(vrpnTab));
641 vrpnObj->EnableTextData(cb == NIL ? false : true);
642 }
643
644 // Add a reflex
645 MMechostr(MSKDEBUG, "_CBvrpnTextData ...adding reflex\n");
646 return OBJaddreflex(m, OBJ_VRPN_SCOL, SCOL_VRPN_TEXT_CB);
647}
648
652int getVRPNTextCb(mmachine m, SCOL_PTR_TYPE wParam, SCOL_PTR_TYPE lParam)
653{
654 SVrpn* vrpnObj = (SVrpn*) wParam;
655 SCbData* vrpnData = (SCbData*) lParam;
656
657 //call the scol callback
658 if (OBJbeginreflex(m, OBJ_VRPN_SCOL, SCOL_PTR vrpnObj, SCOL_VRPN_TEXT_CB))
659 {
660 MMechostr(MSKDEBUG, "ObjVRPN callback not found\n");
661 delete(vrpnData);
662 return 0;
663 }
664
665 Mpushstrbloc(m, (char*)vrpnData->textData.c_str());
666
667 // Call reflex previously defined
668 int k = OBJcallreflex(m, 1 /*nb param after obj and u0*/);
669
670 // free data
671 delete(vrpnData);
672 return k;
673}
674
675// Scol / Package **************************************************************
676static NativeDefinition svrpnDef[] =
677{
678 { "ObjVRPN", TYPTYPE, NULL, NULL },
679 { "_CRvrpnDevice", 3, "fun [Chn S S] ObjVRPN", _CRvrpnDevice },
680 { "_DSvrpnDevice", 1, "fun [ObjVRPN] I", _DSvrpnDevice },
681 { "_CBvrpnAnalogData", 3, "fun [ObjVRPN fun [ObjVRPN u0 [F r1]] u1 u0] ObjVRPN", _CBvrpnAnalogData },
682 { "_CBvrpnButtonData", 3, "fun [ObjVRPN fun [ObjVRPN u0 [I r1]] u1 u0] ObjVRPN", _CBvrpnButtonData },
683 { "_CBvrpnButtonState", 3, "fun [ObjVRPN fun [ObjVRPN u0 I I] u1 u0] ObjVRPN", _CBvrpnButtonState },
684 { "_CBvrpnTrackerData", 3, "fun [ObjVRPN fun [ObjVRPN u0 I [F F F] [F F F F]] u1 u0] ObjVRPN", _CBvrpnTrackerData },
685 { "_CBvrpnTrackerVelocityData", 3, "fun [ObjVRPN fun [ObjVRPN u0 I [F F F] [F F F F]] u1 u0] ObjVRPN", _CBvrpnTrackerVelocityData },
686 { "_CBvrpnTrackerAccelData", 3, "fun [ObjVRPN fun [ObjVRPN u0 I [F F F] [F F F F]] u1 u0] ObjVRPN", _CBvrpnTrackerAccelData },
687 { "_CBvrpnTextData", 3, "fun [ObjVRPN fun [ObjVRPN u0 S] u1 u0] ObjVRPN", _CBvrpnTextData }
688};
689
690// Everything inside _cond and _endcond is ignored by doxygen
692
697int LoadVRPN(mmachine m)
698{
699 int k = 0;
700
701 MMechostr(MSKDEBUG,"\n" );
702 MMechostr(MSKDEBUG," > Loading VRPN Support\n");
703
704 // Declare a new type of object ("ObjVRPN")
705 OBJ_VRPN_SCOL = OBJregister(8 /*nb of callback*/, 1, destroyVRPNObj, "OBJ_VRPN_SCOL");
706
707 k = PKhardpak2(m, "mVRPN.pkg-1.0", sizeof(svrpnDef) / sizeof(svrpnDef[0]), svrpnDef);
708
709 // Register callbacks
710 VRPN_ANALOG_CB = OBJgetUserEvent();
711 OBJdefEvent(VRPN_ANALOG_CB, getVRPNAnalogCb);
712
713 VRPN_BTN_CB = OBJgetUserEvent();
714 OBJdefEvent(VRPN_BTN_CB, getVRPNBtnCb);
715
716 VRPN_BTN_STATE_CB = OBJgetUserEvent();
717 OBJdefEvent(VRPN_BTN_STATE_CB, getVRPNBtnStateCb);
718
719 VRPN_TEXT_CB = OBJgetUserEvent();
720 OBJdefEvent(VRPN_TEXT_CB, getVRPNTextCb);
721
722 VRPN_TRACKER_CB = OBJgetUserEvent();
723 OBJdefEvent(VRPN_TRACKER_CB, getVRPNTrackerCb);
724
725 VRPN_TRACKER_VEL_CB = OBJgetUserEvent();
726 OBJdefEvent(VRPN_TRACKER_VEL_CB, getVRPNTrackerVelocityCb);
727
728 VRPN_TRACKER_ACC_CB = OBJgetUserEvent();
729 OBJdefEvent(VRPN_TRACKER_ACC_CB, getVRPNTrackerAccelCb);
730
731 /*VRPN_DIAL_CB = OBJgetUserEvent();
732 OBJdefEvent(VRPN_DIAL_CB, getVRPNDialCb);*/
733
734 MMechostr(MSKDEBUG," > Successfully Loaded\n\n");
735 return k;
736}
737
738int CloseVRPN()
739{
740 MMechostr(MSKDEBUG,"\n" );
741 MMechostr(MSKDEBUG," > Unloading VRPN Support\n");
742
743 // nothing to do
744
745 MMechostr(MSKDEBUG," > Successfully unloaded\n\n");
746 return 0;
747}
748
750
751
756#ifndef SCOL_STATIC
757extern "C" SCOL_EXPORT int ScolLoadPlugin(mmachine m, cbmachine w)
758#else
759extern "C" SCOL_EXPORT int ScolSvrpnLoadPlugin(mmachine m, cbmachine w)
760#endif
761{
762 SCOLinitplugin(w);
763 return LoadVRPN(m);
764}
765
770#ifndef SCOL_STATIC
771extern "C" SCOL_EXPORT int ScolUnloadPlugin()
772#else
773extern "C" SCOL_EXPORT int ScolSvrpnUnloadPlugin()
774#endif
775{
776 return CloseVRPN();
777}
Definition sVrpn.h:88
int _CBvrpnButtonState(mmachine m)
_CBvrpnButtonState : This function sets the callback called when a VRPN Button data is received
int _DSvrpnDevice(mmachine m)
_DSvrpnDevice : Destroy VRPN object
int _CBvrpnTrackerData(mmachine m)
_CBvrpnTrackerData : This function sets the callback called when a VRPN traker position data is recei...
int _CBvrpnTrackerAccelData(mmachine m)
_CBvrpnTrackerAccelData : This function sets the callback called when a VRPN traker acceleration data...
int _CBvrpnAnalogData(mmachine m)
_CBvrpnAnalogData : This function sets the callback called when a VRPN Analog data is received
int _CBvrpnTrackerVelocityData(mmachine m)
_CBvrpnTrackerVelocityData : This function sets the callback called when a VRPN traker velocity data ...
int _CBvrpnTextData(mmachine m)
_CBvrpnTextData : This function sets the callback called when a VRPN text data is received
int _CRvrpnDevice(mmachine m)
_CRvrpnDevice : This function create a VRPN object
int _CBvrpnButtonData(mmachine m)
_CBvrpnButtonData : This function sets the callback called when a VRPN Button data is received