public static AirSimQuaternion ToAirSimQuaternion(Quaternion src) { AirSimQuaternion quat = new AirSimQuaternion(); SetToAirSim(src, ref quat); return(quat); }
public static Quaternion ToUnityQuaternion(AirSimQuaternion src) { Quaternion quat = new Quaternion(); SetToUnity(src, ref quat); return(quat); }
public bool SetCameraOrientation(string cameraName, AirSimQuaternion orientation) { foreach (DataCaptureScript capture in captureCameras) { if (capture.GetCameraName() == cameraName) { capture.SetOrientation(orientation); return(true); } } return(false); }
public void reset() { image_uint_len = 0; image_float_len = 0; image_data_uint = new byte[] { }; image_data_float = new float[] { }; this.camera_position = new AirSimVector(); this.camera_orientation = new AirSimQuaternion(); this.pixels_as_float = false; this.compress = false; this.width = 0; this.height = 0; this.image_type = ImageType.Scene; }
public ImageResponse(string cameraName) { image_uint_len = 0; image_data_uint = null; image_float_len = 0; image_data_float = null; camera_position = new AirSimVector(0, 0, 0); camera_orientation = new AirSimQuaternion(0, 0, 0, 0); pixels_as_float = false; compress = false; width = 0; height = 0; image_type = 0; }
public ImageResponse(List <byte> imageDataInt, List <float> imageDataFloat, string cameraName, AirSimVector camera_position, AirSimQuaternion camera_orientation, bool pixels_as_float, bool compress, int width, int height, ImageType image_type) { if (imageDataInt == null) { image_uint_len = 0; } else { image_uint_len = imageDataInt.Count; } image_data_uint = new byte[image_uint_len]; if (image_uint_len > 0) { imageDataInt.CopyTo(image_data_uint); } if (imageDataFloat == null) { image_float_len = 0; } else { image_float_len = imageDataFloat.Count; } image_data_float = new float[image_float_len]; if (image_float_len > 0) { imageDataFloat.CopyTo(image_data_float); } this.camera_position = camera_position; this.camera_orientation = camera_orientation; this.pixels_as_float = pixels_as_float; this.compress = compress; this.width = width; this.height = height; this.image_type = image_type; }
public void SetOrientation(AirSimQuaternion orientation) { DataManager.SetToUnity(orientation, ref poseFromAirLib); isPoseOverride = true; }
public void DefaultInitialization() { Rotation = new AirSimQuaternion(0, 0, 0, 1); Position = new AirSimVector(0, 0, 0); Scale3D = new AirSimVector(1, 1, 1); }
public UnityTransform(AirSimQuaternion rotation, AirSimVector position, AirSimVector scale3d) { Rotation = rotation; Position = position; Scale3D = scale3d; }
public GeoPose(AirSimQuaternion orientation, GeoPoint position) { this.orientation = orientation; this.position = position; }
public AirSimPose(AirSimVector position, AirSimQuaternion orientation) { this.position = position; this.orientation = orientation; }
public static void SetToAirSim(Quaternion src, ref AirSimQuaternion dst) { dst.Set(src.z, -src.x, -src.y, src.w); }
public static void SetToUnity(AirSimQuaternion src, ref Quaternion dst) { dst.Set(-src.y, src.z, -src.x, src.w); }
private static bool SetCameraOrientation(string cameraName, AirSimQuaternion orientation, string vehicleName) { var vehicle = Vehicles.Find(element => element.vehicleName == vehicleName); return(vehicle.VehicleInterface.SetCameraOrientation(cameraName, orientation)); }