793409593daa4810ed2e4cfddd2b5ce816a4fa85
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / SWIG / cameraActor.i
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 %define CAMERAACTOR_PROPERTIES_HELPER(NameSpace, ClassName)
19 %typemap(cscode) NameSpace::ClassName %{
20
21 /* Properties earlier added by Ruby Script */
22
23   public string Type
24   {
25     get
26     {
27       string temp;
28       GetProperty( CameraActor.Property.TYPE).Get( out temp );
29       return temp;
30     }
31     set
32     {
33       SetProperty( CameraActor.Property.TYPE, new Dali.Property.Value( value ) );
34     }
35   }
36   public string ProjectionMode
37   {
38     get
39     {
40       string temp;
41       GetProperty( CameraActor.Property.PROJECTION_MODE).Get( out temp );
42       return temp;
43     }
44     set
45     {
46       SetProperty( CameraActor.Property.PROJECTION_MODE, new Dali.Property.Value( value ) );
47     }
48   }
49   public float FieldOfView
50   {
51     get
52     {
53       float temp = 0.0f;
54       GetProperty( CameraActor.Property.FIELD_OF_VIEW).Get( ref temp );
55       return temp;
56     }
57     set
58     {
59       SetProperty( CameraActor.Property.FIELD_OF_VIEW, new Dali.Property.Value( value ) );
60     }
61   }
62   public float AspectRatio
63   {
64     get
65     {
66       float temp = 0.0f;
67       GetProperty( CameraActor.Property.ASPECT_RATIO).Get( ref temp );
68       return temp;
69     }
70     set
71     {
72       SetProperty( CameraActor.Property.ASPECT_RATIO, new Dali.Property.Value( value ) );
73     }
74   }
75   public float NearPlaneDistance
76   {
77     get
78     {
79       float temp = 0.0f;
80       GetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE).Get( ref temp );
81       return temp;
82     }
83     set
84     {
85       SetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
86     }
87   }
88   public float FarPlaneDistance
89   {
90     get
91     {
92       float temp = 0.0f;
93       GetProperty( CameraActor.Property.FAR_PLANE_DISTANCE).Get( ref temp );
94       return temp;
95     }
96     set
97     {
98       SetProperty( CameraActor.Property.FAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
99     }
100   }
101   public float LeftPlaneDistance
102   {
103     get
104     {
105       float temp = 0.0f;
106       GetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE).Get( ref temp );
107       return temp;
108     }
109     set
110     {
111       SetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
112     }
113   }
114   public float RightPlaneDistance
115   {
116     get
117     {
118       float temp = 0.0f;
119       GetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE).Get( ref temp );
120       return temp;
121     }
122     set
123     {
124       SetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
125     }
126   }
127   public float TopPlaneDistance
128   {
129     get
130     {
131       float temp = 0.0f;
132       GetProperty( CameraActor.Property.TOP_PLANE_DISTANCE).Get( ref temp );
133       return temp;
134     }
135     set
136     {
137       SetProperty( CameraActor.Property.TOP_PLANE_DISTANCE, new Dali.Property.Value( value ) );
138     }
139   }
140   public float BottomPlaneDistance
141   {
142     get
143     {
144       float temp = 0.0f;
145       GetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp );
146       return temp;
147     }
148     set
149     {
150       SetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE, new Dali.Property.Value( value ) );
151     }
152   }
153   public Dali.CSharp.Position TargetPosition
154   {
155     get
156     {
157       Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
158       GetProperty( CameraActor.Property.TARGET_POSITION).Get(  temp );
159       Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
160       return ret;
161     }
162     set
163     {
164       SetProperty( CameraActor.Property.TARGET_POSITION, new Dali.Property.Value( value ) );
165     }
166   }
167   public Matrix ProjectionMatrix
168   {
169     get
170     {
171       Matrix temp = new Matrix();
172       GetProperty( CameraActor.Property.PROJECTION_MATRIX).Get(  temp );
173       return temp;
174     }
175   }
176   public Matrix ViewMatrix
177   {
178     get
179     {
180       Matrix temp = new Matrix();
181       GetProperty( CameraActor.Property.VIEW_MATRIX).Get(  temp );
182       return temp;
183     }
184   }
185   public bool InvertYAxis
186   {
187     get
188     {
189       bool temp = false;
190       GetProperty( CameraActor.Property.INVERT_Y_AXIS).Get( ref temp );
191       return temp;
192     }
193     set
194     {
195       SetProperty( CameraActor.Property.INVERT_Y_AXIS, new Dali.Property.Value( value ) );
196     }
197   }
198
199 /* Properties ends */
200
201 /* Constructor and APIs with high level class Size */
202
203   public CameraActor (Dali.CSharp.Size size) : this (NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(new Vector2(size.W,size.H))), true) {
204       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205   }
206
207   public void SetPerspectiveProjection(Dali.CSharp.Size size) {
208     NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(new Vector2(size.W,size.H)));
209     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210   }
211
212   public void SetOrthographicProjection(Dali.CSharp.Size size) {
213     NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(new Vector2(size.W,size.H)));
214     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215   }
216
217 /* constructor and APIs end */
218
219
220 %}
221 %enddef
222
223 namespace Dali
224 {
225   CAMERAACTOR_PROPERTIES_HELPER( Dali, CameraActor);
226
227 }