public static Vector3 From(this RosMessageTypes.Geometry.Vector3 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>());
            }
        }
예제 #2
0
 public static Vector3 From <C>(this RosMessageTypes.Geometry.Vector3 self) where C : CoordinateSpace, new()
 {
     return(new Vector3 <C>((float)self.x, (float)self.y, (float)self.z).toUnity);
 }