{
global::System.IntPtr cPtr = Interop.Model.GetAnimation(SwigCPtr, index);
Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
- if(ret == null)
+ if (ret == null)
{
// Register new animation into Registry.
ret = new Animation(cPtr, true);
{
global::System.IntPtr cPtr = Interop.Model.GetAnimation(SwigCPtr, name);
Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
- if(ret == null)
+ if (ret == null)
{
// Register new animation into Registry.
ret = new Animation(cPtr, true);
/// <remarks>
/// This method should be called after Model load has been finished.
/// </remarks>
+ /// <param name="index">Index of camera to be generated.</param>
/// <returns>Generated Camera by the index, or empty Handle if generation failed.</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-
+
/// <summary>
/// Apply camera parameters at the index to inputed Camera.
/// If camera parameter is valid and camera is not empty, apply parameters.
/// <remarks>
/// This method should be called after Model load has been finished.
/// </remarks>
+ /// <param name="index">Index of camera to be retrieved.</param>
+ /// <param name="camera">Camera to be applied parameter.</param>
/// <returns>True if Apply successed. False otherwise.</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ApplyCamera(uint index, Camera camera)
{
bool ret = false;
- if(camera?.HasBody() == true)
+ if (camera?.HasBody() == true)
{
ret = Interop.Model.ApplyCamera(SwigCPtr, index, Camera.getCPtr(camera));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// Model's scale may not matched with bvh animation scale.
/// If scale is null, default use as Vector3.ONE
/// </summary>
+ /// <param name="bvhFilename">Name of bvh format file.</param>
+ /// <param name="scale">Scale value of bvh animation match with model.</param>
/// <returns>Animaion of bvh</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
{
global::System.IntPtr cPtr = Interop.Model.LoadBvhAnimation(SwigCPtr, bvhFilename, Vector3.getCPtr(scale));
Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
- if(ret == null)
+ if (ret == null)
+ {
+ // Register new animation into Registry.
+ ret = new Animation(cPtr, true);
+ }
+ else
+ {
+ // We found matched NUI animation. Reduce cPtr reference count.
+ HandleRef handle = new HandleRef(this, cPtr);
+ Tizen.NUI.Interop.Animation.DeleteAnimation(handle);
+ handle = new HandleRef(null, IntPtr.Zero);
+ }
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Load facial animation and assign to model.
+ /// </summary>
+ /// <param name="facialFilename">Name of json format file what we predefined.</param>
+ /// <returns>Animaion of facial</returns>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Animation LoadFacialAnimation(string facialFilename)
+ {
+ global::System.IntPtr cPtr = Interop.Model.LoadFacialAnimation(SwigCPtr, facialFilename);
+ Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
+ if (ret == null)
{
// Register new animation into Registry.
ret = new Animation(cPtr, true);
{
global::System.IntPtr cPtr = Interop.Model.GetModelRoot(SwigCPtr);
Animatable ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animatable;
- if(ret == null)
+ if (ret == null)
{
// Register new animatable into Registry.
ret = new Animatable(cPtr, true);
/// <since_tizen> 10 </since_tizen>
public void AddCamera(Camera camera)
{
- if(camera != null)
+ if (camera != null)
{
Interop.SceneView.AddCamera(SwigCPtr, camera.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 10 </since_tizen>
public void RemoveCamera(Camera camera)
{
- if(camera != null)
+ if (camera != null)
{
Interop.SceneView.RemoveCamera(SwigCPtr, camera.SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
{
global::System.IntPtr cPtr = Interop.SceneView.GetCamera(SwigCPtr, index);
Camera camera = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Camera;
- if(camera == null)
+ if (camera == null)
{
// Register new camera into Registry.
camera = new Camera(cPtr, true);
{
global::System.IntPtr cPtr = Interop.SceneView.GetCamera(SwigCPtr, name);
Camera camera = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Camera;
- if(camera == null)
+ if (camera == null)
{
// Register new camera into Registry.
camera = new Camera(cPtr, true);
/// <since_tizen> 10 </since_tizen>
public void SelectCamera(uint index)
{
- if(inCameraTransition)
+ if (inCameraTransition)
{
return;
}
/// <since_tizen> 10 </since_tizen>
public void SelectCamera(string name)
{
- if(inCameraTransition)
+ if (inCameraTransition)
{
return;
}
[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))
+ if (inCameraTransition || GetSelectedCamera() == GetCamera(index))
{
return;
}
[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))
+ if (inCameraTransition || GetSelectedCamera() == GetCamera(name))
{
return;
}
{
global::System.IntPtr cPtr = Interop.SceneView.GetSelectedCamera(SwigCPtr);
Camera camera = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Camera;
- if(camera == null)
+ if (camera == null)
{
// Register new camera into Registry.
camera = new Camera(cPtr, true);
cameraTransition.AnimateBetween(destinationCamera, "Position", positionKeyFrames, Animation.Interpolation.Linear, alphaFunction);
cameraTransition.AnimateBetween(destinationCamera, "Orientation", orientationKeyFrames, Animation.Interpolation.Linear, alphaFunction);
- if(destinationCamera.ProjectionMode == Camera.ProjectionModeType.Perspective)
+ if (destinationCamera.ProjectionMode == Camera.ProjectionModeType.Perspective)
{
Radian sourceFieldOfView = sourceCamera.FieldOfView;
Radian destinationFieldOfView = destinationCamera.FieldOfView;