summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_3d_camera.eo
blob: 45e9e9a2c7cb6e300426d3d381ad93e598e72c43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
class Evas_3D_Camera (Evas_3D_Object, Evas.Common_Interface)
{
   legacy_prefix: null;
   data: Evas_3D_Camera_Data;
   methods {
      projection_matrix_set {
         /*@
          Set the projection matrix of the given camera.

           @param camera     The given camera.
           @param matrix     Pointer to the array of 16 Evas_Real values in column major order.

           Default projection matrix is identity matrix.

           @see evas_3d_camera_projection_perspective_set()
           @see evas_3d_camera_projection_ortho_set()
           @see evas_3d_camera_projection_frustum_set()

           @ingroup Evas_3D_Camera
          */
         params {
           @in const(Evas_Real)* matrix; /*@ Projection Matrix */
         }
      }

      projection_matrix_get @const {
         /*@
          Get the projection matrix of the given camera.

          @param camera     The given camera.
          @param matrix     Pointer to receive the 16 Evas_Real values in column major order.

          @see evas_3d_camera_projection_matrix_set()

          @ingroup Evas_3D_Camera
         */
         params {
           @out Evas_Real matrix; /*@ Projection Matrix */
         }
      }

      projection_perspective_set {
         /*@
           Set the projection matrix of the given camera with perspective projection.

           @param camera     The given camera.
           @param fovy       Field of view angle in Y direction.
           @param aspect     Aspect ratio.
           @param dnear      Distance to near clipping plane.
           @param dfar       Distance to far clipping plane.

           @see evas_3d_camera_projection_matrix_set()

           @ingroup Evas_3D_Camera
          */

         params {
            Evas_Real fovy; /*@ Field of view angle in Y direction. */
            Evas_Real aspect; /*@ Aspect ratio.*/
            Evas_Real dnear; /*@ Distance to near clipping plane. */
            Evas_Real dfar; /*@ Distance to far clipping plane. */
         }
      }

      projection_frustum_set {
         /*@
           Set the projection matrix of the given camera with frustum projection.

           @see evas_3d_camera_projection_matrix_set()

           @ingroup Evas_3D_Camera
          */
         params {
            Evas_Real left; /*@ Left X coordinate of the near clipping plane. */
            Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/
            Evas_Real bottom; /*@ Bottom Y coordinate of the near clipping plane. */
            Evas_Real top; /*@ Top Y coordinate of the near clipping plane */
            Evas_Real dnear; /*@ Distance to near clipping plane. */
            Evas_Real dfar; /*@ Distance to far clipping plane. */
         }
      }
      projection_ortho_set {
         /*@
           Set the projection matrix of the given camera with orthogonal projection.

           @see evas_3d_camera_projection_matrix_set()

           @ingroup Evas_3D_Camera
          */
         params {
            Evas_Real left; /*@ Left X coordinate of the near clipping plane. */
            Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/
            Evas_Real bottom; /*@ Bottom Y coordinate of the near clipping plane. */
            Evas_Real top; /*@ Top Y coordinate of the near clipping plane */
            Evas_Real dnear; /*@ Distance to near clipping plane. */
            Evas_Real dfar; /*@ Distance to far clipping plane. */
         }
      }
      node_visible_get {
         /*@
            Check is bounding sphere of given node inside frustum of camera node.
          *
          * @param camera          The given camera node.
          * @param node            The given node.
          * @return                @c EINA_TRUE in frustum, @c EINA_FALSE otherwise

          * If the nodes are @ NULL or nodes type mismatch error wrong type of nodes will be generated and returned @ EINA_FALSE.

          * @ingroup Evas_3D_Camera
          */
         return: bool;
         params {
            @in Evas_3D_Node *camera_node;
            @in Evas_3D_Node *node;
            @in Evas_3D_Frustum_Mode key;
         }
      }
   }

   implements {
      Eo.Base.constructor;
      Eo.Base.destructor;
      Evas_3D_Object.update_notify;
      Evas_3D_Object.change_notify;
   }

}