private void parseGyro(SexpT sExpression) { SexpT pointer = sExpression.list.next; string name = ""; float rx = 0, ry = 0, rz = 0; while (pointer != null) { if (pointer.ty == EltT.SEXP_LIST) { if (pointer.list.val == "n") { name = pointer.list.next.val; } if (pointer.list.val == "rt") { rx = (float)Convert.ToInt32(pointer.list.next.val); ry = (float)Convert.ToInt32(pointer.list.next.next.val); rz = (float)Convert.ToInt32(pointer.list.next.next.next.val); } } pointer = pointer.next; } Gyro gyro = new Gyro(); gyro.setRate(new Point(rx, ry, rz)); this.worldModel.setGyro(gyro); }
public void setGyro(Gyro gyro) { this.gyro = gyro; }