/Users/craigcornelius/Projects/SPRING Mac Release 0.2/haptic_v2.h

Go to the documentation of this file.
00001 // $Id: haptic_v2.h,v 1.6 2006/05/24 16:52:41 sean Exp $
00002 // $Copyright: (c)2001 National Biocomputation Center, Stanford University $
00003 
00004 //
00005 //  haptic_v2.h
00006 //
00007 //  Tyler Kohn 1999
00008 //
00009 
00010 #ifndef Haptic_v2_Header
00011 #define Haptic_v2_Header
00012 
00013 #ifdef _WIN32
00014 
00015 #include <winsock.h>
00016 
00017 #else
00018 #include <sys/types.h>
00019 #include <sys/socket.h>
00020 #include <netinet/in.h>
00021 #include <stdio.h>
00022 
00023 #ifndef SOCKET
00024 #define SOCKET unsigned int
00025 #endif // SOCKET
00026 
00027 #endif
00028 
00029 #include "sensor.h"
00030 #include "socket.h"
00031 #include "void.h"
00032 #include "interpol.h"
00033 #include "space.h"
00034 #include "triangles.h"
00035 #include <iostream>      // For debugging messages
00036 
00037 using namespace std;
00038 
00039 #define RAYON 0.5
00040 #define MATRIX 0.3
00041 
00042 class Haptic_v2 : public Sensor {
00043     Socket *hsock;
00044 public: // public vars
00045     Point3D force;      // force to apply
00046     space *my_space;
00047     space_t *my_space_t;
00048     space_v *my_space_v;
00049     space_i *my_space_i;
00050     space_i *points_to_save;
00051     
00052 public:
00053     Haptic_v2(char* machine_name);
00054     virtual ~Haptic_v2();
00055     static const char* rcsid;
00056     static int debug;
00057     
00058     void Update();
00059     int spaceChanged();
00060 private:
00061     char *buf;
00062     int sizebuf;
00063     long hash;
00064 };
00065 
00066 #endif

Generated on Thu Aug 30 11:03:14 2007 for SPRING Mac by  doxygen 1.5.3