31 lines
830 B
C#
31 lines
830 B
C#
using UnityEngine;
|
|
|
|
public class RobotMoveStep
|
|
{
|
|
public string FullLine { get; private set; }
|
|
public RobotPose Pose { get; private set; }
|
|
|
|
public RobotMoveStep(string line, string coordString)
|
|
{
|
|
this.FullLine = line;
|
|
|
|
string[] values = coordString.Split(',');
|
|
if (values.Length == 6)
|
|
{
|
|
this.Pose = new RobotPose(
|
|
float.Parse(values[0]), float.Parse(values[1]), float.Parse(values[2]),
|
|
float.Parse(values[3]), float.Parse(values[4]), float.Parse(values[5])
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
public class RobotPose
|
|
{
|
|
public float x, y, z, rx, ry, rz;
|
|
public RobotPose(float x, float y, float z, float rx, float ry, float rz)
|
|
{
|
|
this.x = x; this.y = y; this.z = z;
|
|
this.rx = rx; this.ry = ry; this.rz = rz;
|
|
}
|
|
} |