Skip to content

Commit

Permalink
ワープ値変更
Browse files Browse the repository at this point in the history
  • Loading branch information
novogrammer committed Mar 11, 2012
1 parent 3f82dac commit 1d8ad1f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
16 changes: 13 additions & 3 deletions KinectSdkKyonyu/KinectSdkKyonyu/Game1.cs
Expand Up @@ -157,8 +157,10 @@ Vector3 getWorldCoordinateAt(int inX, int inY)
#endif
if ( z < 800)
{
z = 800;//0.8[m]から
}else if (z > 4000)
// z = 800;//0.8[m]から
z = 4000;//4[m]まで
}
else if (z > 4000)
{
z = 4000;//4[m]まで
}
Expand Down Expand Up @@ -248,6 +250,7 @@ protected override void Initialize()
}
setupCloudVertex();
kinectSensor = KinectSensor.KinectSensors[0];

#if USE_KINECT_THREAD
Thread kinectThread = new Thread(() =>
{
Expand All @@ -258,7 +261,14 @@ protected override void Initialize()
#endif
kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
kinectSensor.SkeletonStream.Enable();
//積極的にノイズにより揺らす
TransformSmoothParameters smooth = new TransformSmoothParameters()
{
Correction=1.0f,
JitterRadius=0.0f,
Smoothing=0.0f
};
kinectSensor.SkeletonStream.Enable(smooth);
kinectSensor.Start();
base.Initialize();
}
Expand Down
2 changes: 1 addition & 1 deletion KinectSdkKyonyu/KinectSdkKyonyu/Kyonyu/KyonyuOp.cs
Expand Up @@ -17,7 +17,7 @@ class KyonyuOp : KyonyuMesh
public static readonly int COLS = 12;
public static readonly int ROWS = 6;
public static readonly float RADIUS = 90;//[mm]
public static readonly float WARP_LENGTH = 100;//[mm]
public static readonly float WARP_LENGTH = 1000;//[mm]
private List<KyonyuJoint> m_JointList;
private List<KyonyuPoint> m_PointList;
Matrix m_PinnedMatrix=Matrix.Identity;
Expand Down
2 changes: 1 addition & 1 deletion KinectSdkKyonyu/KinectSdkKyonyu/Kyonyu/KyonyuPairOp.cs
Expand Up @@ -12,7 +12,7 @@ class KyonyuPairOp
const int OP_QTY = 2;
KyonyuOp[] m_OpList = new KyonyuOp[OP_QTY] { new KyonyuOp(), new KyonyuOp() };
Vector3 m_OpOffsetSide = new Vector3(75, 0, 0);
Vector3 m_OpOffsetFront = new Vector3(0, -200, 50);
Vector3 m_OpOffsetFront = new Vector3(0, -200, 75);
//一致しているため、回転なし
Matrix m_OpRot=Matrix.Identity;
Tuple<Texture2D,Texture2D> m_Texture;//cache
Expand Down
4 changes: 3 additions & 1 deletion KinectSdkKyonyu/KinectSdkKyonyu/Kyonyu/KyonyuPoint.cs
Expand Up @@ -9,6 +9,8 @@ namespace KinectSdkKyonyu.Kyonyu
class KyonyuPoint
{
static readonly float GRAVITY_A = 9.8f * 1000;//[mm/(s*s)]
//
// static readonly float GRAVITY_A = 98.0f * 1000;//[mm/(s*s)]
static readonly float AIR_FRICTION = 0.005f;//[N/(mm/s)]
public Vector3 m_Position=new Vector3();//[mm]
public Vector3 m_Velocity = new Vector3();//[mm/s]
Expand All @@ -32,7 +34,7 @@ public void updatePosition(float inDt)
{
Vector3 a = m_Force/m_Mass;
a.Y -= GRAVITY_A;
#if true
#if false
m_Velocity+=a*inDt;
m_Position+=m_Velocity*inDt;
#else
Expand Down

0 comments on commit 1d8ad1f

Please sign in to comment.