bool calcCor(int state) { mCorXml = CorXml.getInstance(); position = mCorXml.getPos(mNum); Vector3 dis = position[state] - distance; // Debug.Log(mNum); float value = dis.sqrMagnitude; //기울기 분석 추가 //가우시안 필터 적용 추가 mText.text = value.ToString(); timeText.text = netTime.ToString(); if (value < th1) { mat.color = Color.green; errorTime = Time.time; return(true); } else if (value < th2) { mat.color = Color.yellow; netTime = netTime + ((Time.time - errorTime) / 2); errorTime = Time.time; return(false); } mat.color = Color.red; netTime = netTime + (Time.time - errorTime); errorTime = Time.time; return(false); }
public static CorXml getInstance() { if (corXml == null) { corXml = new CorXml(); } return(corXml); }
void Start() { mDataSet = new List <string>(); corXml = CorXml.getInstance(); //corXml.loadFile("test.txt"); errorTimes = new float[5]; head.init((int)body.head); lh.init((int)body.leftHand); rh.init((int)body.rightHand); lf.init((int)body.leftFoot); rf.init((int)body.rightFoot); }