1 #ifndef DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
5 * Copyright (c) 2020 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>
29 * @addtogroup dali_toolkit_visuals
34 * @brief PrimitiveVisual is to render a simple 3D shape, such as a cube or sphere.
37 namespace PrimitiveVisual
40 * @brief PrimitiveVisual Property.
46 * @brief Enumeration for the instance of properties belonging to the PrimitiveVisual.
52 * @brief The specific shape to render.
53 * @details Name "shape", type Shape::Type (Property::INTEGER) or Property::STRING.
55 * @note Optional. If not specified, the default is Shape::SPHERE.
58 SHAPE = VISUAL_PROPERTY_START_INDEX,
61 * @brief The color of the shape.
62 * @details Name "mixColor", type Property::VECTOR4.
64 * @note Optional. If not specified, the default is Vector4(0.5, 0.5, 0.5, 1.0).
65 * @note Applies to ALL shapes.
70 * @brief The number of slices as you go around the shape.
71 * @details Name "slices", type Property::INTEGER.
72 * For spheres and conical frustums, this determines how many divisions there are as you go around the object.
74 * @note Optional. If not specified, the default is 128.
77 * - Shape::CONICAL_FRUSTUM
80 * @note The range is from 1 to 255.
85 * @brief The number of stacks as you go down the shape.
86 * @details Name "stacks", type Property::INTEGER.
87 * For spheres, 'stacks' determines how many layers there are as you go down the object.
89 * @note Optional. If not specified, the default is 128.
92 * @note The range is from 1 to 255.
97 * @brief The scale of the radius of the top circle of a conical frustum.
98 * @details Name "scaleTopRadius", type Property::FLOAT.
100 * @note Optional. If not specified, the default is 1.0f.
102 * - Shape::CONICAL_FRUSTUM
103 * @note Only values greater than or equal to 0.0f are accepted.
108 * @brief The scale of the radius of the bottom circle of a conical frustum.
109 * @details Name "scaleBottomRadius", type Property::FLOAT.
111 * @note Optional. If not specified, the default is 1.5f.
113 * - Shape::CONICAL_FRUSTUM
115 * @note Only values greater than or equal to 0.0f are accepted.
120 * @brief The scale of the height of a conic.
121 * @details Name "scaleHeight", type Property::FLOAT.
123 * @note Optional. If not specified, the default is 3.0f.
125 * - Shape::CONICAL_FRUSTUM
128 * @note Only values greater than or equal to 0.0f are accepted.
133 * @brief The scale of the radius of a cylinder.
134 * @details Name "scaleRadius", type Property::FLOAT.
136 * @note Optional. If not specified, the default is 1.0f.
139 * @note Only values greater than or equal to 0.0f are accepted.
144 * @brief The dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
145 * @details Name "scaleDimensions", type Property::VECTOR3.
147 * @note Optional. If not specified, the default is Vector3::ONE.
150 * - Shape::OCTAHEDRON
151 * - Shape::BEVELLED_CUBE
152 * @note Each vector3 parameter should be greater than or equal to 0.0f.
157 * @brief Determines how bevelled the cuboid should be, based off the smallest dimension.
158 * @details Name "bevelPercentage", type Property::FLOAT.
159 * 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.
161 * @note Optional. If not specified, the default is 0.0f (no bevel).
163 * - Shape::BEVELLED_CUBE
164 * @note The range is from 0.0f to 1.0f.
169 * @brief Defines how smooth the bevelled edges should be.
170 * @details Name "bevelSmoothness", type Property::FLOAT.
172 * @note Optional. If not specified, the default is 0.0f (sharp edges).
174 * - Shape::BEVELLED_CUBE
175 * @note The range is from 0.0f to 1.0f.
180 * @brief The position, in stage space, of the point light that applies lighting to the model.
181 * @details Name "lightPosition", type Property::VECTOR3.
182 * This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center,
183 * and using all zeroes will place the light at the top left corner.
185 * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
186 * @note Applies to ALL shapes.
191 } // namespace Property
194 * @brief The primitive shape to render as a PrimitiveVisual.
200 * @brief The primitive shape to render as a PrimitiveVisual.
205 SPHERE, ///< A perfectly round geometrical object in three-dimensional space. @SINCE_1_1.45
206 CONICAL_FRUSTUM, ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_3.15
207 CONE, ///< Equivalent to a conical frustum with top radius of zero. @SINCE_1_1.45
208 CYLINDER, ///< Equivalent to a conical frustum with equal radii for the top and bottom circles. @SINCE_1_1.45
209 CUBE, ///< Equivalent to a bevelled cube with a bevel percentage of zero. @SINCE_1_1.45
210 OCTAHEDRON, ///< Equivalent to a bevelled cube with a bevel percentage of one. @SINCE_1_1.45
211 BEVELLED_CUBE ///< A cube/cuboid with all edges flattened to some degree. @SINCE_1_1.45
215 } // namespace PrimitiveVisual
221 } // namespace Toolkit
225 #endif // DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H