Implement normalized Vector2/3/4 class.
authorFeng Jin <feng16.jin@samsung.com>
Wed, 29 Mar 2017 16:33:47 +0000 (00:33 +0800)
committerFeng Jin <feng16.jin@samsung.com>
Tue, 11 Apr 2017 14:06:40 +0000 (22:06 +0800)
Change-Id: I86b3a50bfd02cf00c246f1f57d80b96c66331127
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
NUISamples/NUISamples/NUISamples.TizenTV/examples/relative-vector.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/ImageView.cs
src/Tizen.NUI/src/public/RelativeVector2.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/RelativeVector3.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/RelativeVector4.cs [new file with mode: 0755]

diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/relative-vector.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/relative-vector.cs
new file mode 100755 (executable)
index 0000000..35d8d87
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2016 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Tizen.NUI;
+//using Tizen.Applications;
+
+//------------------------------------------------------------------------------
+// <manual-generated />
+//
+// This file can only run on Tizen target. You should compile it with DaliApplication.cs, and
+// add tizen c# application related library as reference.
+//------------------------------------------------------------------------------
+namespace RelativeVectorTest
+{
+    class Example : NUIApplication
+    {
+        private Animation _animation;
+        private ImageView _imageView;
+        private Stage _stage;
+        private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
+
+        public Example():base()
+        {
+        }
+
+        public Example(string stylesheet):base(stylesheet)
+        {
+        }
+
+        public Example(string stylesheet, WindowMode windowMode):base(stylesheet, windowMode)
+        {
+        }
+
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+            Initialize();
+        }
+
+        private void Initialize()
+        {
+            // Connect the signal callback for stage touched signal
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
+            _stage = Stage.Instance;
+            _stage.Touch += OnStageTouched;
+
+            _imageView = new ImageView();
+            _imageView.ResourceUrl = resources+"/images/gallery-3.jpg";
+            _imageView.ParentOrigin = ParentOrigin.Center;
+            _imageView.AnchorPoint = AnchorPoint.Center;
+            _imageView.PixelArea = new RelativeVector4(0.0f, 0.0f, 0.0f, 0.0f);
+
+            _stage.GetDefaultLayer().Add(_imageView);
+        }
+
+        // Callback for stage touched signal handling
+        private void OnStageTouched(object sender, Stage.TouchEventArgs e)
+        {
+            // Only animate the _text label when touch down happens
+            if (e.Touch.GetState(0) == PointStateType.Down)
+            {
+                // Create a new _animation
+                if (_animation)
+                {
+                    _animation.Reset();
+                }
+
+                _animation = new Animation(1000); // 1 second of duration
+                 _animation.AnimateTo(_imageView, "PixelArea", new RelativeVector4(0.0f, 0.0f, 1.0f, 1.0f), 0, 1000);
+                _animation.EndAction = Animation.EndActions.Discard;
+                _animation.PlayRange = new RelativeVector2(0.2f, 0.8f);
+
+                // Play the _animation
+                _animation.Play();
+            }
+        }
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+
+        [STAThread]
+        static void _Main(string[] args)
+        {
+            Console.WriteLine("Hello mono world.");
+            Example example = new Example("stylesheet", WindowMode.Transparent);
+            example.Run(args);
+        }
+    }
+}
index 29bfffd..4eadee8 100755 (executable)
@@ -337,7 +337,7 @@ namespace Tizen.NUI
         /// Animation will play between the values specified. Both values(range.x and range.y ) should be between 0-1,
         /// otherwise they will be ignored.If the range provided is not in proper order(minimum, maximum ), it will be reordered.
         /// </summary>
