[NUI.Scene3D] Add ProjectionDirection in Camera
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Scene3D / src / public / Controls / Camera.cs
1 /*
2  * Copyright(c) 2022 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 using System;
18 using System.ComponentModel;
19 using Tizen.NUI.BaseComponents;
20
21 namespace Tizen.NUI.Scene3D
22 {
23     /// <summary>
24     /// Camera class controls a camera in 3D space.
25     ///
26     /// Camera can be added on the SceneView and displays SceneView's virtual 3D world to the screen.
27     /// Camera can be translated and rotated in the space.
28     /// </summary>
29     /// <remarks>
30     /// Transform inheritance cannot be guaranteed when adding children to a camera.
31     /// </remarks>
32     /// <since_tizen> 10 </since_tizen>
33     public partial class Camera : View
34     {
35         internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
36         {
37         }
38
39         /// <summary>
40         /// Creates an uninitialized Camera.
41         /// </summary>
42         /// <since_tizen> 10 </since_tizen>
43         public Camera() : this(Interop.Camera.New(), true)
44         {
45             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46         }
47
48         /// <summary>
49         /// Copy constructor.
50         /// </summary>
51         /// <param name="camera">The Camera object to be copied.</param>
52         /// <since_tizen> 10 </since_tizen>
53         public Camera(Camera camera) : this(Interop.Camera.NewCamera(Camera.getCPtr(camera)), true)
54         {
55             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56         }
57
58         /// <summary>
59         /// Assignment.
60         /// </summary>
61         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public Camera Assign(Camera rhs)
64         {
65             Camera ret = new Camera(Interop.Camera.Assign(SwigCPtr, Camera.getCPtr(rhs)), false);
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67             return ret;
68         }
69
70         /// <summary>
71         /// Creates a CameraActor object.
72         /// Sets the default camera perspective projection for the given canvas size..
73         /// </summary>
74         internal Camera(Vector2 size) : this(Interop.Camera.New(Vector2.getCPtr(size)), true)
75         {
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77         }
78
79         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
80         [EditorBrowsable(EditorBrowsableState.Never)]
81         internal static Camera DownCast(BaseHandle handle)
82         {
83             if (handle == null)
84             {
85                 throw new global::System.ArgumentNullException(nameof(handle));
86             }
87             Camera ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Camera;
88             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89             return ret;
90         }
91
92         /// <summary>
93         /// Enumeration for the projectionMode.
94         /// ProjectionMode defines how the camera shows 3D objects or scene on a 2D plane with projection.
95         /// </summary>
96         /// <since_tizen> 10 </since_tizen>
97         public enum ProjectionModeType
98         {
99             /// <summary>
100             /// Distance causes foreshortening; objects further from the camera appear smaller.
101             /// </summary>
102             Perspective,
103             /// <summary>
104             /// Relative distance from the camera does not affect the size of objects.
105             /// </summary>
106             Orthographic
107         }
108
109         /// <summary>
110         /// Enumeration for the projectionDirection.
111         /// </summary>
112         /// This will be released at Tizen.NET API Level 10, so currently this would be used as inhouse API.
113         [EditorBrowsable(EditorBrowsableState.Never)]
114         public enum ProjectionDirectionType
115         {
116             /// <summary>
117             /// Distance causes foreshortening; objects further from the camera appear smaller.
118             /// </summary>
119             Vertical,
120             /// <summary>
121             /// Relative distance from the camera does not affect the size of objects.
122             /// </summary>
123             Horizontal
124         }
125
126         /// <summary>
127         /// Sets/Gets the projection mode.
128         /// The default is Perspective
129         /// </summary>
130         /// <since_tizen> 10 </since_tizen>
131         public ProjectionModeType ProjectionMode
132         {
133             get
134             {
135                 return (ProjectionModeType)GetValue(ProjectionProperty);
136             }
137             set
138             {
139                 SetValue(ProjectionProperty, value);
140                 NotifyPropertyChanged();
141             }
142         }
143
144         /// <summary>
145         /// <para>
146         /// Sets/Gets the projection direction.
147         /// Projection direction determine basic direction of projection relative properties.
148         /// It will be used when we need to calculate some values relative with aspect ratio.
149         /// <see cref="FieldOfView"/>, and <see cref="OrthographicSize"/>
150         /// </para>
151         /// <para>
152         /// For example, if aspect ratio is 4:3 and set fieldOfView as 60 degree.
153         /// If ProjectionDirectionType.Vertical, basic direction is vertical. so, FoV of horizontal direction become ~75.2 degree
154         /// If ProjectionDirectionType.Horizontal, basic direction is horizontal. so, FoV of vertical direction become ~46.8 degree
155         /// </para>
156         /// <note>
157         /// This property doesn't change <see cref="FieldOfView"/> and <see cref="OrthographicSize"/> value automatically.
158         /// So result scene might be changed.
159         /// </note>
160         /// <para>The default is Vertical.</para>
161         /// </summary>
162         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
163         [EditorBrowsable(EditorBrowsableState.Never)]
164         public ProjectionDirectionType ProjectionDirection
165         {
166             get
167             {
168                 return (ProjectionDirectionType)GetValue(ProjectionDirectionProperty);
169             }
170             set
171             {
172                 SetValue(ProjectionDirectionProperty, value);
173                 NotifyPropertyChanged();
174             }
175         }
176
177         /// <summary>
178         /// Sets/Gets the field of view in Radians.
179         /// FieldOfView depends on <see cref="ProjectionDirection"/> value.
180         /// The default field of view is 45 degrees.
181         /// </summary>
182         /// <since_tizen> 10 </since_tizen>
183         public Radian FieldOfView
184         {
185             get
186             {
187                 return new Radian((float)GetValue(FieldOfViewProperty));
188             }
189             set
190             {
191                 SetValue(FieldOfViewProperty, value?.ConvertToFloat() ?? 0.0f);
192                 NotifyPropertyChanged();
193             }
194         }
195
196         /// <summary>
197         /// Sets/Gets Orthographic Size of this camera.
198         /// OrthographicSize depends on <see cref="ProjectionDirection"/> value.
199         /// If ProjectoinDirection is Vertical, OrthographicSize is height/2 of viewing cube of Orthographic projection.
200         /// If ProjectoinDirection is Horizontal, OrthographicSize is width/2 of viewing cube of Orthographic projection.
201         /// Remained Width or Height of viewing cube is internally computed by using aspect ratio of Viewport.
202         /// </summary>
203         /// <since_tizen> 10 </since_tizen>
204         public float OrthographicSize
205         {
206             get
207             {
208                 return InternalProjectionDirection == ProjectionDirectionType.Vertical ? TopPlaneDistance : RightPlaneDistance;
209             }
210             set
211             {
212                 float halfHeight;
213                 float halfWidth;
214                 if(InternalProjectionDirection == ProjectionDirectionType.Vertical)
215                 {
216                     halfHeight = value;
217                     halfWidth = AspectRatio * value;
218                 }
219                 else
220                 {
221                     halfHeight = value / AspectRatio;
222                     halfWidth = value;
223                 }
224                 SetValue(TopPlaneDistanceProperty, halfHeight);
225                 SetValue(BottomPlaneDistanceProperty, -halfHeight);
226                 SetValue(LeftPlaneDistanceProperty, -halfWidth);
227                 SetValue(RightPlaneDistanceProperty, halfWidth);
228                 NotifyPropertyChanged();
229             }
230         }
231
232         /// <summary>
233         /// Gets the aspect ratio of the camera.
234         /// </summary>
235         /// <since_tizen> 10 </since_tizen>
236         public float AspectRatio
237         {
238             get
239             {
240                 return (float)GetValue(AspectRatioProperty);
241             }
242         }
243
244         /// <summary>
245         /// Sets/Gets the near clipping plane distance.
246         /// </summary>
247         /// <since_tizen> 10 </since_tizen>
248         public float NearPlaneDistance
249         {
250             get
251             {
252                 return (float)GetValue(NearPlaneDistanceProperty);
253             }
254             set
255             {
256                 SetValue(NearPlaneDistanceProperty, value);
257                 NotifyPropertyChanged();
258             }
259         }
260
261         /// <summary>
262         /// Sets/Gets the far clipping plane distance.
263         /// </summary>
264         /// <since_tizen> 10 </since_tizen>
265         public float FarPlaneDistance
266         {
267             get
268             {
269                 return (float)GetValue(FarPlaneDistanceProperty);
270             }
271             set
272             {
273                 SetValue(FarPlaneDistanceProperty, value);
274                 NotifyPropertyChanged();
275             }
276         }
277
278         /// <summary>
279         /// Gets the left clipping plane distance.
280         /// </summary>
281         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
282         [EditorBrowsable(EditorBrowsableState.Never)]
283         public float LeftPlaneDistance
284         {
285             get
286             {
287                 return (float)GetValue(LeftPlaneDistanceProperty);
288             }
289         }
290
291         /// <summary>
292         /// Gets the right clipping plane distance.
293         /// </summary>
294         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
295         [EditorBrowsable(EditorBrowsableState.Never)]
296         public float RightPlaneDistance
297         {
298             get
299             {
300                 return (float)GetValue(RightPlaneDistanceProperty);
301             }
302         }
303
304         /// <summary>
305         /// Gets the top clipping plane distance.
306         /// </summary>
307         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
308         [EditorBrowsable(EditorBrowsableState.Never)]
309         public float TopPlaneDistance
310         {
311             get
312             {
313                 return (float)GetValue(TopPlaneDistanceProperty);
314             }
315         }
316
317         /// <summary>
318         /// Gets the bottom clipping plane distance.
319         /// </summary>
320         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
321         [EditorBrowsable(EditorBrowsableState.Never)]
322         public float BottomPlaneDistance
323         {
324             get
325             {
326                 return (float)GetValue(BottomPlaneDistanceProperty);
327             }
328         }
329
330         /// <summary>
331         /// Requests for an inversion on the Y axis on the projection calculation.
332         /// or gets whether the Y axis is inverted.
333         /// </summary>
334         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
335         [EditorBrowsable(EditorBrowsableState.Never)]
336         public bool InvertYAxis
337         {
338             get
339             {
340                 return (bool)GetValue(InvertYAxisProperty);
341             }
342             set
343             {
344                 SetValue(InvertYAxisProperty, value);
345                 NotifyPropertyChanged();
346             }
347         }
348
349         /// <summary>
350         /// Gets ProjectionMatrix of this Camera
351         /// TODO : Open Matrix
352         /// </summary>
353         internal Matrix ProjectionMatrix
354         {
355             get
356             {
357                 Matrix returnValue = new Matrix();
358                 PropertyValue projectionMatrix = GetProperty(Interop.Camera.ProjectionMatrixGet());
359                 projectionMatrix?.Get(returnValue);
360                 projectionMatrix?.Dispose();
361                 return returnValue;
362             }
363         }
364
365         /// <summary>
366         /// Gets ViewMatrix of this Camera
367         /// TODO : Open Matrix
368         /// </summary>
369         internal Matrix ViewMatrix
370         {
371             get
372             {
373                 Matrix returnValue = new Matrix();
374                 PropertyValue viewMatrix = GetProperty(Interop.Camera.ViewMatrixGet());
375                 viewMatrix.Get(returnValue);
376                 viewMatrix.Dispose();
377                 return returnValue;
378             }
379         }
380
381         private ProjectionModeType InternalProjectionMode
382         {
383             get
384             {
385                 int returnValue = (int)ProjectionModeType.Perspective;
386                 PropertyValue projectionMode = GetProperty(Interop.Camera.ProjectionModeGet());
387                 projectionMode?.Get(out returnValue);
388                 projectionMode?.Dispose();
389                 return (ProjectionModeType)returnValue;
390             }
391             set
392             {
393                 PropertyValue setValue = new Tizen.NUI.PropertyValue((int)value);
394                 SetProperty(Interop.Camera.ProjectionModeGet(), setValue);
395                 setValue.Dispose();
396             }
397         }
398
399         private ProjectionDirectionType InternalProjectionDirection
400         {
401             get
402             {
403                 int returnValue = (int)ProjectionDirectionType.Vertical;
404                 PropertyValue projectionDirection = GetProperty(Interop.Camera.ProjectionDirectionGet());
405                 projectionDirection?.Get(out returnValue);
406                 projectionDirection?.Dispose();
407                 return (ProjectionDirectionType)returnValue;
408             }
409             set
410             {
411                 PropertyValue setValue = new Tizen.NUI.PropertyValue((int)value);
412                 SetProperty(Interop.Camera.ProjectionDirectionGet(), setValue);
413                 setValue.Dispose();
414             }
415         }
416
417         private float InternalFieldOfView
418         {
419             get
420             {
421                 float returnValue = 0.0f;
422                 PropertyValue fieldView = GetProperty(Interop.Camera.FieldOfViewGet());
423                 fieldView?.Get(out returnValue);
424                 fieldView?.Dispose();
425                 return returnValue;
426             }
427             set
428             {
429                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
430                 SetProperty(Interop.Camera.FieldOfViewGet(), setValue);
431                 setValue.Dispose();
432             }
433         }
434
435         private float InternalAspectRatio
436         {
437             get
438             {
439                 float returnValue = 0.0f;
440                 PropertyValue aspectRatio = GetProperty(Interop.Camera.AspectRatioGet());
441                 aspectRatio?.Get(out returnValue);
442                 aspectRatio?.Dispose();
443                 return returnValue;
444             }
445             set
446             {
447                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
448                 SetProperty(Interop.Camera.AspectRatioGet(), setValue);
449                 setValue.Dispose();
450             }
451         }
452
453         private float InternalNearPlaneDistance
454         {
455             get
456             {
457                 float returnValue = 0.0f;
458                 PropertyValue nearPlaneDistance = GetProperty(Interop.Camera.NearPlaneDistanceGet());
459                 nearPlaneDistance?.Get(out returnValue);
460                 nearPlaneDistance?.Dispose();
461                 return returnValue;
462             }
463             set
464             {
465                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
466                 SetProperty(Interop.Camera.NearPlaneDistanceGet(), setValue);
467                 setValue.Dispose();
468             }
469         }
470
471         private float InternalFarPlaneDistance
472         {
473             get
474             {
475                 float returnValue = 0.0f;
476                 PropertyValue farPlaneDistance = GetProperty(Interop.Camera.FarPlaneDistanceGet());
477                 farPlaneDistance?.Get(out returnValue);
478                 farPlaneDistance?.Dispose();
479                 return returnValue;
480             }
481             set
482             {
483                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
484                 SetProperty(Interop.Camera.FarPlaneDistanceGet(), setValue);
485                 setValue.Dispose();
486             }
487         }
488
489         private float InternalLeftPlaneDistance
490         {
491             get
492             {
493                 float returnValue = 0.0f;
494                 PropertyValue leftPlaneDistance = GetProperty(Interop.Camera.LeftPlaneDistanceGet());
495                 leftPlaneDistance?.Get(out returnValue);
496                 leftPlaneDistance?.Dispose();
497                 return returnValue;
498             }
499             set
500             {
501                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
502                 SetProperty(Interop.Camera.LeftPlaneDistanceGet(), setValue);
503                 setValue.Dispose();
504             }
505         }
506
507         private float InternalRightPlaneDistance
508         {
509             get
510             {
511                 float returnValue = 0.0f;
512                 PropertyValue rightPlaneDistance = GetProperty(Interop.Camera.RightPlaneDistanceGet());
513                 rightPlaneDistance?.Get(out returnValue);
514                 rightPlaneDistance?.Dispose();
515                 return returnValue;
516             }
517             set
518             {
519                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
520                 SetProperty(Interop.Camera.RightPlaneDistanceGet(), setValue);
521                 setValue.Dispose();
522             }
523         }
524
525         private float InternalTopPlaneDistance
526         {
527             get
528             {
529                 float returnValue = 0.0f;
530                 PropertyValue topPlaneDistance = GetProperty(Interop.Camera.TopPlaneDistanceGet());
531                 topPlaneDistance?.Get(out returnValue);
532                 topPlaneDistance?.Dispose();
533                 return returnValue;
534             }
535             set
536             {
537                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
538                 SetProperty(Interop.Camera.TopPlaneDistanceGet(), setValue);
539                 setValue.Dispose();
540             }
541         }
542
543         private float InternalBottomPlaneDistance
544         {
545             get
546             {
547                 float returnValue = 0.0f;
548                 PropertyValue bottomPlaneDistance = GetProperty(Interop.Camera.BottomPlaneDistanceGet());
549                 bottomPlaneDistance?.Get(out returnValue);
550                 bottomPlaneDistance?.Dispose();
551                 return returnValue;
552             }
553             set
554             {
555                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
556                 SetProperty(Interop.Camera.BottomPlaneDistanceGet(), setValue);
557                 setValue.Dispose();
558             }
559         }
560
561         private bool InternalInvertYAxis
562         {
563             get
564             {
565                 bool returnValue = false;
566                 PropertyValue invertYAxis = GetProperty(Interop.Camera.InvertYAxisGet());
567                 invertYAxis?.Get(out returnValue);
568                 invertYAxis?.Dispose();
569                 return returnValue;
570             }
571             set
572             {
573                 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
574                 SetProperty(Interop.Camera.InvertYAxisGet(), setValue);
575                 setValue.Dispose();
576             }
577         }
578
579         internal void SetProjection(ProjectionModeType mode)
580         {
581             Interop.Camera.SetProjectionMode(SwigCPtr, (int)mode);
582             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
583         }
584
585         internal ProjectionModeType GetProjection()
586         {
587             ProjectionModeType ret = (ProjectionModeType)Interop.Camera.GetProjectionMode(SwigCPtr);
588             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
589             return ret;
590         }
591
592         internal void SetFieldOfView(float fieldOfView)
593         {
594             Interop.Camera.SetFieldOfView(SwigCPtr, fieldOfView);
595             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596         }
597
598         internal float GetFieldOfView()
599         {
600             float ret = Interop.Camera.GetFieldOfView(SwigCPtr);
601             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602             return ret;
603         }
604
605         internal void SetAspectRatio(float aspectRatio)
606         {
607             Interop.Camera.SetAspectRatio(SwigCPtr, aspectRatio);
608             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
609         }
610
611         internal float GetAspectRatio()
612         {
613             float ret = Interop.Camera.GetAspectRatio(SwigCPtr);
614             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615             return ret;
616         }
617
618         internal void SetNearClippingPlane(float nearClippingPlane)
619         {
620             Interop.Camera.SetNearClippingPlane(SwigCPtr, nearClippingPlane);
621             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622         }
623
624         internal float GetNearClippingPlane()
625         {
626             float ret = Interop.Camera.GetNearClippingPlane(SwigCPtr);
627             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
628             return ret;
629         }
630
631         internal void SetFarClippingPlane(float farClippingPlane)
632         {
633             Interop.Camera.SetFarClippingPlane(SwigCPtr, farClippingPlane);
634             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635         }
636
637         internal float GetFarClippingPlane()
638         {
639             float ret = Interop.Camera.GetFarClippingPlane(SwigCPtr);
640             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641             return ret;
642         }
643
644         internal void SetInvertYAxis(bool invertYAxis)
645         {
646             Interop.Camera.SetInvertYAxis(SwigCPtr, invertYAxis);
647             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648         }
649
650         internal bool GetInvertYAxis()
651         {
652             bool ret = Interop.Camera.GetInvertYAxis(SwigCPtr);
653             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
654             return ret;
655         }
656
657         /// <summary>
658         /// Convert from vertical fov to horizontal fov consider with camera's AspectRatio.
659         /// </summary>
660         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
661         [EditorBrowsable(EditorBrowsableState.Never)]
662         public static Radian ConvertFovFromVerticalToHorizontal(float aspect, Radian verticalFov)
663         {
664             if(verticalFov == null)
665             {
666                 return null;
667             }
668             return new Radian(2.0f * (float)Math.Atan(Math.Tan(verticalFov.ConvertToFloat() * 0.5f) * aspect));
669         }
670
671         /// <summary>
672         /// Convert from horizontal fov to vertical fov consider with camera's AspectRatio.
673         /// </summary>
674         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
675         [EditorBrowsable(EditorBrowsableState.Never)]
676         public static Radian ConvertFovFromHorizontalToVertical(float aspect, Radian horizontalFov)
677         {
678             if(horizontalFov == null)
679             {
680                 return null;
681             }
682             return new Radian(2.0f * (float)Math.Atan(Math.Tan(horizontalFov.ConvertToFloat() * 0.5f) / aspect));
683         }
684
685         /// <summary>
686         /// Release swigCPtr.
687         /// </summary>
688         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
689         [EditorBrowsable(EditorBrowsableState.Never)]
690         protected override void ReleaseSwigCPtr(global::System.Runtime.InteropServices.HandleRef swigCPtr)
691         {
692             Interop.Camera.DeleteCamera(swigCPtr);
693         }
694     }
695 }