Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     left = (hand == "Left");
     right = (hand == "Right");
     reader = new GloveReader ();
     objectTransform = null;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     sampler = new JointSampler ();
     user_id = PlayerPrefs.GetInt ("ActiveUser", 1);
     // Load ZigFu game object.  This game object has 4 Zig related script Components.  Use this object
     // to instances of these script's classes in order to access event information :)
     zigfu = GameObject.Find ("ZigFu");
     zig_control = zigfu.GetComponent <Zig>();
     skeleton = GetComponent <ZigSkeleton>();
     db_control = new dbAccess ();
     reader = new GloveReader ();
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     reader = new GloveReader ();
     maxGrip = 0.0f;
     text = new GUIText ();
 }
Exemplo n.º 4
0
    /*
     * Accept a GloveReader instance and store relevant values into the database
     */
    public void SampleGloves(GloveReader reader, int user_id, string scene_name)
    {
        float [] values = reader.getValues ();
        float l_index = values [reader.LH_IndexFinger()];
        float l_middle = values [reader.LH_MiddleFinger()];
        float l_ring = values [reader.LH_RingFinger()];
        float l_pinky = values [reader.LH_PinkyFinger()];
        float l_thumb = 0;
        float l_knuckle = values [reader.LH_Knuckle ()];
        float r_index = values [reader.RH_IndexFinger ()];
        float r_middle = values [reader.RH_MiddleFinger ()];
        float r_ring = values [reader.RH_RingFinger ()];
        float r_pinky = values [reader.RH_PinkyFinger ()];
        float r_thumb = 0;
        float r_knuckle = values [reader.RH_Knuckle ()];

        float [] values_in = new float [] {
            l_index,
            l_middle,
            l_ring,
            l_pinky,
            l_thumb,
            l_knuckle,
            r_index,
            r_middle,
            r_ring,
            r_pinky,
            r_thumb,
            r_knuckle
        };

        db_control.OpenDB();
        db_control.InsertTimeSeriesGloveData(active_user, scene_name, values_in);
        db_control.CloseDB();
    }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     wrist_transform = GameObject.Find(wrist_name).transform;
     //Debug.Log("Rotation x: " + transform.localEulerAngles.x);
     reader = new GloveReader();
 }
    // Use this for initialization
    void Start()
    {
        moving = false;
        reader = new GloveReader ();
        amount = 0.25f;

        // Set up database info and open connection
        SetupDatabase ();
        rightCalibrationPoints [0] = leftCalibrationPoints [0] = active_user;
        //db_control.InsertInto(calibration_table_name, rightCalibrationPoints);
    }
Exemplo n.º 7
0
 void Start()
 {
     /* Initialization */
     reader = new GloveReader();
 }