public Meta(EBodyType eBody, ELensType eLens, ELightType eLight) { scnt++; seq = scnt; Body = eBody; Lens = eLens; Light = eLight; }
public BodyPart(EBodyType bodyType, HpSystem hpSystem, string name, float size, CapacityInfo capacityInfo) { this.BodyType = bodyType; this.HpSystem = hpSystem; this.Name = name; this.NameCustom = name; this.Size = size; this.CapacityInfo = capacityInfo; }
public static void Main(string[] args) { EBodyType bodyType = EBodyType.EH_BA; ELensType lensType = ELensType.EH_L1; ELightType lightType = ELightType.LT_CLEAR; PictureFile pictureFile = new PictureFile("사진", bodyType, lensType, lightType); PictureFile pictureFile2 = new PictureFile("사진", bodyType, lensType, lightType); pictureFile.View(); pictureFile2.View(); }
public static string BodyType2String(EBodyType type) { switch (type) { case EBodyType.Humanoid: return(BodyHumanoidName); case EBodyType.Tank: return(BodyTankName); default: return(BodyNoneName); } }
public Body(EBodyType bodyType) { this.BodyPartCount = 0; this.BodyType = bodyType; this.Name = BodyTypes.BodyType2String(BodyType); this._bodyParts = new BodyPart[MaxBodyPartCount]; this._bodyNodes = new BodyNode[MaxBodyPartCount]; this._rootNode = new BodyNode(-1); this.HealingAmount = 0; this.HealingAmountMultiplier = 1f; this.HealingPeriod = 0; this.TimeSinceHeal = float.MaxValue; this._eventSystem = new BodyEventSystem(this); }
public Meta MakeMeta(EBodyType bodyType, ELensType lensType, ELightType lightType) { foreach (var meta in metas) { if (meta.isEqual(bodyType, lensType, lightType)) { return(meta); } } Meta m = new Meta(bodyType, lensType, lightType); metas.Add(m); return(m); }
// Rotation, the Skeleton of a Kinect has no orientation information, it is always oriented towards the Kinect i.e. fixed // The Kinect has also a video frame and a depth frame with pixels, this is ignored here // and extension can be provided to the KinectBody once this information is required. public KinectBody(IList <Point> list, EBodyType type) { this.Points = list; this.BodyType = type; }
/// <summary> /// 云通讯HttpPost接口封装。 /// </summary> /// <param name="url">请求路径</param> /// <param name="date">日期</param> /// <param name="account">账号:子账号或者主账号</param> /// <param name="data">请求数据 /// </param> /// <returns></returns> private string CreateHttpPost(string url, string date, string account, string data, EBodyType eType) { try { Uri address = new Uri(url); // 创建网络请求 HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest; setCertificateValidationCallBack(); // 构建Head request.Method = "POST"; Encoding myEncoding = Encoding.GetEncoding("utf-8"); byte[] myByte = myEncoding.GetBytes(account + ":" + date); string authStr = Convert.ToBase64String(myByte); request.Headers.Add("Authorization", authStr); // 构建Body if (eType == EBodyType.EType_XML) { request.Accept = "application/xml"; request.ContentType = "application/xml;charset=utf-8"; } else { request.Accept = "application/json"; request.ContentType = "application/json;charset=utf-8"; } byte[] byteData = UTF8Encoding.UTF8.GetBytes(data); // 开始请求 using (Stream postStream = request.GetRequestStream()) { postStream.Write(byteData, 0, byteData.Length); } // 获取请求 using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { StreamReader reader = new StreamReader(response.GetResponseStream()); string responseStr = reader.ReadToEnd(); if (responseStr != null && responseStr.Length > 0) { return(responseStr); } } } catch (Exception e) { throw e; } return(""); }
public OptiTrackBody(string id) { this.OptiTrackId = id; this.Type = EBodyType.MarkerSet; }
public PictureFile(string name, EBodyType bodyType, ELensType lensType, ELightType lightType) { MetaPool meta_pool = MetaPool.Singleton; meta = meta_pool.MakeMeta(bodyType, lensType, lightType); }
public bool isEqual(EBodyType bodyType, ELensType lensType, ELightType lightType) { return((bodyType == Body) && (lensType == Lens) && (Light == lightType)); }
public static BodyPart GetBodyPart(EBodyType bodyType, string name) => GetBodyPart(BodyTypes.BodyType2String(bodyType), name);
public static Body GetBody(EBodyType bodyType) => GetBody(BodyTypes.BodyType2String(bodyType));