[global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_IsUsingFramebuffer")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool IsUsingFramebuffer(global::System.Runtime.InteropServices.HandleRef sceneView);
+
+ [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetSkybox")]
+ public static extern void SetSkybox(global::System.Runtime.InteropServices.HandleRef sceneView, string skyboxUrl);
+
+ [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetSkyboxIntensity")]
+ public static extern void SetSkyboxIntensity(global::System.Runtime.InteropServices.HandleRef sceneView, float intensity);
+
+ [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_GetSkyboxIntensity")]
+ public static extern float GetSkyboxIntensity(global::System.Runtime.InteropServices.HandleRef sceneView);
+
+ [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetSkyboxOrientation")]
+ public static extern void SetSkyboxOrientation(global::System.Runtime.InteropServices.HandleRef sceneView, global::System.Runtime.InteropServices.HandleRef orientation);
+
+ [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_GetSkyboxOrientation")]
+ public static extern global::System.IntPtr GetSkyboxOrientation(global::System.Runtime.InteropServices.HandleRef sceneView);
}
}
}
{
private bool inCameraTransition = false;
private Animation cameraTransition;
+ private string skyboxUrl;
internal SceneView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
}
+ /// <summary>
+ /// Set/Get SkyboxUrl.
+ /// If SkyboxUrl is set, the cube map image is loaded and skybox is attached on scene.
+ /// Skybox texture is asynchronously loaded. When loading is finished, ResourcesLoaded is emitted.
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string SkyboxUrl
+ {
+ set
+ {
+ SetSkybox(value);
+ }
+ get
+ {
+ return skyboxUrl;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get Skybox intensity.
+ /// The skybox intensity is multiplied to the color of skybox texture.
+ /// Default value is 1.0f.
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float SkyboxIntensity
+ {
+ set
+ {
+ SetSkyboxIntensity(value);
+ }
+ get
+ {
+ return GetSkyboxIntensity();
+ }
+ }
+
+ /// <summary>
+ /// Set/Get angle of orientation of the skybox.
+ /// If orientation is set, the skybox will be rotate by the Radian orientation along YAxis.
+ /// Default value is 0.0f.
+ /// </summary>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Rotation SkyboxOrientation
+ {
+ set
+ {
+ SetSkyboxOrientation(value);
+ }
+ get
+ {
+ return GetSkyboxOrientation();
+ }
+ }
+
/// <summary>
/// Adds a Camera to the SceneView at the end of the camera list of SceneView.
/// The Camera can be used as a selected camera to render the scene by using <see cref="SelectCamera(uint)"/> or <see cref="SelectCamera(string)"/>
SelectCamera(index);
Camera destination = GetSelectedCamera();
CameraTransition(source, destination, durationMilliSeconds, alphaFunction);
+ source.Dispose();
+ destination.Dispose();
}
/// <summary>
SelectCamera(name);
Camera destination = GetSelectedCamera();
CameraTransition(source, destination, durationMilliSeconds, alphaFunction);
+ source.Dispose();
+ destination.Dispose();
}
/// <summary>
return scaleFactor;
}
+ /// <summary>
+ /// Set the Skybox from cube map image.
+ /// Skybox texture is asynchronously loaded. When loading is finished, ResourcesLoaded is emitted.
+ /// </summary>
+ /// <param name="skyboxUrl">Cube map image url for skybox.</param>
+ private void SetSkybox(string skyboxUrl)
+ {
+ this.skyboxUrl = skyboxUrl;
+ Interop.SceneView.SetSkybox(SwigCPtr, skyboxUrl);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets Skybox intensity.
+ /// The skybox intensity is multiplied to the color of skybox texture.
+ /// Default value is 1.0f.
+ /// </summary>
+ /// <param name="intensity">Intensity value to be multiplied to the cube map color.</param>
+ private void SetSkyboxIntensity(float intensity)
+ {
+ Interop.SceneView.SetSkyboxIntensity(SwigCPtr, intensity);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets Skybox intensity.
+ /// Default value is 1.0f.
+ /// </summary>
+ /// <returns>skybox intensity.</returns>
+ private float GetSkyboxIntensity()
+ {
+ float intensity = Interop.SceneView.GetSkyboxIntensity(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return intensity;
+ }
+
+ /// <summary>
+ /// Sets orientation of the skybox.
+ /// </summary>
+ /// <param name="orientation">Rotation angle of the skybox along YAxis.</param>
+ private void SetSkyboxOrientation(Rotation orientation)
+ {
+ Interop.SceneView.SetSkyboxOrientation(SwigCPtr, Rotation.getCPtr(orientation));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets Skybox orientation.
+ /// </summary>
+ /// <returns>skybox orientation.</returns>
+ private Rotation GetSkyboxOrientation()
+ {
+ global::System.IntPtr cPtr = Interop.SceneView.GetSkyboxOrientation(SwigCPtr);
+ Rotation ret = (cPtr == global::System.IntPtr.Zero) ? null : new Rotation(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
private void CameraTransition(Camera sourceCamera, Camera destinationCamera, int durationMilliSeconds, AlphaFunction alphaFunction)
{
inCameraTransition = true;
inCameraTransition = false;
};
cameraTransition.Play();
+
+ sourceFieldOfView.Dispose();
+ positionKeyFrames.Dispose();
+ orientationKeyFrames.Dispose();
+ orientationKeyFrames.Dispose();
}
/// <summary>