Update doxygen comments
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / primitive-visual-properties.h
1 #ifndef DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 /**
31  * @addtogroup dali_toolkit_visuals
32  * @{
33  */
34
35 /**
36  * @brief PrimitiveVisual is to render a simple 3D shape, such as a cube or sphere.
37  * @SINCE_1_1.45
38  */
39 namespace PrimitiveVisual
40 {
41
42 /**
43  * @brief PrimitiveVisual Property.
44  * @SINCE_1_1.45
45  */
46 namespace Property
47 {
48
49 /**
50  * @brief Enumeration for the instance of properties belonging to the PrimitiveVisual.
51  * @SINCE_1_1.45
52  */
53 enum
54 {
55   /**
56    * @brief The specific shape to render.
57    * @details Name "shape", type Shape::Type (Property::INTEGER) or Property::STRING.
58    * @SINCE_1_1.45
59    * @note Optional. If not specified, the default is Shape::SPHERE.
60    * @see Shape::Type
61    */
62   SHAPE = VISUAL_PROPERTY_START_INDEX,
63
64   /**
65    * @brief The color of the shape.
66    * @details Name "mixColor", type Property::VECTOR4.
67    * @SINCE_1_2_4
68    * @note Optional. If not specified, the default is Vector4(0.5, 0.5, 0.5, 1.0).
69    * @note Applies to ALL shapes.
70    */
71   MIX_COLOR,
72
73   /**
74    * @brief The number of slices as you go around the shape.
75    * @details Name "slices", type Property::INTEGER.
76    * For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
77    * @SINCE_1_1.45
78    * @note Optional. If not specified, the default is 128.
79    * @note Applies to:
80    *      - Shape::SPHERE
81    *      - Shape::CONICAL_FRUSTRUM
82    *      - Shape::CONE
83    *      - Shape::CYLINDER
84    * @note The range is from 1 to 255.
85    */
86   SLICES,
87
88   /**
89    * @brief The number of stacks as you go down the shape.
90    * @details Name "stacks", type Property::INTEGER.
91    * For spheres, 'stacks' determines how many layers there are as you go down the object.
92    * @SINCE_1_1.45
93    * @note Optional. If not specified, the default is 128.
94    * @note Applies to:
95    *      - Shape::SPHERE
96    * @note The range is from 1 to 255.
97    */
98   STACKS,
99
100   /**
101    * @brief The scale of the radius of the top circle of a conical frustrum.
102    * @details Name "scaleTopRadius", type Property::FLOAT.
103    * @SINCE_1_1.45
104    * @note Optional. If not specified, the default is 1.0f.
105    * @note Applies to:
106    *      - Shape::CONICAL_FRUSTRUM
107    * @note Only values greater than or equal to 0.0f are accepted.
108    */
109   SCALE_TOP_RADIUS,
110
111   /**
112    * @brief The scale of the radius of the bottom circle of a conical frustrum.
113    * @details Name "scaleBottomRadius", type Property::FLOAT.
114    * @SINCE_1_1.45
115    * @note Optional. If not specified, the default is 1.5f.
116    * @note Applies to:
117    *      - Shape::CONICAL_FRUSTRUM
118    *      - Shape::CONE
119    * @note Only values greater than or equal to 0.0f are accepted.
120    */
121   SCALE_BOTTOM_RADIUS,
122
123   /**
124    * @brief The scale of the height of a conic.
125    * @details Name "scaleHeight", type Property::FLOAT.
126    * @SINCE_1_1.45
127    * @note Optional. If not specified, the default is 3.0f.
128    * @note Applies to:
129    *      - Shape::CONICAL_FRUSTRUM
130    *      - Shape::CONE
131    *      - Shape::CYLINDER
132    * @note Only values greater than or equal to 0.0f are accepted.
133    */
134   SCALE_HEIGHT,
135
136   /**
137    * @brief The scale of the radius of a cylinder.
138    * @details Name "scaleRadius", type Property::FLOAT.
139    * @SINCE_1_1.45
140    * @note Optional. If not specified, the default is 1.0f.
141    * @note Applies to:
142    *      - Shape::CYLINDER
143    * @note Only values greater than or equal to 0.0f are accepted.
144    */
145   SCALE_RADIUS,
146
147   /**
148    * @brief The dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
149    * @details Name "scaleDimensions", type Property::VECTOR3.
150    * @SINCE_1_1.45
151    * @note Optional. If not specified, the default is Vector3::ONE.
152    * @note Applies to:
153    *      - Shape::CUBE
154    *      - Shape::OCTAHEDRON
155    *      - Shape::BEVELLED_CUBE
156    * @note Each vector3 parameter should be greater than or equal to 0.0f.
157    */
158   SCALE_DIMENSIONS,
159
160   /**
161    * @brief Determines how bevelled the cuboid should be, based off the smallest dimension.
162    * @details Name "bevelPercentage", type Property::FLOAT.
163    * Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.
164    * @SINCE_1_1.45
165    * @note Optional. If not specified, the default is 0.0f (no bevel).
166    * @note Applies to:
167    *      - Shape::BEVELLED_CUBE
168    * @note The range is from 0.0f to 1.0f.
169    */
170   BEVEL_PERCENTAGE,
171
172   /**
173    * @brief Defines how smooth the bevelled edges should be.
174    * @details Name "bevelSmoothness", type Property::FLOAT.
175    * @SINCE_1_1.45
176    * @note Optional. If not specified, the default is 0.0f (sharp edges).
177    * @note Applies to:
178    *      - Shape::BEVELLED_CUBE
179    * @note The range is from 0.0f to 1.0f.
180    */
181   BEVEL_SMOOTHNESS,
182
183   /**
184    * @brief The position, in stage space, of the point light that applies lighting to the model.
185    * @details Name "lightPosition", type Property::VECTOR3.
186    * This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center,
187    * and using all zeroes will place the light at the top left corner.
188    * @SINCE_1_1.45
189    * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
190    * @note Applies to ALL shapes.
191    */
192   LIGHT_POSITION,
193 };
194
195 } // namespace Property
196
197 /**
198  * @brief The primitive shape to render as a PrimitiveVisual.
199  * @SINCE_1_1.45
200  */
201 namespace Shape
202 {
203
204 /**
205  * @brief The primitive shape to render as a PrimitiveVisual.
206  * @SINCE_1_1.45
207  */
208 enum Type
209 {
210   SPHERE, ///< A perfectly round geometrical object in three-dimensional space. @SINCE_1_1.45
211   CONICAL_FRUSTRUM, ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
212   CONE, ///< Equivalent to a conical frustrum with top radius of zero. @SINCE_1_1.45
213   CYLINDER, ///< Equivalent to a conical frustrum with equal radii for the top and bottom circles. @SINCE_1_1.45
214   CUBE, ///< Equivalent to a bevelled cube with a bevel percentage of zero. @SINCE_1_1.45
215   OCTAHEDRON, ///< Equivalent to a bevelled cube with a bevel percentage of one. @SINCE_1_1.45
216   BEVELLED_CUBE, ///< A cube/cuboid with all edges flattened to some degree. @SINCE_1_1.45
217 };
218 }
219
220 } // namespace PrimitiveVisual
221
222 /**
223  * @}
224  */
225
226 } // namespace Toolkit
227
228 } // namespace Dali
229
230 #endif // DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H