1 #ifndef DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
31 * @addtogroup dali_toolkit_visuals
36 * @brief PrimitiveVisual is to render a simple 3D shape, such as a cube or sphere.
39 namespace PrimitiveVisual
43 * @brief PrimitiveVisual Property
50 * @brief PrimitiveVisual Property
56 * @brief The specific shape to render.
57 * @details Name "shape", type Shape::Type (Property::INTEGER) or Property::STRING.
59 * @note Optional. If not specified, the default is Shape::SPHERE.
62 SHAPE = VISUAL_PROPERTY_START_INDEX,
65 * @brief The color of the shape.
66 * @details Name "mixColor", type Property::VECTOR4.
68 * @note Optional. If not specified, the default is Vector4(0.5, 0.5, 0.5, 1.0).
69 * @note Applies to ALL shapes.
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.
78 * @note Optional. If not specified, the default is 128.
81 * - Shape::CONICAL_FRUSTRUM
84 * @note The range is from 1 to 255.
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.
93 * @note Optional. If not specified, the default is 128.
96 * @note The range is from 1 to 255.
101 * @brief The scale of the radius of the top circle of a conical frustrum.
102 * @details Name "scaleTopRadius", type Property::FLOAT.
104 * @note Optional. If not specified, the default is 1.0f.
106 * - Shape::CONICAL_FRUSTRUM
107 * @note Only values greater than or equal to 0.0f are accepted.
112 * @brief The scale of the radius of the bottom circle of a conical frustrum.
113 * @details Name "scaleBottomRadius", type Property::FLOAT.
115 * @note Optional. If not specified, the default is 1.5f.
117 * - Shape::CONICAL_FRUSTRUM
119 * @note Only values greater than or equal to 0.0f are accepted.
124 * @brief The scale of the height of a conic.
125 * @details Name "scaleHeight", type Property::FLOAT.
127 * @note Optional. If not specified, the default is 3.0f.
129 * - Shape::CONICAL_FRUSTRUM
132 * @note Only values greater than or equal to 0.0f are accepted.
137 * @brief The scale of the radius of a cylinder.
138 * @details Name "scaleRadius", type Property::FLOAT.
140 * @note Optional. If not specified, the default is 1.0f.
143 * @note Only values greater than or equal to 0.0f are accepted.
148 * @brief The dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
149 * @details Name "scaleDimensions", type Property::VECTOR3.
151 * @note Optional. If not specified, the default is Vector3::ONE.
154 * - Shape::OCTAHEDRON
155 * - Shape::BEVELLED_CUBE
156 * @note Each vector3 parameter should be greater than or equal to 0.0f.
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.
165 * @note Optional. If not specified, the default is 0.0f (no bevel).
167 * - Shape::BEVELLED_CUBE
168 * @note The range is from 0.0f to 1.0f.
173 * @brief Defines how smooth the bevelled edges should be.
174 * @details Name "bevelSmoothness", type Property::FLOAT.
176 * @note Optional. If not specified, the default is 0.0f (sharp edges).
178 * - Shape::BEVELLED_CUBE
179 * @note The range is from 0.0f to 1.0f.
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.
189 * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
190 * @note Applies to ALL shapes.
195 } // namespace Property
198 * @brief The primitive shape to render as a PrimitiveVisual.
205 * @brief The primitive shape to render as a PrimitiveVisual.
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
220 } // namespace PrimitiveVisual
226 } // namespace Toolkit
230 #endif // DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H