1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 public class Camera : Animatable {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
41 DisposeQueue.Instance.Add(this);
44 public virtual void Dispose() {
45 if (!Window.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_CameraActor(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
63 public class Property : global::System.IDisposable {
64 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
65 protected bool swigCMemOwn;
67 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
68 swigCMemOwn = cMemoryOwn;
69 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
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;
80 public virtual void Dispose() {
82 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
85 NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
87 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
89 global::System.GC.SuppressFinalize(this);
93 public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true) {
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
114 public Camera () : this (NDalicPINVOKE.CameraActor_New__SWIG_0(), true) {
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
118 public Camera (Vector2 size) : this (NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true) {
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
128 public Camera(Camera copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(Camera.getCPtr(copy)), true) {
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
138 public void SetType(CameraType type) {
139 NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 public CameraType GetType() {
144 CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149 public void SetProjectionMode(ProjectionMode mode) {
150 NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 public ProjectionMode GetProjectionMode() {
155 ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public void SetFieldOfView(float fieldOfView) {
161 NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public float GetFieldOfView() {
166 float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public void SetAspectRatio(float aspectRatio) {
172 NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 public float GetAspectRatio() {
177 float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public void SetNearClippingPlane(float nearClippingPlane) {
183 NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public float GetNearClippingPlane() {
188 float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public void SetFarClippingPlane(float farClippingPlane) {
194 NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 public float GetFarClippingPlane() {
199 float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 public void SetTargetPosition(Vector3 targetPosition) {
205 NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
206 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 public Vector3 GetTargetPosition() {
210 Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215 public void SetInvertYAxis(bool invertYAxis) {
216 NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 public bool GetInvertYAxis() {
221 bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 public void SetPerspectiveProjection(Vector2 size) {
227 NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
246 GetProperty( Camera.Property.TYPE).Get( out temp );
251 SetProperty( Camera.Property.TYPE, new Dali.Property.Value( value ) );
254 public string ProjectionMode
259 GetProperty( Camera.Property.PROJECTION_MODE).Get( out temp );
264 SetProperty( Camera.Property.PROJECTION_MODE, new Dali.Property.Value( value ) );
267 public float FieldOfView
272 GetProperty( Camera.Property.FIELD_OF_VIEW).Get( ref temp );
277 SetProperty( Camera.Property.FIELD_OF_VIEW, new Dali.Property.Value( value ) );
280 public float AspectRatio
285 GetProperty( Camera.Property.ASPECT_RATIO).Get( ref temp );
290 SetProperty( Camera.Property.ASPECT_RATIO, new Dali.Property.Value( value ) );
293 public float NearPlaneDistance
298 GetProperty( Camera.Property.NEAR_PLANE_DISTANCE).Get( ref temp );
303 SetProperty( Camera.Property.NEAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
306 public float FarPlaneDistance
311 GetProperty( Camera.Property.FAR_PLANE_DISTANCE).Get( ref temp );
316 SetProperty( Camera.Property.FAR_PLANE_DISTANCE, new Dali.Property.Value( value ) );
319 public float LeftPlaneDistance
324 GetProperty( Camera.Property.LEFT_PLANE_DISTANCE).Get( ref temp );
329 SetProperty( Camera.Property.LEFT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
332 public float RightPlaneDistance
337 GetProperty( Camera.Property.RIGHT_PLANE_DISTANCE).Get( ref temp );
342 SetProperty( Camera.Property.RIGHT_PLANE_DISTANCE, new Dali.Property.Value( value ) );
345 public float TopPlaneDistance
350 GetProperty( Camera.Property.TOP_PLANE_DISTANCE).Get( ref temp );
355 SetProperty( Camera.Property.TOP_PLANE_DISTANCE, new Dali.Property.Value( value ) );
358 public float BottomPlaneDistance
363 GetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp );
368 SetProperty( Camera.Property.BOTTOM_PLANE_DISTANCE, new Dali.Property.Value( value ) );
371 public Vector3 TargetPosition
375 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
376 GetProperty( Camera.Property.TARGET_POSITION).Get( temp );
381 SetProperty( Camera.Property.TARGET_POSITION, new Dali.Property.Value( value ) );
384 public Matrix ProjectionMatrix
388 Matrix temp = new Matrix();
389 GetProperty( Camera.Property.PROJECTION_MATRIX).Get( temp );
392 } public Matrix ViewMatrix
396 Matrix temp = new Matrix();
397 GetProperty( Camera.Property.VIEW_MATRIX).Get( temp );
400 } public bool InvertYAxis
405 GetProperty( Camera.Property.INVERT_Y_AXIS).Get( ref temp );
410 SetProperty( Camera.Property.INVERT_Y_AXIS, new Dali.Property.Value( value ) );