-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHandPointContact.cs
More file actions
47 lines (43 loc) · 1.31 KB
/
HandPointContact.cs
File metadata and controls
47 lines (43 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Windows;
using Multitouch.Contracts;
using OpenNI;
namespace NITEProvider
{
class HandPointContact : Contact
{
public Point OriginPoint;
public double velocityx=0;
public double velocityy = 0;
public double accelerationx = 0;
public double accelerationy=0;
public Point3D RowPoint;
public Point3D prev_RowPoint;
public double timestamp;
public HandPointContact(HandPointContact hc, ContactState state):
base(hc.Id, state,hc.Position, 20, 20)
{
velocityx = 0;
velocityy = 0;
// CenterPoint = new Point(hc.Position.X, hc.Position.Y);
}
public HandPointContact(int id, int x, int y, ContactState state)
: base(id, state,new Point(x,y), 20, 20)
{
// CenterPoint = new Point(x,y);
velocityy = 0;
velocityx = 0;
Orientation = 0;
}
public void Update(int x,int y,ContactState state)
{
Position = new Point(x, y);
State = state;
Orientation = 0;
}
public void destroy()
{
State = ContactState.Removed;
}
}
}