public static Plugin.Posef ToPosef(this Pose pose) { var result = new Plugin.Posef(); var p = pose.Position; result.Position.x = p.X; result.Position.y = p.Y; result.Position.z = -p.Z; var q = pose.Orientation; result.Orientation.x = -q.X; result.Orientation.y = -q.Y; result.Orientation.z = q.Z; result.Orientation.w = q.W; return(result); }
public static Pose ToOVRPose(this Plugin.Posef p) { return(new Pose( new Vector3(p.Position.x, p.Position.y, -p.Position.z), new Quaternion(-p.Orientation.x, -p.Orientation.y, p.Orientation.z, p.Orientation.w))); }