1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
15 /// An angle in radians.
17 public class Radian : global::System.IDisposable
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 protected bool swigCMemOwn;
22 internal Radian(global::System.IntPtr cPtr, bool cMemoryOwn)
24 swigCMemOwn = cMemoryOwn;
25 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Radian obj)
30 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35 DisposeQueue.Instance.Add(this);
38 public virtual void Dispose()
40 if (!Stage.IsInstalled())
42 DisposeQueue.Instance.Add(this);
48 if (swigCPtr.Handle != global::System.IntPtr.Zero)
53 NDalicPINVOKE.delete_Radian(swigCPtr);
55 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57 global::System.GC.SuppressFinalize(this);
63 /// Default constructor, initializes to 0.
65 public Radian() : this(NDalicPINVOKE.new_Radian__SWIG_0(), true)
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 /// Creates an angle in radians.
73 /// <param name="value">The initial value in radians</param>
74 public Radian(float value) : this(NDalicPINVOKE.new_Radian__SWIG_1(value), true)
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// Creates an angle in radians from an angle in degrees.
82 /// <param name="degree">The initial value in degrees</param>
83 public Radian(Degree degree) : this(NDalicPINVOKE.new_Radian__SWIG_2(Degree.getCPtr(degree)), true)
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 /// Assigns an angle from a float value.
91 /// <param name="value">Float value in radians</param>
92 /// <returns>A reference to this</returns>
93 internal Radian Assign(float value)
95 Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_0(swigCPtr, value), false);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 /// Assigns an angle from a Degree value.
103 /// <param name="degree">The value in degrees</param>
104 /// <returns>A reference to this</returns>
105 internal Radian Assign(Degree degree)
107 Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_1(swigCPtr, Degree.getCPtr(degree)), false);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 /// Conversion to float.
115 /// <returns>The float value of this Radian</returns>
116 public float ConvertToFloat()
118 float ret = NDalicPINVOKE.Radian_ConvertToFloat(swigCPtr);
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 /// The value in radians
130 NDalicPINVOKE.Radian_radian_set(swigCPtr, value);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 float ret = NDalicPINVOKE.Radian_radian_get(swigCPtr);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();