Ejemplo n.º 1
0
        public static Quaternion From(this RosMessageTypes.Geometry.Quaternion self, CoordinateSpaceSelection selection)
        {
            switch (selection)
            {
            case CoordinateSpaceSelection.RUF:
                return(self.From <RUF>());

            case CoordinateSpaceSelection.FLU:
                return(self.From <FLU>());

            case CoordinateSpaceSelection.ENU:
                return(self.From <ENU>());

            case CoordinateSpaceSelection.NED:
                return(self.From <NED>());

            default:
                Debug.LogError("Invalid coordinate space " + selection);
                return(self.From <RUF>());
            }
        }
Ejemplo n.º 2
0
 public static Quaternion From <C>(this RosMessageTypes.Geometry.Quaternion self) where C : CoordinateSpace, new()
 {
     return(new Quaternion <C>((float)self.x, (float)self.y, (float)self.z, (float)self.w).toUnity);
 }