-        public Vector2 PlayRange
+        public RelativeVector2 PlayRange
         {
             set
             {
index 64c5aaa..60259da 100755 (executable)
@@ -247,7 +247,7 @@ namespace Tizen.NUI
         /// ImageView PixelArea, type Vector4 (Animatable property)
         /// Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0].
         /// </summary>
-        public Vector4 PixelArea
+        public RelativeVector4 PixelArea
         {
             get
             {
diff --git a/src/Tizen.NUI/src/public/RelativeVector2.cs b/src/Tizen.NUI/src/public/RelativeVector2.cs
new file mode 100755 (executable)
index 0000000..0bd3e67
--- /dev/null
@@ -0,0 +1,381 @@
+/*
+ * Copyright (c) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ using System;
+
+namespace Tizen.NUI
+{
+
+    /// <summary>
+    /// RelativeVector2 is a two dimensional vector.
+    /// Both values(x and y) should be between [0, 1].
+    /// </summary>
+    public class RelativeVector2 : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal RelativeVector2(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelativeVector2 obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        ~RelativeVector2()
+        {
+            DisposeQueue.Instance.Add(this);
+        }
+
+        public virtual void Dispose()
+        {
+            if (!Stage.IsInstalled())
+            {
+                DisposeQueue.Instance.Add(this);
+                return;
+            }
+
+            lock (this)
+            {
+                if (swigCPtr.Handle != global::System.IntPtr.Zero)
+                {
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicPINVOKE.delete_Vector2(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                }
+                global::System.GC.SuppressFinalize(this);
+            }
+        }
+
+
+        /// <summary>
+        /// Addition operator.
+        /// </summary>
+        /// <param name="arg1">Vector to add</param>
+        /// <param name="arg2">Vector to add</param>
+        /// <returns>A vector containing the result of the addition</returns>
+        public static RelativeVector2 operator +(RelativeVector2 arg1, RelativeVector2 arg2)
+        {
+            RelativeVector2 result = arg1.Add(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Subtraction operator.
+        /// </summary>
+        /// <param name="arg1">Vector to subtract</param>
+        /// <param name="arg2">Vector to subtract</param>
+        /// <returns>A vector containing the result of the subtraction</returns>
+        public static RelativeVector2 operator -(RelativeVector2 arg1, RelativeVector2 arg2)
+        {
+            RelativeVector2 result = arg1.Subtract(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The vector to multiply</param>
+        /// <returns>A vector containing the result of the multiplication</returns>
+        public static RelativeVector2 operator *(RelativeVector2 arg1, RelativeVector2 arg2)
+        {
+            RelativeVector2 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The float value to scale the vector</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector2 operator *(RelativeVector2 arg1, float arg2)
+        {
+            RelativeVector2 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The vector to divide</param>
+        /// <returns>A vector containing the result of the division</returns>
+        public static RelativeVector2 operator /(RelativeVector2 arg1, RelativeVector2 arg2)
+        {
+            RelativeVector2 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The float value to scale the vector by</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector2 operator /(RelativeVector2 arg1, float arg2)
+        {
+            RelativeVector2 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+
+        /// <summary>
+        /// Const array subscript operator overload. Should be 0, 1.
+        /// </summary>
+        /// <param name="index">Subscript index</param>
+        /// <returns>The float at the given index</returns>
+        public float this[uint index]
+        {
+            get
+            {
+                return ValueOfIndex(index);
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        internal static RelativeVector2 GetRelativeVector2FromPtr(global::System.IntPtr cPtr)
+        {
+            RelativeVector2 ret = new RelativeVector2(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        public RelativeVector2() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="x">x component</param>
+        /// <param name="y">y component</param>
+        public RelativeVector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true)
+        {
+            ValueCheck(x);
+            ValueCheck(y);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector3">RelativeVector3 to create this vector from</param>
+        public RelativeVector2(RelativeVector3 relativeVector3) : this(NDalicPINVOKE.new_Vector2__SWIG_3(RelativeVector3.getCPtr(relativeVector3)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector4">RelativeVector4 to create this vector from</param>
+        public RelativeVector2(RelativeVector4 relativeVector4) : this(NDalicPINVOKE.new_Vector2__SWIG_4(RelativeVector4.getCPtr(relativeVector4)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
+        private RelativeVector2 Add(RelativeVector2 rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Add(swigCPtr, RelativeVector2.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector2 Subtract(RelativeVector2 rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, RelativeVector2.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector2 Multiply(RelativeVector2 rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, RelativeVector2.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector2 Multiply(float rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector2 Divide(RelativeVector2 rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, RelativeVector2.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector2 Divide(float rhs)
+        {
+            RelativeVector2 ret = new RelativeVector2(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private float ValueOfIndex(uint index)
+        {
+            float ret = NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
+        public bool EqualTo(RelativeVector2 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, RelativeVector2.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is not equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
+        public bool NotEqualTo(RelativeVector2 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, RelativeVector2.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// x component
+        /// </summary>
+        public float X
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector2_X_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// y component
+        /// </summary>
+        public float Y
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector2_Y_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator Vector2(RelativeVector2 relativeVector2)
+        {
+            return new Vector2(relativeVector2.X, relativeVector2.Y);
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator RelativeVector2(Vector2 vec)
+        {
+            ValueCheck(vec.X);
+            ValueCheck(vec.Y);
+            return new RelativeVector2(vec.X, vec.Y);
+        }
+
+        internal static void ValueCheck(RelativeVector2 relativeVector2)
+        {
+            if(relativeVector2.X < 0.0f)
+            {
+                relativeVector2.X = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector2.X > 1.0f)
+            {
+                relativeVector2.X = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector2.Y < 0.0f)
+            {
+                relativeVector2.Y = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector2.Y > 1.0f)
+            {
+                relativeVector2.Y = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+        }
+
+        internal static void ValueCheck(float value)
+        {
+            if(value < 0.0f)
+            {
+                value = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+            else if(value > 1.0f)
+            {
+                value = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+        }
+    }
+
+}
+
+
diff --git a/src/Tizen.NUI/src/public/RelativeVector3.cs b/src/Tizen.NUI/src/public/RelativeVector3.cs
new file mode 100755 (executable)
index 0000000..7116b85
--- /dev/null
@@ -0,0 +1,413 @@
+/*
+ * Copyright (c) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+namespace Tizen.NUI
+{
+
+    /// <summary>
+    /// RelativeVector3 is a three dimensional vector.
+    /// All values(x, y, z and w) should be between [0, 1].
+    /// </summary>
+    public class RelativeVector3 : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal RelativeVector3(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelativeVector3 obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        ~RelativeVector3()
+        {
+            DisposeQueue.Instance.Add(this);
+        }
+
+        public virtual void Dispose()
+        {
+            if (!Stage.IsInstalled())
+            {
+                DisposeQueue.Instance.Add(this);
+                return;
+            }
+
+            lock (this)
+            {
+                if (swigCPtr.Handle != global::System.IntPtr.Zero)
+                {
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicPINVOKE.delete_Vector3(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                }
+                global::System.GC.SuppressFinalize(this);
+            }
+        }
+
+
+        /// <summary>
+        /// Addition operator.
+        /// </summary>
+        /// <param name="arg1">Vector to add</param>
+        /// <param name="arg2">Vector to add</param>
+        /// <returns>A vector containing the result of the addition</returns>
+        public static RelativeVector3 operator +(RelativeVector3 arg1, RelativeVector3 arg2)
+        {
+            RelativeVector3 result = arg1.Add(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Subtraction operator.
+        /// </summary>
+        /// <param name="arg1">Vector to subtract</param>
+        /// <param name="arg2">Vector to subtract</param>
+        /// <returns>A vector containing the result of the subtraction</returns>
+        public static RelativeVector3 operator -(RelativeVector3 arg1, RelativeVector3 arg2)
+        {
+            RelativeVector3 result = arg1.Subtract(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The vector to multiply</param>
+        /// <returns>A vector containing the result of the multiplication</returns>
+        public static RelativeVector3 operator *(RelativeVector3 arg1, RelativeVector3 arg2)
+        {
+            RelativeVector3 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The float value to scale the vector</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector3 operator *(RelativeVector3 arg1, float arg2)
+        {
+            RelativeVector3 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The vector to divide</param>
+        /// <returns>A vector containing the result of the division</returns>
+        public static RelativeVector3 operator /(RelativeVector3 arg1, RelativeVector3 arg2)
+        {
+            RelativeVector3 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The float value to scale the vector by</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector3 operator /(RelativeVector3 arg1, float arg2)
+        {
+            RelativeVector3 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+
+        /// <summary>
+        /// Const array subscript operator overload. Should be 0, 1 or 2.
+        /// </summary>
+        /// <param name="index">Subscript index</param>
+        /// <returns>The float at the given index</returns>
+        public float this[uint index]
+        {
+            get
+            {
+                return ValueOfIndex(index);
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        internal static RelativeVector3 GetRelativeVector3FromPtr(global::System.IntPtr cPtr)
+        {
+            RelativeVector3 ret = new RelativeVector3(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        public RelativeVector3() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="x">x component</param>
+        /// <param name="y">y component</param>
+        /// <param name="z">z component</param>
+        public RelativeVector3(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true)
+        {
+            ValueCheck(x);
+            ValueCheck(y);
+            ValueCheck(z);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector2">RelativeVector2 to create this vector from</param>
+        public RelativeVector3(RelativeVector2 relativeVector2) : this(NDalicPINVOKE.new_Vector3__SWIG_3(RelativeVector2.getCPtr(relativeVector2)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector4">RelativeVector4 to create this vector from</param>
+        public RelativeVector3(RelativeVector4 relativeVector4) : this(NDalicPINVOKE.new_Vector3__SWIG_4(RelativeVector4.getCPtr(relativeVector4)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
+        private RelativeVector3 Add(RelativeVector3 rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Add(swigCPtr, RelativeVector3.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector3 Subtract(RelativeVector3 rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, RelativeVector3.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector3 Multiply(RelativeVector3 rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, RelativeVector3.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector3 Multiply(float rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector3 Divide(RelativeVector3 rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, RelativeVector3.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector3 Divide(float rhs)
+        {
+            RelativeVector3 ret = new RelativeVector3(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private float ValueOfIndex(uint index)
+        {
+            float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
+        public bool EqualTo(RelativeVector3 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, RelativeVector3.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is not equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
+        public bool NotEqualTo(RelativeVector3 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, RelativeVector3.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// x component
+        /// </summary>
+        public float X
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector3_X_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector3_X_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// y component
+        /// </summary>
+        public float Y
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector3_Y_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector3_Y_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// z component
+        /// </summary>
+        public float Z
+        {
+            set
+            {
+                 ValueCheck(value);
+                NDalicPINVOKE.Vector3_Z_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector3_Z_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator Vector3(RelativeVector3 relativeVector3)
+        {
+            return new Vector3(relativeVector3.X, relativeVector3.Y, relativeVector3.Z);
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator RelativeVector3(Vector3 vec)
+        {
+            ValueCheck(vec.X);
+            ValueCheck(vec.Y);
+            ValueCheck(vec.Z);
+            return new RelativeVector3(vec.X, vec.Y, vec.Z);
+        }
+
+        internal static void ValueCheck(RelativeVector3 relativeVector3)
+        {
+            if(relativeVector3.X < 0.0f)
+            {
+                relativeVector3.X = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector3.X > 1.0f)
+            {
+                relativeVector3.X = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector3.Y < 0.0f)
+            {
+                relativeVector3.Y = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector3.Y > 1.0f)
+            {
+                relativeVector3.Y = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector3.Z < 0.0f)
+            {
+                relativeVector3.Z = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector3.Z > 1.0f)
+            {
+                relativeVector3.Z = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+        }
+
+        internal static void ValueCheck(float value)
+        {
+            if(value < 0.0f)
+            {
+                value = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+            else if(value > 1.0f)
+            {
+                value = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+        }
+    }
+
+}
+
+
diff --git a/src/Tizen.NUI/src/public/RelativeVector4.cs b/src/Tizen.NUI/src/public/RelativeVector4.cs
new file mode 100755 (executable)
index 0000000..82038bf
--- /dev/null
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+ using System;
+
+namespace Tizen.NUI
+{
+
+    /// <summary>
+    /// RelativeVector4 is a four dimensional vector.
+    /// All values(x, y, and z) should be between [0, 1].
+    /// </summary>
+    public class RelativeVector4 : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        internal RelativeVector4(global::System.IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelativeVector4 obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        ~RelativeVector4()
+        {
+            DisposeQueue.Instance.Add(this);
+        }
+
+        public virtual void Dispose()
+        {
+            if (!Stage.IsInstalled())
+            {
+                DisposeQueue.Instance.Add(this);
+                return;
+            }
+
+            lock (this)
+            {
+                if (swigCPtr.Handle != global::System.IntPtr.Zero)
+                {
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicPINVOKE.delete_Vector4(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                }
+                global::System.GC.SuppressFinalize(this);
+            }
+        }
+
+
+        /// <summary>
+        /// Addition operator.
+        /// </summary>
+        /// <param name="arg1">Vector to add</param>
+        /// <param name="arg2">Vector to add</param>
+        /// <returns>A vector containing the result of the addition</returns>
+        public static RelativeVector4 operator +(RelativeVector4 arg1, RelativeVector4 arg2)
+        {
+            RelativeVector4 result = arg1.Add(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Subtraction operator.
+        /// </summary>
+        /// <param name="arg1">Vector to subtract</param>
+        /// <param name="arg2">Vector to subtract</param>
+        /// <returns>A vector containing the result of the subtraction</returns>
+        public static RelativeVector4 operator -(RelativeVector4 arg1, RelativeVector4 arg2)
+        {
+            RelativeVector4 result = arg1.Subtract(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The vector to multiply</param>
+        /// <returns>A vector containing the result of the multiplication</returns>
+        public static RelativeVector4 operator *(RelativeVector4 arg1, RelativeVector4 arg2)
+        {
+            RelativeVector4 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">The vector to multiply</param>
+        /// <param name="arg2">The float value to scale the vector</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector4 operator *(RelativeVector4 arg1, float arg2)
+        {
+            RelativeVector4 result = arg1.Multiply(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The vector to divide</param>
+        /// <returns>A vector containing the result of the division</returns>
+        public static RelativeVector4 operator /(RelativeVector4 arg1, RelativeVector4 arg2)
+        {
+            RelativeVector4 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">The vector to divide</param>
+        /// <param name="arg2">The float value to scale the vector by</param>
+        /// <returns>A vector containing the result of the scaling</returns>
+        public static RelativeVector4 operator /(RelativeVector4 arg1, float arg2)
+        {
+            RelativeVector4 result = arg1.Divide(arg2);
+            ValueCheck(result);
+            return result;
+        }
+
+
+        /// <summary>
+        /// Const array subscript operator overload. Should be 0, 1 3 or 3.
+        /// </summary>
+        /// <param name="index">Subscript index</param>
+        /// <returns>The float at the given index</returns>
+        public float this[uint index]
+        {
+            get
+            {
+                return ValueOfIndex(index);
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        internal static RelativeVector4 GetRelativeVector4FromPtr(global::System.IntPtr cPtr)
+        {
+            RelativeVector4 ret = new RelativeVector4(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        public RelativeVector4() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="x">x component</param>
+        /// <param name="y">y component</param>
+        /// <param name="z">z component</param>
+        /// <param name="w">w component</param>
+        public RelativeVector4(float x, float y, float z, float w) : this(NDalicPINVOKE.new_Vector4__SWIG_1(x, y, z, w), true)
+        {
+            ValueCheck(x);
+            ValueCheck(y);
+            ValueCheck(z);
+            ValueCheck(W);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector2">RelativeVector2 to create this vector from</param>
+        public RelativeVector4(RelativeVector2 relativeVector2) : this(NDalicPINVOKE.new_Vector4__SWIG_3(RelativeVector2.getCPtr(relativeVector2)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="relativeVector3">RelativeVector3 to create this vector from</param>
+        public RelativeVector4(RelativeVector3 relativeVector3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(RelativeVector3.getCPtr(relativeVector3)), true) 
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        private RelativeVector4 Add(RelativeVector4 rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Add(swigCPtr, RelativeVector4.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector4 Subtract(RelativeVector4 rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Subtract__SWIG_0(swigCPtr, RelativeVector4.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector4 Multiply(RelativeVector4 rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Multiply__SWIG_0(swigCPtr, RelativeVector4.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector4 Multiply(float rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector4 Divide(RelativeVector4 rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Divide__SWIG_0(swigCPtr, RelativeVector4.getCPtr(rhs)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private RelativeVector4 Divide(float rhs)
+        {
+            RelativeVector4 ret = new RelativeVector4(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        private float ValueOfIndex(uint index)
+        {
+            float ret = NDalicPINVOKE.Vector4_ValueOfIndex__SWIG_0(swigCPtr, index);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are equal, otherwise false</returns>
+        public bool EqualTo(RelativeVector4 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, RelativeVector4.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Compare if rhs is not equal to
+        /// </summary>
+        /// <param name="rhs">The vector to compare</param>
+        /// <returns>Returns true if the two vectors are not equal, otherwise false</returns>
+        public bool NotEqualTo(RelativeVector4 rhs)
+        {
+            bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, RelativeVector4.getCPtr(rhs));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+        /// <summary>
+        /// x component
+        /// </summary>
+        public float X
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector4_X_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector4_X_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// y component
+        /// </summary>
+        public float Y
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector4_Y_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector4_Y_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// z component
+        /// </summary>
+        public float Z
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector4_Z_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector4_Z_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// w component
+        /// </summary>
+        public float W
+        {
+            set
+            {
+                ValueCheck(value);
+                NDalicPINVOKE.Vector4_W_set(swigCPtr, value);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+            get
+            {
+                float ret = NDalicPINVOKE.Vector4_W_get(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator Vector4(RelativeVector4 relativeVector4)
+        {
+            return new Vector4(relativeVector4.X, relativeVector4.Y, relativeVector4.Z, relativeVector4.W);
+        }
+
+        /// <summary>
+        /// </summary>
+        public static implicit operator RelativeVector4(Vector4 vec)
+        {
+            ValueCheck(vec.X);
+            ValueCheck(vec.Y);
+            ValueCheck(vec.Z);
+            ValueCheck(vec.W);
+            return new RelativeVector4(vec.X, vec.Y, vec.Z, vec.W);
+        }
+
+        internal static void ValueCheck(RelativeVector4 relativeVector4)
+        {
+            if(relativeVector4.X < 0.0f)
+            {
+                relativeVector4.X = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector4.X > 1.0f)
+            {
+                relativeVector4.X = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector4.Y < 0.0f)
+            {
+                relativeVector4.Y = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector4.Y > 1.0f)
+            {
+                relativeVector4.Y = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector4.Z < 0.0f)
+            {
+                relativeVector4.Z = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector4.Z > 1.0f)
+            {
+                relativeVector4.Z = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            if(relativeVector4.W < 0.0f)
+            {
+                relativeVector4.W = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+            else if(relativeVector4.W > 1.0f)
+            {
+                relativeVector4.W = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Result is invalid! Should be between [0, 1].");
+            }
+        }
+
+        internal static void ValueCheck(float value)
+        {
+            if(value < 0.0f)
+            {
+                value = 0.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+            else if(value > 1.0f)
+            {
+                value = 1.0f;
+                Tizen.Log.Fatal("NUI", "The value of Parameters is invalid! Should be between [0, 1].");
+            }
+        }
+
+    }
+
+}
+
+