本文整理汇总了C#中JointType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# JointType.ToString方法的具体用法?C# JointType.ToString怎么用?C# JointType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JointType
的用法示例。
在下文中一共展示了JointType.ToString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: indivJoint
public indivJoint(Skeleton skel, JointType a, String id)
{
name = id;
skeleton = skel;
type = a;
status = false;
isDefined = true;
posReg = new position_Register();
j0 = skeleton.Joints[type];
loc = new Point3(type.ToString(), j0.Position.X, j0.Position.Y, j0.Position.Z);
}
示例2: addBone
private GameObject addBone(string name, float radius, GameObject prefab, JointType joint1, JointType joint2)
{
GameObject bone = PhotonNetwork.Instantiate ("Bone", Vector3.zero, Quaternion.identity, 0);
//(GameObject) Instantiate(prefab, Vector3.zero, Quaternion.identity);
bone.name = name; bone.transform.parent = transform;
BoneScript script = bone.GetComponent("BoneScript") as BoneScript;
script.radius = radius;
script.joint1 = transform.FindChild (joint1.ToString()).gameObject;
script.joint2 = transform.FindChild (joint2.ToString()).gameObject;
return bone;
}
示例3: JointNode
public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
{
this.IsKinectJoint = isKinectJoint;
this.JointIndex = index;
Name = isKinectJoint ? index.ToString() : name;
this.BaseAxis = axis;
this.Type = type;
if(Type != NodeTypeEnum.END)
Children = new ArrayList();
if (null != parent)
{
this.Parent = parent;
parent.AddChild(this);
}
}
示例4: jPair
public jPair(Skeleton skel, JointType a, JointType b, String id)
{
name = id;
skeleton = skel;
jointType0 = a;
jointType1 = b;
pairStatus = false;
distReg = new distance_register();
joint0 = skeleton.Joints[jointType0];
joint1 = skeleton.Joints[jointType1];
isDefined = 1;
firstPoint = new Point3(jointType0.ToString(), joint0.Position.X, joint0.Position.Y, joint0.Position.Z);
secondPoint = new Point3(jointType1.ToString(), joint1.Position.X, joint1.Position.Y, joint1.Position.Z);
pair = new Point3Pair(firstPoint, secondPoint);
pair.distance();
pair.findtheta();
}
示例5: JointSelector_JointSelected
private void JointSelector_JointSelected(object sender, JointType e)
{
tblJoint.Text = e.ToString();
}
示例6: AddSensorValue
private void AddSensorValue( JointType jointType, string x, int value )
{
var key = string.Format( "{0}_{1}", jointType.ToString(), x );
scratch.AddSensorValue( key, value.ToString() );
}
示例7: FindBone
private static BoneOrientation FindBone(JointType start, JointType end, BoneOrientationCollection collection)
{
foreach (BoneOrientation bone in collection)
{
if (bone.StartJoint == start && bone.EndJoint == end)
return bone;
}
throw new Exception("Кость " + start.ToString() + "-" + end.ToString() + " не найдена в коллекции");
}
示例8: buildObservationSequence
private List<double[][]> buildObservationSequence(string folder, JointType j)
{
List<double[][]> obsSeqs = new List<double[][]>();
using (StreamReader srx = new StreamReader(folder +"/" + j.ToString() + "_x.csv"))
{
using (StreamReader sry = new StreamReader(folder + "/" + j.ToString() + "_y.csv"))
{
using (StreamReader srz = new StreamReader(folder + "/" + j.ToString() + "_z.csv"))
{
string linex;
string[] xrow, yrow, zrow;
while ((linex = srx.ReadLine()) != null)
{
double[][] obsSeq = null;
xrow = linex.Split(',');
yrow = sry.ReadLine().Split(',');
zrow = srz.ReadLine().Split(',');
obsSeq = new double[xrow.Length][];
for (int i = 0; i < xrow.Length; i++)
{
obsSeq[i] = new double[] {Convert.ToDouble(xrow[i]),
Convert.ToDouble(yrow[i]), Convert.ToDouble(zrow[i])};
}
obsSeqs.Add(obsSeq);
}
}
}
}
return obsSeqs;
}
示例9: GetOscJointMessage
private OscElement GetOscJointMessage(Skeleton skeleton, JointType joint)
{
return new OscElement("/joint/"+joint.ToString(), skeleton.TrackingId, skeleton.Joints[joint].Position.X, skeleton.Joints[joint].Position.Y, skeleton.Joints[joint].Position.Z);
}
示例10: GetNodeIdName
public static string GetNodeIdName(JointType jointType)
{
return (jointType.ToString());
}
示例11: DrawShortBone
// DS added the following two methods to make a parent part shorter by drawing the origin of the child part at a new orgiin point
internal void DrawShortBone(JointCollection joints, JointType startJoint, JointType endJoint, JointType parentJoint, Texture2D boneTexture, float originAlongParent)
{
string nameJoint = startJoint.ToString();
if (joints[startJoint].TrackingState != JointTrackingState.Tracked ||
joints[endJoint].TrackingState != JointTrackingState.Tracked)
return;
float depth = joints[startJoint].Position.Z;
Vector2 start = this.mapMethod(joints[startJoint].Position);
Vector2 shortStart = this.mapMethod(joints[parentJoint].Position);
Vector2 end = this.mapMethod(joints[endJoint].Position);
DrawShortBoneLike(depth, start, end, shortStart, boneTexture, originAlongParent, nameJoint);
//if (startJoint == JointType.Head)
// Console.WriteLine("Cartoon Elements drawBone head position after remapping"+ start.X);
}
示例12: positionLimb
void positionLimb(Skeleton skeleton, JointType jointType1, JointType jointType2)
{
SkeletonPoint pt1 = pointConverter.ConvertPoint(skeleton.Joints[jointType1].Position);
SkeletonPoint pt2 = pointConverter.ConvertPoint(skeleton.Joints[jointType2].Position);
String limbKey = jointType1.ToString() + "-" + jointType2.ToString();
if (!LimbToLineDict.ContainsKey(limbKey))
{
Line newLine = new Line();
newLine.Stroke = Brushes.Black;
byte gray = 55;
newLine.Stroke = new SolidColorBrush(Color.FromRgb(gray, gray, gray));
newLine.StrokeThickness = 26;
newLine.StrokeStartLineCap = PenLineCap.Round;
newLine.StrokeEndLineCap = PenLineCap.Round;
Canvas.SetTop(newLine, 0);
Canvas.SetLeft(newLine, 0);
uxMainCanvas.Children.Add(newLine);
LimbToLineDict.Add(limbKey, newLine);
}
Line line = LimbToLineDict[limbKey];
line.X1 = pt1.X;
line.X2 = pt2.X;
line.Y1 = pt1.Y;
line.Y2 = pt2.Y;
}
示例13: RaiseGestureDetected
protected void RaiseGestureDetected(String gesture, JointType joint)
{
if ((DateTime.Now - lastGesture).TotalMilliseconds > MinimalPeriodBetweenGestures)
{
if (OnGestureDetected != null) OnGestureDetected(this,
new GestureEventArgs { Gesture = gesture, Joint = joint });
lastGesture = DateTime.Now;
Program.Notify(gesture + " gesture on " + joint.ToString());
}
entries[(int)joint].Clear();
}