summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_canvas3d_primitive.eo
blob: c1e3fd703ebded5126e0ec00c0b8d6e47c7b67f3 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import evas_canvas3d_types;

class @beta Evas.Canvas3D.Primitive extends Evas.Canvas3D.Object
{
   [[Evas 3D canvas primitive class]]
   data: Evas_Canvas3D_Primitive_Data;

   methods {
      @property form {
         set {
            [[Set the form of the given primitive.

              Form defines which function will be chosen to set data to mesh
              on call of evas_canvas3d_mesh_primitive_set.

              Now available next forms of primitives are tabulated primitives (SQUARE and CUBE),
              solids of revolution (CYLINDER, CONE, SPHERE and TORUS) and surfaces (SURFACE and TERRAIN).

              Default form is EVAS_CANVAS3D_MESH_PRIMITIVE_NONE.]]
         }
         get {
             [[Get the form of the given primitive.

               See also @.form.set.]]
         }
         values {
            form: Evas.Canvas3D.Mesh_Primitive; [[Form of primitive.]]
         }
      }
      @property mode {
         set {
             [[Set the mode of the given primitive.

               Mode defines which function will be chosen to set data to mesh
               on call of evas_canvas3d_mesh_primitive_set. It helps to choose
               an alternative algorithm for primitives with a given form,
               such as a cone without a base or sphere textured in alternative way.

               Mods of primitives are now available
               without base (bases) (supported for cylinder and cone) and
               with alternative UV (supported by sphere).

               Default form is EVAS_CANVAS3D_PRIMITIVE_MODE_DEFAULT.]]
         }
         get {
             [[Get the mode of the given primitive.

               See also @.mode.set.]]
         }
         values {
            mode: Evas.Canvas3D.Primitive_Mode; [[Mode of primitive.]]
         }
      }
      @property ratio {
         set {
             [[Set the ratio of the given primitive.

               Ratio is used only in torus as the ratio of the
               major radius and minor radius. For this usage
               Available values is from 1.0 to infinity.
               If ratio for torus has a bad value,
               3.0 will be used as the ratio.

               Default ratio is 3.0.]]
         }
         get {
             [[Get the ratio of the given primitive.

               See also @.ratio.set.]]
         }
         values {
            ratio: Evas.Real; [[Ratio of primitive.]]
         }
      }
      @property precision {
         set {
             [[Set the precision of the given primitive.

               Precision is used in all non tabulated primitives and defines
               the precision of created primitives.
               Available values range from 3 to infinity.
               If the value is more than 100, you may see a warning
               about possibility of incorrect values or slow processing.

               Default ratio is 10.]]
         }
         get {
             [[Get the precision of the given primitive.

               See also @.precision.set.]]
         }
         values {
            precision: int; [[Precision of primitive.]]
         }
      }
      @property surface {
         set {
             [[Set the surface of the given primitive.

               Surface is used only in surface primitives and defines
               the equation of filling mesh data on call of
               evas_canvas3d_mesh_primitive_set.

               This allows you to create customers primitives like
               shell, heart, hyperbolic paraboloid etc. See _shell_func in
               examples/evas/evas-3d-visual-test.c or _perlin_terrain in
               modules/evas/primitives/surfaces/terrain.c for usage examples.

               Default surface is $null]]
         }
         values {
            surface: ptr(Evas.Canvas3D.Surface_Func); [[Pointer to customers surface function.]]
         }
      }
      @property tex_scale {
         set {
             [[Set the texture scale of the given primitive.

               Texture scale uses in all non tabulated primitives
               and defines scale of texture coordinates or primitives.

               It uses to create periodical textured meshes.

               Default tex_scale is {1.0, 1.0}]]
         }
         get {
             [[Get the texture scale of the given primitive.

               See also @.tex_scale.set.]]
         }
         values {
            tex_scale_x: Evas.Real; [[Texture scale X coordinate]]
            tex_scale_y: Evas.Real; [[Texture scale Y coordinate]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      @empty Evas.Canvas3D.Object.update_notify;
      @empty Evas.Canvas3D.Object.change_notify;
      @empty Evas.Canvas3D.Object.callback_register;
      @empty Evas.Canvas3D.Object.callback_unregister;
   }
}