From: Eunki Hong Date: Mon, 10 Apr 2023 16:48:28 +0000 (+0900) Subject: Bind EulerAngle setter/getter for Quaternion X-Git-Tag: dali_2.2.22~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78b198079fa99dcef132b7e3efd19b68cb8eaca8;p=platform%2Fcore%2Fuifw%2Fdali-csharp-binder.git Bind EulerAngle setter/getter for Quaternion Let we can use Rotation class by pitch/yaw/roll values in NUI side. Change-Id: Ie034aa11045cbbb116f5f7aef3f0ddd424fdb6ef Signed-off-by: Eunki Hong --- diff --git a/dali-csharp-binder/src/rotation-wrap.cpp b/dali-csharp-binder/src/rotation-wrap.cpp index da33067..f20b39f 100644 --- a/dali-csharp-binder/src/rotation-wrap.cpp +++ b/dali-csharp-binder/src/rotation-wrap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,844 +22,944 @@ #include "common.h" #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_Rotation_0() - { - void *jresult; - Dali::Quaternion *result = 0; +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Rotation_0() +{ + void* jresult; + Dali::Quaternion* result = 0; + { + try { - try - { - result = (Dali::Quaternion *)new Dali::Quaternion(); - } - CALL_CATCH_EXCEPTION(0); + result = (Dali::Quaternion*)new Dali::Quaternion(); } - - jresult = (void *)result; - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_Rotation_1(void *nuiRadianAngle, void *nuiVector3) - { - void *jresult; - Dali::Radian *radian = (Dali::Radian *)nuiRadianAngle; - Dali::Vector3 *vector = (Dali::Vector3 *)nuiVector3; - Dali::Quaternion *result = 0; + jresult = (void*)result; + return jresult; +} - if (!radian) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Radian", 0); - return 0; - } - if (!vector) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); - return 0; - } - { - try - { - result = (Dali::Quaternion *)new Dali::Quaternion(*radian, (Dali::Vector3 const &)*vector); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Rotation_1(void* nuiRadianAngle, void* nuiVector3) +{ + void* jresult; + Dali::Radian* radian = (Dali::Radian*)nuiRadianAngle; + Dali::Vector3* vector = (Dali::Vector3*)nuiVector3; + Dali::Quaternion* result = 0; - jresult = (void *)result; - return jresult; + if(!radian) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Radian", 0); + return 0; } - - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_Rotation_2(void *nuiV0, void *nuiV1) + if(!vector) { - void *jresult; - Dali::Vector3 *v0 = (Dali::Vector3 *)nuiV0; - Dali::Vector3 *v1 = (Dali::Vector3 *)nuiV1; - Dali::Quaternion *result = 0; - - if (!v0) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); - return 0; - } - if (!v1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); - return 0; - } + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); + return 0; + } + { + try { - try - { - result = (Dali::Quaternion *)new Dali::Quaternion((Dali::Vector3 const &)*v0, (Dali::Vector3 const &)*v1); - } - CALL_CATCH_EXCEPTION(0); + result = (Dali::Quaternion*)new Dali::Quaternion(*radian, (Dali::Vector3 const&)*vector); } - - jresult = (void *)result; - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_Rotation(void *nuiRotation) - { - Dali::Quaternion *quaternion = (Dali::Quaternion *)0; + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Rotation_2(void* nuiV0, void* nuiV1) +{ + void* jresult; + Dali::Vector3* v0 = (Dali::Vector3*)nuiV0; + Dali::Vector3* v1 = (Dali::Vector3*)nuiV1; + Dali::Quaternion* result = 0; - quaternion = (Dali::Quaternion *)nuiRotation; + if(!v0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); + return 0; + } + if(!v1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); + return 0; + } + { + try { - try - { - delete quaternion; - } - CALL_CATCH_EXCEPTION(); + result = (Dali::Quaternion*)new Dali::Quaternion((Dali::Vector3 const&)*v0, (Dali::Vector3 const&)*v1); } + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_IDENTITY_get() - { - void *jresult; - Dali::Quaternion *result = 0; + jresult = (void*)result; + return jresult; +} - result = (Dali::Quaternion *)&Dali::Quaternion::IDENTITY; - jresult = (void *)result; - return jresult; - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Rotation_3(void* nuiPitchRadian, void* nuiYawRadian, void* nuiRollRadian) +{ + void* jresult; + Dali::Radian* pitch = (Dali::Radian*)nuiPitchRadian; + Dali::Radian* yaw = (Dali::Radian*)nuiYawRadian; + Dali::Radian* roll = (Dali::Radian*)nuiRollRadian; + Dali::Quaternion* result = 0; - SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_IsIdentity(void *nuiRotation) + if(!pitch) { - bool result; - Dali::Quaternion *quaternion = (Dali::Quaternion *)0; - - quaternion = (Dali::Quaternion *)nuiRotation; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type pitch is null", 0); + return 0; + } + if(!yaw) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type yaw is null", 0); + return 0; + } + if(!roll) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type roll is null", 0); + return 0; + } + { + try { - try - { - result = (bool)((Dali::Quaternion const *)quaternion)->IsIdentity(); - } - CALL_CATCH_EXCEPTION(0); + result = (Dali::Quaternion*)new Dali::Quaternion((Dali::Radian const&)*pitch, (Dali::Radian const&)*yaw, (Dali::Radian const&)*roll); } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_GetAxisAngle(void *nuiRotation, void *nuiAxis, void *nuiRadianAngle) - { - bool result; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Vector3 *axis = (Dali::Vector3 *)nuiAxis; - Dali::Radian *radian = (Dali::Radian *)nuiRadianAngle; + jresult = (void*)result; + return jresult; +} - if (!axis) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 & type is null", 0); - return 0; - } - if (!radian) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian & type is null", 0); - return 0; - } +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_Rotation(void* nuiRotation) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)0; + + quaternion = (Dali::Quaternion*)nuiRotation; + { + try { - try - { - result = (bool)((Dali::Quaternion const *)quaternion)->ToAxisAngle(*axis, *radian); - } - CALL_CATCH_EXCEPTION(0); + delete quaternion; } - - return result; + CALL_CATCH_EXCEPTION(); } +} - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Add(void *nuiRotation0, void *nuiRotation1) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_IDENTITY_get() +{ + void* jresult; + Dali::Quaternion* result = 0; - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = ((Dali::Quaternion const *)quaternion0)->operator+((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } + result = (Dali::Quaternion*)&Dali::Quaternion::IDENTITY; + jresult = (void*)result; + return jresult; +} - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; - } +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_IsIdentity(void* nuiRotation) +{ + bool result; + Dali::Quaternion* quaternion = (Dali::Quaternion*)0; - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Subtract_0(void *nuiRotation0, void *nuiRotation1) + quaternion = (Dali::Quaternion*)nuiRotation; { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; - - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } + try { - try - { - result = ((Dali::Quaternion const *)quaternion0)->operator-((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); + result = (bool)((Dali::Quaternion const*)quaternion)->IsIdentity(); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Multiply_0(void *nuiRotation0, void *nuiRotation1) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; + return result; +} - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = ((Dali::Quaternion const *)quaternion0)->operator*((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_GetAxisAngle(void* nuiRotation, void* nuiAxis, void* nuiRadianAngle) +{ + bool result; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Vector3* axis = (Dali::Vector3*)nuiAxis; + Dali::Radian* radian = (Dali::Radian*)nuiRadianAngle; - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + if(!axis) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 & type is null", 0); + return 0; } - - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Multiply_1(void *nuiRotation, void *nuiVector3) + if(!radian) { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Vector3 *vector = (Dali::Vector3 *)nuiVector3; - Dali::Vector3 result; - - if (!vector) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); - return 0; - } + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian & type is null", 0); + return 0; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->operator*((Dali::Vector3 const &)*vector); - } - CALL_CATCH_EXCEPTION(0); + result = (bool)((Dali::Quaternion const*)quaternion)->ToAxisAngle(*axis, *radian); } - - jresult = new Dali::Vector3((const Dali::Vector3 &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Divide_0(void *nuiRotation0, void *nuiRotation1) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; + return result; +} - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = ((Dali::Quaternion const *)quaternion0)->operator/((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_SetEulerAngle(void* nuiRotation, void* nuiPitchRadian, void* nuiYawRadian, void* nuiRollRadian) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Radian* pitch = (Dali::Radian*)nuiPitchRadian; + Dali::Radian* yaw = (Dali::Radian*)nuiYawRadian; + Dali::Radian* roll = (Dali::Radian*)nuiRollRadian; - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + if(!pitch) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type pitch is null", 0); + return; } - - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Multiply_2(void *nuiRotation, float scale) + if(!yaw) { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type yaw is null", 0); + return; + } + if(!roll) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type roll is null", 0); + return; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->operator*(scale); - } - CALL_CATCH_EXCEPTION(0); + ((Dali::Quaternion*)quaternion)->SetEuler((Dali::Radian const&)*pitch, (Dali::Radian const&)*yaw, (Dali::Radian const&)*roll); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(); } +} - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Divide_1(void *nuiRotation, float scale) +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_GetEulerAngle(void* nuiRotation, void* nuiPitchRadian, void* nuiYawRadian, void* nuiRollRadian) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Radian* pitch = (Dali::Radian*)nuiPitchRadian; + Dali::Radian* yaw = (Dali::Radian*)nuiYawRadian; + Dali::Radian* roll = (Dali::Radian*)nuiRollRadian; + + if(!pitch) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type pitch is null", 0); + return; + } + if(!yaw) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type yaw is null", 0); + return; + } + if(!roll) { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Radian const & type roll is null", 0); + return; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->operator/(scale); - } - CALL_CATCH_EXCEPTION(0); + Dali::Vector4 result = (Dali::Vector4)((Dali::Quaternion const*)quaternion)->EulerAngles(); + // Convert from EulerAngles to pitch / yaw / roll + *pitch = Dali::Radian(result.x); + *yaw = Dali::Radian(result.y); + *roll = Dali::Radian(result.z); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(); } +} - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Subtract_1(void *nuiRotation) - { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Add(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->operator-(); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion0)->operator+((Dali::Quaternion const&)*quaternion1); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_AddAssign(void *nuiRotation0, void *nuiRotation1) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion *result = 0; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = (Dali::Quaternion *)&(quaternion0)->operator+=((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Subtract_0(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; - jresult = (void *)result; - return jresult; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; } - - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_SubtractAssign(void *nuiRotation0, void *nuiRotation1) { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion *result = 0; - - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } + try { - try - { - result = (Dali::Quaternion *)&(quaternion0)->operator-=((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion0)->operator-((Dali::Quaternion const&)*quaternion1); } - - jresult = (void *)result; - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_MultiplyAssign_0(void *nuiRotation0, void *nuiRotation1) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion *result = 0; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = (Dali::Quaternion *)&(quaternion0)->operator*=((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Multiply_0(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; - jresult = (void *)result; - return jresult; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; } - - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_MultiplyAssign_1(void *nuiRotation, float scale) { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion *result; + try { - try - { - result = (Dali::Quaternion *)&(quaternion)->operator*=(scale); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion0)->operator*((Dali::Quaternion const&)*quaternion1); } - - jresult = (void *)result; - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_DivideAssign(void *nuiRotation, float scale) + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Multiply_1(void* nuiRotation, void* nuiVector3) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Vector3* vector = (Dali::Vector3*)nuiVector3; + Dali::Vector3 result; + + if(!vector) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector3 const & type is null", 0); + return 0; + } { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion *result; + try { - try - { - result = (Dali::Quaternion *)&(quaternion)->operator/=(scale); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion)->operator*((Dali::Vector3 const&)*vector); } - - jresult = (void *)result; - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_EqualTo(void *nuiRotation0, void *nuiRotation1) - { - bool result; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; + jresult = new Dali::Vector3((const Dali::Vector3&)result); + return jresult; +} - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - { - try - { - result = (bool)((Dali::Quaternion const *)quaternion0)->operator==((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Divide_0(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; - return result; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; } - - SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_NotEqualTo(void *nuiRotation0, void *nuiRotation1) { - bool result; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - - if (!quaternion1) + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = ((Dali::Quaternion const*)quaternion0)->operator/((Dali::Quaternion const&)*quaternion1); } - { - try - { - result = (bool)((Dali::Quaternion const *)quaternion0)->operator!=((Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); - } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_Length(void *nuiRotation) - { - float result; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Multiply_2(void* nuiRotation, float scale) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; + { + try { - try - { - result = (float)((Dali::Quaternion const *)quaternion)->Length(); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion)->operator*(scale); } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_LengthSquared(void *nuiRotation) - { - float result; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Divide_1(void* nuiRotation, float scale) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; + { + try { - try - { - result = (float)((Dali::Quaternion const *)quaternion)->LengthSquared(); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion)->operator/(scale); } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Normalize(void *nuiRotation) - { - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Subtract_1(void* nuiRotation) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; + { + try { - try - { - (quaternion)->Normalize(); - } - CALL_CATCH_EXCEPTION(); + result = ((Dali::Quaternion const*)quaternion)->operator-(); } + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Normalized(void *nuiRotation) - { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} - { - try - { - result = ((Dali::Quaternion const *)quaternion)->Normalized(); - } - CALL_CATCH_EXCEPTION(0); - } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_AddAssign(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion* result = 0; - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; } - - SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Conjugate(void *nuiRotation) { - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - + try { - try - { - (quaternion)->Conjugate(); - } - CALL_CATCH_EXCEPTION(); + result = (Dali::Quaternion*)&(quaternion0)->operator+=((Dali::Quaternion const&)*quaternion1); } + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Invert(void *nuiRotation) - { - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; + jresult = (void*)result; + return jresult; +} +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_SubtractAssign(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion* result = 0; + + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - (quaternion)->Invert(); - } - CALL_CATCH_EXCEPTION(); + result = (Dali::Quaternion*)&(quaternion0)->operator-=((Dali::Quaternion const&)*quaternion1); } + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Log(void *nuiRotation) - { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_MultiplyAssign_0(void* nuiRotation0, void* nuiRotation1) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion* result = 0; + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->Log(); - } - CALL_CATCH_EXCEPTION(0); + result = (Dali::Quaternion*)&(quaternion0)->operator*=((Dali::Quaternion const&)*quaternion1); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Exp(void *nuiRotation) - { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Quaternion result; + jresult = (void*)result; + return jresult; +} +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_MultiplyAssign_1(void* nuiRotation, float scale) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion* result; + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->Exp(); - } - CALL_CATCH_EXCEPTION(0); + result = (Dali::Quaternion*)&(quaternion)->operator*=(scale); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_Dot(void *nuiRotation0, void *nuiRotation1) - { - float result; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; + jresult = (void*)result; + return jresult; +} - if (!quaternion0) +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_DivideAssign(void* nuiRotation, float scale) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion* result; + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = (Dali::Quaternion*)&(quaternion)->operator/=(scale); } - if (!quaternion1) + CALL_CATCH_EXCEPTION(0); + } + + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_EqualTo(void* nuiRotation0, void* nuiRotation1) +{ + bool result; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = (bool)((Dali::Quaternion const*)quaternion0)->operator==((Dali::Quaternion const&)*quaternion1); } + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Rotation_NotEqualTo(void* nuiRotation0, void* nuiRotation1) +{ + bool result; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = (float)Dali::Quaternion::Dot((Dali::Quaternion const &)*quaternion0, (Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); + result = (bool)((Dali::Quaternion const*)quaternion0)->operator!=((Dali::Quaternion const&)*quaternion1); } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Lerp(void *nuiRotation0, void *nuiRotation1, float progress) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; + return result; +} + +SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_Length(void* nuiRotation) +{ + float result; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; - if (!quaternion0) + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = (float)((Dali::Quaternion const*)quaternion)->Length(); } - if (!quaternion1) + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_LengthSquared(void* nuiRotation) +{ + float result; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = (float)((Dali::Quaternion const*)quaternion)->LengthSquared(); } + CALL_CATCH_EXCEPTION(0); + } + + return result; +} +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Normalize(void* nuiRotation) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + + { + try { - try - { - result = Dali::Quaternion::Lerp((Dali::Quaternion const &)*quaternion0, (Dali::Quaternion const &)*quaternion1, progress); - } - CALL_CATCH_EXCEPTION(0); + (quaternion)->Normalize(); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(); } +} - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Slerp(void *nuiRotation0, void *nuiRotation1, float progress) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Normalized(void* nuiRotation) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; - if (!quaternion0) + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = ((Dali::Quaternion const*)quaternion)->Normalized(); } - if (!quaternion1) + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Conjugate(void* nuiRotation) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + (quaternion)->Conjugate(); } + CALL_CATCH_EXCEPTION(); + } +} +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Rotation_Invert(void* nuiRotation) +{ + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + + { + try { - try - { - result = Dali::Quaternion::Slerp((Dali::Quaternion const &)*quaternion0, (Dali::Quaternion const &)*quaternion1, progress); - } - CALL_CATCH_EXCEPTION(0); + (quaternion)->Invert(); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(); } +} - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_SlerpNoInvert(void *nuiRotation0, void *nuiRotation1, float progress) - { - void *jresult; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; - Dali::Quaternion result; +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Log(void* nuiRotation) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; - if (!quaternion0) + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = ((Dali::Quaternion const*)quaternion)->Log(); } - if (!quaternion1) + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Exp(void* nuiRotation) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Quaternion result; + + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = ((Dali::Quaternion const*)quaternion)->Exp(); } + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} +SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_Dot(void* nuiRotation0, void* nuiRotation1) +{ + float result; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + + if(!quaternion0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = Dali::Quaternion::SlerpNoInvert((Dali::Quaternion const &)*quaternion0, (Dali::Quaternion const &)*quaternion1, progress); - } - CALL_CATCH_EXCEPTION(0); + result = (float)Dali::Quaternion::Dot((Dali::Quaternion const&)*quaternion0, (Dali::Quaternion const&)*quaternion1); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Squad(void *nuiStart, void *nuiEnd, void *nuiControl0, void *nuiControl1, float progress) + return result; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Lerp(void* nuiRotation0, void* nuiRotation1, float progress) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; + + if(!quaternion0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!quaternion1) { - void *jresult; - Dali::Quaternion *start = (Dali::Quaternion *)nuiStart; - Dali::Quaternion *end = (Dali::Quaternion *)nuiEnd; - Dali::Quaternion *control0 = (Dali::Quaternion *)nuiControl0; - Dali::Quaternion *control1 = (Dali::Quaternion *)nuiControl1; - Dali::Quaternion result; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } - if (!start) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - if (!end) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - if (!control0) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - if (!control1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } + { + try { - try - { - result = Dali::Quaternion::Squad((Dali::Quaternion const &)*start, (Dali::Quaternion const &)*end, (Dali::Quaternion const &)*control0, (Dali::Quaternion const &)*control1, progress); - } - CALL_CATCH_EXCEPTION(0); + result = Dali::Quaternion::Lerp((Dali::Quaternion const&)*quaternion0, (Dali::Quaternion const&)*quaternion1, progress); } - - jresult = new Dali::Quaternion((const Dali::Quaternion &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_AngleBetween(void *nuiRotation0, void *nuiRotation1) + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Slerp(void* nuiRotation0, void* nuiRotation1, float progress) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; + + if(!quaternion0) { - float result; - Dali::Quaternion *quaternion0 = (Dali::Quaternion *)nuiRotation0; - Dali::Quaternion *quaternion1 = (Dali::Quaternion *)nuiRotation1; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } - if (!quaternion0) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - if (!quaternion1) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } + { + try { - try - { - result = (float)Dali::Quaternion::AngleBetween((Dali::Quaternion const &)*quaternion0, (Dali::Quaternion const &)*quaternion1); - } - CALL_CATCH_EXCEPTION(0); + result = Dali::Quaternion::Slerp((Dali::Quaternion const&)*quaternion0, (Dali::Quaternion const&)*quaternion1, progress); } - - return result; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Rotate_Vector3(void *nuiRotation, void *nuiVector3) + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_SlerpNoInvert(void* nuiRotation0, void* nuiRotation1, float progress) +{ + void* jresult; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; + Dali::Quaternion result; + + if(!quaternion0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!quaternion1) { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Vector3 *vector3 = (Dali::Vector3 *)nuiVector3; - Dali::Vector3 result; + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } - if (!quaternion) - { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; - } - if (!vector3) + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = Dali::Quaternion::SlerpNoInvert((Dali::Quaternion const&)*quaternion0, (Dali::Quaternion const&)*quaternion1, progress); } + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Squad(void* nuiStart, void* nuiEnd, void* nuiControl0, void* nuiControl1, float progress) +{ + void* jresult; + Dali::Quaternion* start = (Dali::Quaternion*)nuiStart; + Dali::Quaternion* end = (Dali::Quaternion*)nuiEnd; + Dali::Quaternion* control0 = (Dali::Quaternion*)nuiControl0; + Dali::Quaternion* control1 = (Dali::Quaternion*)nuiControl1; + Dali::Quaternion result; + + if(!start) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!end) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!control0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!control1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->Rotate(*vector3); - } - CALL_CATCH_EXCEPTION(0); + result = Dali::Quaternion::Squad((Dali::Quaternion const&)*start, (Dali::Quaternion const&)*end, (Dali::Quaternion const&)*control0, (Dali::Quaternion const&)*control1, progress); } - - jresult = new Dali::Vector3((const Dali::Vector3 &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } - SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Rotation_Rotate_Vector4(void *nuiRotation, void *nuiVector4) - { - void *jresult; - Dali::Quaternion *quaternion = (Dali::Quaternion *)nuiRotation; - Dali::Vector4 *vector4 = (Dali::Vector4 *)nuiVector4; - Dali::Vector4 result; + jresult = new Dali::Quaternion((const Dali::Quaternion&)result); + return jresult; +} + +SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Rotation_AngleBetween(void* nuiRotation0, void* nuiRotation1) +{ + float result; + Dali::Quaternion* quaternion0 = (Dali::Quaternion*)nuiRotation0; + Dali::Quaternion* quaternion1 = (Dali::Quaternion*)nuiRotation1; - if (!quaternion) + if(!quaternion0) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!quaternion1) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = (float)Dali::Quaternion::AngleBetween((Dali::Quaternion const&)*quaternion0, (Dali::Quaternion const&)*quaternion1); } - if (!vector4) + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Rotate_Vector3(void* nuiRotation, void* nuiVector3) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Vector3* vector3 = (Dali::Vector3*)nuiVector3; + Dali::Vector3 result; + + if(!quaternion) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!vector3) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); - return 0; + result = ((Dali::Quaternion const*)quaternion)->Rotate(*vector3); } + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::Vector3((const Dali::Vector3&)result); + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Rotation_Rotate_Vector4(void* nuiRotation, void* nuiVector4) +{ + void* jresult; + Dali::Quaternion* quaternion = (Dali::Quaternion*)nuiRotation; + Dali::Vector4* vector4 = (Dali::Vector4*)nuiVector4; + Dali::Vector4 result; + + if(!quaternion) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + if(!vector4) + { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Quaternion const & type is null", 0); + return 0; + } + { + try { - try - { - result = ((Dali::Quaternion const *)quaternion)->Rotate(*vector4); - } - CALL_CATCH_EXCEPTION(0); + result = ((Dali::Quaternion const*)quaternion)->Rotate(*vector4); } - - jresult = new Dali::Vector4((const Dali::Vector4 &)result); - return jresult; + CALL_CATCH_EXCEPTION(0); } + jresult = new Dali::Vector4((const Dali::Vector4&)result); + return jresult; +} + #ifdef __cplusplus } #endif