/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
- public static Radian ConvertFovFromVerticalToHorizontal(float aspect, Radian verticalFov)
+ public static void ConvertFovFromVerticalToHorizontal(float aspect, ref Radian fov)
{
- if(verticalFov == null)
+ if(fov == null)
{
- return null;
+ return;
}
- return new Radian(2.0f * (float)Math.Atan(Math.Tan(verticalFov.ConvertToFloat() * 0.5f) * aspect));
+ fov.Value = 2.0f * (float)Math.Atan(Math.Tan(fov.ConvertToFloat() * 0.5f) * aspect);
}
/// <summary>
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
- public static Radian ConvertFovFromHorizontalToVertical(float aspect, Radian horizontalFov)
+ public static void ConvertFovFromHorizontalToVertical(float aspect, ref Radian fov)
{
- if(horizontalFov == null)
+ if(fov == null)
{
- return null;
+ return;
}
- return new Radian(2.0f * (float)Math.Atan(Math.Tan(horizontalFov.ConvertToFloat() * 0.5f) / aspect));
+ fov.Value = 2.0f * (float)Math.Atan(Math.Tan(fov.ConvertToFloat() * 0.5f) / aspect);
}
/// <summary>
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
using Tizen.NUI;
using Tizen.NUI.Binding;
using Tizen.NUI.BaseComponents;
/// <param name="durationMilliSeconds">The duration in milliseconds.</param>
/// <param name="alphaFunction">The alpha function to apply.</param>
/// <since_tizen> 10 </since_tizen>
+ [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "The ownership of camera object is not owned by this class.")]
public void CameraTransition(uint index, int durationMilliSeconds, AlphaFunction alphaFunction = null)
{
if(inCameraTransition || GetSelectedCamera() == GetCamera(index))
/// <param name="durationMilliSeconds">The duration in milliseconds.</param>
/// <param name="alphaFunction">The alpha function to apply.</param>
/// <since_tizen> 10 </since_tizen>
+ [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "The ownership of camera object is not owned by this class.")]
public void CameraTransition(string name, int durationMilliSeconds, AlphaFunction alphaFunction = null)
{
if(inCameraTransition || GetSelectedCamera() == GetCamera(name))
float aspect = destinationCamera.AspectRatio;
if (destinationCamera.ProjectionDirection == Camera.ProjectionDirectionType.Vertical)
{
- sourceFieldOfView = Camera.ConvertFovFromHorizontalToVertical(aspect, sourceFieldOfView);
+ Camera.ConvertFovFromHorizontalToVertical(aspect, ref sourceFieldOfView);
}
else
{
- sourceFieldOfView = Camera.ConvertFovFromVerticalToHorizontal(aspect, sourceFieldOfView);
+ Camera.ConvertFovFromVerticalToHorizontal(aspect, ref sourceFieldOfView);
}
}