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 CameraActor : Actor {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal CameraActor(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(CameraActor 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 override void Dispose() {
45 if (!Stage.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);
64 public class Property : global::System.IDisposable {
65 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66 protected bool swigCMemOwn;
68 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
69 swigCMemOwn = cMemoryOwn;
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
73 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
74 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
81 public virtual void Dispose() {
83 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
86 NDalicPINVOKE.delete_CameraActor_Property(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 global::System.GC.SuppressFinalize(this);
94 public Property() : this(NDalicPINVOKE.new_CameraActor_Property(), true) {
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 public static readonly int TYPE = NDalicPINVOKE.CameraActor_Property_TYPE_get();
99 public static readonly int PROJECTION_MODE = NDalicPINVOKE.CameraActor_Property_PROJECTION_MODE_get();
100 public static readonly int FIELD_OF_VIEW = NDalicPINVOKE.CameraActor_Property_FIELD_OF_VIEW_get();
101 public static readonly int ASPECT_RATIO = NDalicPINVOKE.CameraActor_Property_ASPECT_RATIO_get();
102 public static readonly int NEAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_NEAR_PLANE_DISTANCE_get();
103 public static readonly int FAR_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_FAR_PLANE_DISTANCE_get();
104 public static readonly int LEFT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_LEFT_PLANE_DISTANCE_get();
105 public static readonly int RIGHT_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_RIGHT_PLANE_DISTANCE_get();
106 public static readonly int TOP_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_TOP_PLANE_DISTANCE_get();
107 public static readonly int BOTTOM_PLANE_DISTANCE = NDalicPINVOKE.CameraActor_Property_BOTTOM_PLANE_DISTANCE_get();
108 public static readonly int TARGET_POSITION = NDalicPINVOKE.CameraActor_Property_TARGET_POSITION_get();
109 public static readonly int PROJECTION_MATRIX = NDalicPINVOKE.CameraActor_Property_PROJECTION_MATRIX_get();
110 public static readonly int VIEW_MATRIX = NDalicPINVOKE.CameraActor_Property_VIEW_MATRIX_get();
111 public static readonly int INVERT_Y_AXIS = NDalicPINVOKE.CameraActor_Property_INVERT_Y_AXIS_get();
115 public CameraActor () : this (NDalicPINVOKE.CameraActor_New__SWIG_0(), true) {
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 public CameraActor (Vector2 size) : this (NDalicPINVOKE.CameraActor_New__SWIG_1(Vector2.getCPtr(size)), true) {
120 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 public new static CameraActor DownCast(BaseHandle handle) {
124 CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 public CameraActor(CameraActor copy) : this(NDalicPINVOKE.new_CameraActor__SWIG_1(CameraActor.getCPtr(copy)), true) {
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 public CameraActor Assign(CameraActor rhs) {
134 CameraActor ret = new CameraActor(NDalicPINVOKE.CameraActor_Assign(swigCPtr, CameraActor.getCPtr(rhs)), false);
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139 public void SetType(CameraType type) {
140 NDalicPINVOKE.CameraActor_SetType(swigCPtr, (int)type);
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 public CameraType GetType() {
145 CameraType ret = (CameraType)NDalicPINVOKE.CameraActor_GetType(swigCPtr);
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 public void SetProjectionMode(ProjectionMode mode) {
151 NDalicPINVOKE.CameraActor_SetProjectionMode(swigCPtr, (int)mode);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public ProjectionMode GetProjectionMode() {
156 ProjectionMode ret = (ProjectionMode)NDalicPINVOKE.CameraActor_GetProjectionMode(swigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public void SetFieldOfView(float fieldOfView) {
162 NDalicPINVOKE.CameraActor_SetFieldOfView(swigCPtr, fieldOfView);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 public float GetFieldOfView() {
167 float ret = NDalicPINVOKE.CameraActor_GetFieldOfView(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public void SetAspectRatio(float aspectRatio) {
173 NDalicPINVOKE.CameraActor_SetAspectRatio(swigCPtr, aspectRatio);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 public float GetAspectRatio() {
178 float ret = NDalicPINVOKE.CameraActor_GetAspectRatio(swigCPtr);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 public void SetNearClippingPlane(float nearClippingPlane) {
184 NDalicPINVOKE.CameraActor_SetNearClippingPlane(swigCPtr, nearClippingPlane);
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public float GetNearClippingPlane() {
189 float ret = NDalicPINVOKE.CameraActor_GetNearClippingPlane(swigCPtr);
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public void SetFarClippingPlane(float farClippingPlane) {
195 NDalicPINVOKE.CameraActor_SetFarClippingPlane(swigCPtr, farClippingPlane);
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public float GetFarClippingPlane() {
200 float ret = NDalicPINVOKE.CameraActor_GetFarClippingPlane(swigCPtr);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 public void SetTargetPosition(Vector3 targetPosition) {
206 NDalicPINVOKE.CameraActor_SetTargetPosition(swigCPtr, Vector3.getCPtr(targetPosition));
207 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 public Vector3 GetTargetPosition() {
211 Vector3 ret = new Vector3(NDalicPINVOKE.CameraActor_GetTargetPosition(swigCPtr), true);
212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
216 public void SetInvertYAxis(bool invertYAxis) {
217 NDalicPINVOKE.CameraActor_SetInvertYAxis(swigCPtr, invertYAxis);
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 public bool GetInvertYAxis() {
222 bool ret = NDalicPINVOKE.CameraActor_GetInvertYAxis(swigCPtr);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
227 public void SetPerspectiveProjection(Vector2 size) {
228 NDalicPINVOKE.CameraActor_SetPerspectiveProjection(swigCPtr, Vector2.getCPtr(size));
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
232 public void SetOrthographicProjection(Vector2 size) {
233 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_0(swigCPtr, Vector2.getCPtr(size));
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 public void SetOrthographicProjection(float left, float right, float top, float bottom, float near, float far) {
238 NDalicPINVOKE.CameraActor_SetOrthographicProjection__SWIG_1(swigCPtr, left, right, top, bottom, near, far);
239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247 GetProperty( CameraActor.Property.TYPE).Get( out temp );
252 SetProperty( CameraActor.Property.TYPE, new NUI.Property.Value( value ) );
255 public string ProjectionMode
260 GetProperty( CameraActor.Property.PROJECTION_MODE).Get( out temp );
265 SetProperty( CameraActor.Property.PROJECTION_MODE, new NUI.Property.Value( value ) );
268 public float FieldOfView
273 GetProperty( CameraActor.Property.FIELD_OF_VIEW).Get( ref temp );
278 SetProperty( CameraActor.Property.FIELD_OF_VIEW, new NUI.Property.Value( value ) );
281 public float AspectRatio
286 GetProperty( CameraActor.Property.ASPECT_RATIO).Get( ref temp );
291 SetProperty( CameraActor.Property.ASPECT_RATIO, new NUI.Property.Value( value ) );
294 public float NearPlaneDistance
299 GetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE).Get( ref temp );
304 SetProperty( CameraActor.Property.NEAR_PLANE_DISTANCE, new NUI.Property.Value( value ) );
307 public float FarPlaneDistance
312 GetProperty( CameraActor.Property.FAR_PLANE_DISTANCE).Get( ref temp );
317 SetProperty( CameraActor.Property.FAR_PLANE_DISTANCE, new NUI.Property.Value( value ) );
320 public float LeftPlaneDistance
325 GetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE).Get( ref temp );
330 SetProperty( CameraActor.Property.LEFT_PLANE_DISTANCE, new NUI.Property.Value( value ) );
333 public float RightPlaneDistance
338 GetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE).Get( ref temp );
343 SetProperty( CameraActor.Property.RIGHT_PLANE_DISTANCE, new NUI.Property.Value( value ) );
346 public float TopPlaneDistance
351 GetProperty( CameraActor.Property.TOP_PLANE_DISTANCE).Get( ref temp );
356 SetProperty( CameraActor.Property.TOP_PLANE_DISTANCE, new NUI.Property.Value( value ) );
359 public float BottomPlaneDistance
364 GetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE).Get( ref temp );
369 SetProperty( CameraActor.Property.BOTTOM_PLANE_DISTANCE, new NUI.Property.Value( value ) );
372 public Vector3 TargetPosition
376 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
377 GetProperty( CameraActor.Property.TARGET_POSITION).Get( temp );
382 SetProperty( CameraActor.Property.TARGET_POSITION, new NUI.Property.Value( value ) );
385 public Matrix ProjectionMatrix
389 Matrix temp = new Matrix();
390 GetProperty( CameraActor.Property.PROJECTION_MATRIX).Get( temp );
393 } public Matrix ViewMatrix
397 Matrix temp = new Matrix();
398 GetProperty( CameraActor.Property.VIEW_MATRIX).Get( temp );
401 } public bool InvertYAxis
406 GetProperty( CameraActor.Property.INVERT_Y_AXIS).Get( ref temp );
411 SetProperty( CameraActor.Property.INVERT_Y_AXIS, new NUI.Property.Value( value ) );