2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 %define CAMERAACTOR_PROPERTIES_HELPER(NameSpace, ClassName)
19 %typemap(cscode) NameSpace::ClassName %{
21 /* Properties earlier added by Ruby Script */
28 GetProperty( CameraActor.Property.TYPE).Get( out temp );
33 SetProperty( CameraActor.Property.TYPE, new Dali.Property.Value( value ) );
36 public string ProjectionMode
41 GetProperty( CameraActor.Property.PROJECTION_MODE).Get( out temp );
46 SetProperty( CameraActor.Property.PROJECTION_MODE, new Dali.Property.Value( value ) );
49 public float FieldOfView
54 GetProperty( CameraActor.Property.FIELD_OF_VIEW).Get( ref temp );
59 SetProperty( CameraActor.Property.FIELD_OF_VIEW, new Dali.Property.Value( value ) );
62 public float AspectRatio
67 GetProperty( CameraActor.Property.ASPECT_RATIO).Get( ref temp );
72 SetProperty( CameraActor.Property.ASPECT_RATIO, new Dali.Property.Value( value ) );
75 public float NearPlaneDistance
80 GetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE).Get( ref temp );
85 SetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
88 public float FarPlaneDistance
93 GetProperty( CameraActor.Property.FAR_PLANE_DISTANCE).Get( ref temp );
98 SetProperty( CameraActor.Property.FAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
101 public float LeftPlaneDistance
106 GetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE).Get( ref temp );
111 SetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
114 public float RightPlaneDistance
119 GetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE).Get( ref temp );
124 SetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
127 public float TopPlaneDistance
132 GetProperty( CameraActor.Property.TOP_PLANE_DISTANCE).Get( ref temp );
137 SetProperty( CameraActor.Property.TOP_PLANE_DISTANCE, new Dali.Property.Value( value ) );
140 public float BottomPlaneDistance
145 GetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp );
150 SetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE, new Dali.Property.Value( value ) );
153 public Dali.CSharp.Position TargetPosition
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);
164 SetProperty( CameraActor.Property.TARGET_POSITION, new Dali.Property.Value( value ) );
167 public Matrix ProjectionMatrix
171 Matrix temp = new Matrix();
172 GetProperty( CameraActor.Property.PROJECTION_MATRIX).Get( temp );
176 public Matrix ViewMatrix
180 Matrix temp = new Matrix();
181 GetProperty( CameraActor.Property.VIEW_MATRIX).Get( temp );
185 public bool InvertYAxis
190 GetProperty( CameraActor.Property.INVERT_Y_AXIS).Get( ref temp );
195 SetProperty( CameraActor.Property.INVERT_Y_AXIS, new Dali.Property.Value( value ) );
199 /* Properties ends */
201 /* Constructor and APIs with high level class Size */
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();
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();
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();
217 /* constructor and APIs end */
225 CAMERAACTOR_PROPERTIES_HELPER( Dali, CameraActor);