Remove Actor class and move Actor APIs into View
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Camera.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29     public class Camera : Animatable {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32   internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.CameraActor_SWIGUpcast(cPtr), cMemoryOwn) {
33     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34   }
35
36   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Camera obj) {
37     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38   }
39
40   ~Camera() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public virtual void Dispose() {
45     if (!Stage.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_CameraActor(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59     }
60   }
61
62
63   public class Property : global::System.IDisposable {
64     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
65     protected bool swigCMemOwn;
66   
67     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
68       swigCMemOwn = cMemoryOwn;
69       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
70     }
71   
72     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
73       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
74     }
75   
76     ~Property() {
77       Dispose();
78     }
79   
80     public virtual void Dispose() {
81       lock(this) {
82         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
83           if (swigCMemOwn) {
84             swigCMemOwn = false;
85             NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
86           }
87           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
88         }
89         global::System.GC.SuppressFinalize(this);
90       }
91     }
92   
93     public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true) {
94       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95     }
96   
97     public static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get();
98     public static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get();
99     public static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get();
100     public static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get();
101     public static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get();
102     public static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get();
103     public static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get();
104     public static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get();
105     public static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get();
106     public static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get();
107     public static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get();
108     public static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get();
109     public static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get();
110     public static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get();
111   
112   }
113
114   public Camera () : this (NDalicPINVOKE.CameraActor_New__SWIG_0(), true) {
115       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116
117   }
118   public Camera (Vector2 size) : this (NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true) {
119       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120
121   }
122   public new static Camera DownCast(BaseHandle handle) {
123     Camera ret = new Camera(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
124     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125     return ret;
126   }
127
128   public Camera(Camera copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(Camera.getCPtr(copy)), true) {
129     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
130   }
131
132   public Camera Assign(Camera rhs) {
133     Camera ret = new Camera(NDalicPINVOKE.CameraActor_Assign(swigCPtr, Camera.getCPtr(rhs)), false);
134     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135     return ret;
136   }
137
138   public void SetType(CameraType type) {
139     NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
140     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141   }
142
143   public CameraType GetType() {
144     CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
145     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146     return ret;
147   }
148
149   public void SetProjectionMode(ProjectionMode mode) {
150     NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
151     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152   }
153
154   public ProjectionMode GetProjectionMode() {
155     ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
156     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157     return ret;
158   }
159
160   public void SetFieldOfView(float fieldOfView) {
161     NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
162     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163   }
164
165   public float GetFieldOfView() {
166     float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
167     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168     return ret;
169   }
170
171   public void SetAspectRatio(float aspectRatio) {
172     NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
173     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174   }
175
176   public float GetAspectRatio() {
177     float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
178     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179     return ret;
180   }
181
182   public void SetNearClippingPlane(float nearClippingPlane) {
183     NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
184     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185   }
186
187   public float GetNearClippingPlane() {
188     float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
189     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190     return ret;
191   }
192
193   public void SetFarClippingPlane(float farClippingPlane) {
194     NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
195     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196   }
197
198   public float GetFarClippingPlane() {
199     float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
200     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201     return ret;
202   }
203
204   public void SetTargetPosition(Vector3 targetPosition) {
205     NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
206     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207   }
208
209   public Vector3 GetTargetPosition() {
210     Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
211     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212     return ret;
213   }
214
215   public void SetInvertYAxis(bool invertYAxis) {
216     NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
217     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218   }
219
220   public bool GetInvertYAxis() {
221     bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
222     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223     return ret;
224   }
225
226   public void SetPerspectiveProjection(Vector2 size) {
227     NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
228     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229   }
230
231   public void SetOrthographicProjection(Vector2 size) {
232     NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size));
233     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234   }
235
236   public void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far) {
237     NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far);
238     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239   }
240
241   public string Type
242   {
243     get
244     {
245       string temp;
246       GetProperty( Camera.Property.TYPE).Get( out temp );
247       return temp;
248     }
249     set
250     {
251       SetProperty( Camera.Property.TYPE, new Dali.Property.Value( value ) );
252     }
253   }
254   public string ProjectionMode
255   {
256     get
257     {
258       string temp;
259       GetProperty( Camera.Property.PROJECTION_MODE).Get( out temp );
260       return temp;
261     }
262     set
263     {
264       SetProperty( Camera.Property.PROJECTION_MODE, new Dali.Property.Value( value ) );
265     }
266   }
267   public float FieldOfView
268   {
269     get
270     {
271       float temp = 0.0f;
272       GetProperty( Camera.Property.FIELD_OF_VIEW).Get( ref temp );
273       return temp;
274     }
275     set
276     {
277       SetProperty( Camera.Property.FIELD_OF_VIEW, new Dali.Property.Value( value ) );
278     }
279   }
280   public float AspectRatio
281   {
282     get
283     {
284       float temp = 0.0f;
285       GetProperty( Camera.Property.ASPECT_RATIO).Get( ref temp );
286       return temp;
287     }
288     set
289     {
290       SetProperty( Camera.Property.ASPECT_RATIO, new Dali.Property.Value( value ) );
291     }
292   }
293   public float NearPlaneDistance
294   {
295     get
296     {
297       float temp = 0.0f;
298       GetProperty( Camera.Property.NEAR_PLANE_DISTANCE).Get( ref temp );
299       return temp;
300     }
301     set
302     {
303       SetProperty( Camera.Property.NEAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
304     }
305   }
306   public float FarPlaneDistance
307   {
308     get
309     {
310       float temp = 0.0f;
311       GetProperty( Camera.Property.FAR_PLANE_DISTANCE).Get( ref temp );
312       return temp;
313     }
314     set
315     {
316       SetProperty( Camera.Property.FAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
317     }
318   }
319   public float LeftPlaneDistance
320   {
321     get
322     {
323       float temp = 0.0f;
324       GetProperty( Camera.Property.LEFT_PLANE_DISTANCE).Get( ref temp );
325       return temp;
326     }
327     set
328     {
329       SetProperty( Camera.Property.LEFT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
330     }
331   }
332   public float RightPlaneDistance
333   {
334     get
335     {
336       float temp = 0.0f;
337       GetProperty( Camera.Property.RIGHT_PLANE_DISTANCE).Get( ref temp );
338       return temp;
339     }
340     set
341     {
342       SetProperty( Camera.Property.RIGHT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
343     }
344   }
345   public float TopPlaneDistance
346   {
347     get
348     {
349       float temp = 0.0f;
350       GetProperty( Camera.Property.TOP_PLANE_DISTANCE).Get( ref temp );
351       return temp;
352     }
353     set
354     {
355       SetProperty( Camera.Property.TOP_PLANE_DISTANCE, new Dali.Property.Value( value ) );
356     }
357   }
358   public float BottomPlaneDistance
359   {
360     get
361     {
362       float temp = 0.0f;
363       GetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp );
364       return temp;
365     }
366     set
367     {
368       SetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE, new Dali.Property.Value( value ) );
369     }
370   }
371   public Vector3 TargetPosition
372   {
373     get
374     {
375       Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
376       GetProperty( Camera.Property.TARGET_POSITION).Get(  temp );
377       return temp;
378     }
379     set
380     {
381       SetProperty( Camera.Property.TARGET_POSITION, new Dali.Property.Value( value ) );
382     }
383   }
384   public Matrix ProjectionMatrix
385   {
386     get
387     {
388       Matrix temp = new Matrix();
389       GetProperty( Camera.Property.PROJECTION_MATRIX).Get(  temp );
390       return temp;
391     }
392 }  public Matrix ViewMatrix
393   {
394     get
395     {
396       Matrix temp = new Matrix();
397       GetProperty( Camera.Property.VIEW_MATRIX).Get(  temp );
398       return temp;
399     }
400 }  public bool InvertYAxis
401   {
402     get
403     {
404       bool temp = false;
405       GetProperty( Camera.Property.INVERT_Y_AXIS).Get( ref temp );
406       return temp;
407     }
408     set
409     {
410       SetProperty( Camera.Property.INVERT_Y_AXIS, new Dali.Property.Value( value ) );
411     }
412   }
413
414 }
415
416 }