29b50f25412ee767ca5addc02b77cd7447b1fe4b
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / mesh-visual-properties.h
1 #ifndef DALI_TOOLKIT_MESH_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_MESH_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 namespace MeshVisual
31 {
32
33 namespace Property
34 {
35
36 enum
37 {
38   /**
39    * @brief The location of the ".obj" file.
40    * @details Name "objectUrl", type Property::STRING.
41    * @SINCE_1_1.45
42    * @note Mandatory.
43    */
44   OBJECT_URL = VISUAL_PROPERTY_START_INDEX,
45
46   /**
47    * @brief The location of the ".mtl" file.
48    * @details Name "materialUrl", type Property::STRING.
49    * @SINCE_1_1.45
50    * @note Optional. If not specified, then a textureless object is assumed.
51    */
52   MATERIAL_URL,
53
54   /**
55    * @brief Path to the directory the textures (including gloss and normal) are stored in.
56    * @details Name "texturesPath", type Property::STRING.
57    * @SINCE_1_1.45
58    * @note Mandatory if using material.
59    */
60   TEXTURES_PATH,
61
62   /**
63    * @brief Sets the type of shading mode that the mesh will use.
64    * @details Name "shadingMode", type ShadingMode::Value (Property::INTEGER) or Property::STRING.
65    * If anything the specified shading mode requires is missing, a simpler mode that can be handled with what has been supplied will be used instead.
66    * @SINCE_1_1.45
67    * @note Optional. If not specified, it will use the best it can support (will try ShadingMode::TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING first).
68    * @see ShadingMode::Value
69    */
70   SHADING_MODE,
71
72   /**
73    * @brief Whether to use mipmaps for textures or not.
74    * @details Name "useMipmapping", type Property::BOOLEAN.
75    * @SINCE_1_1.45
76    * @note Optional. If not specified, the default is true.
77    */
78   USE_MIPMAPPING,
79
80   /**
81    * @brief Whether to average normals at each point to smooth textures or not.
82    * @details Name "useSoftNormals", type Property::BOOLEAN.
83    * @SINCE_1_1.45
84    * @note Optional. If not specified, the default is true.
85    */
86   USE_SOFT_NORMALS,
87
88   /**
89    * @brief The position, in stage space, of the point light that applies lighting to the model.
90    * @details Name "lightPosition", type Property::VECTOR3.
91    * This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center,
92    * and using all zeroes will place the light at the top left corner.
93    * @SINCE_1_1.45
94    * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
95    */
96   LIGHT_POSITION,
97 };
98
99 } // namespace Property
100
101 namespace ShadingMode
102 {
103
104 enum Value
105 {
106   TEXTURELESS_WITH_DIFFUSE_LIGHTING, ///< *Simplest*. One color that is lit by ambient and diffuse lighting. @SINCE_1_1.45
107   TEXTURED_WITH_SPECULAR_LIGHTING, ///< Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. @SINCE_1_1.45
108   TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING ///< Uses all textures provided including a gloss, normal and texture map along with specular, ambient and diffuse lighting. @SINCE_1_1.45
109 };
110
111 } // namespace ShadingMode
112
113 } // namespace MeshVisual
114
115 } // namespace Toolkit
116
117 } // namespace Dali
118
119 #endif // DALI_TOOLKIT_MESH_VISUAL_PROPERTIES_H