1 #ifndef DALI_TOOLKIT_MESH_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_MESH_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 MeshVisual is to render a mesh using a .obj file, optionally with textures provided by a mtl file.
43 * @brief MeshVisual Property
50 * @brief MeshVisual Property
56 * @brief The location of the ".obj" file.
57 * @details Name "objectUrl", type Property::STRING.
61 OBJECT_URL = VISUAL_PROPERTY_START_INDEX,
64 * @brief The location of the ".mtl" file.
65 * @details Name "materialUrl", type Property::STRING.
67 * @note Optional. If not specified, then a textureless object is assumed.
72 * @brief Path to the directory the textures (including gloss and normal) are stored in.
73 * @details Name "texturesPath", type Property::STRING.
75 * @note Mandatory if using material.
80 * @brief Sets the type of shading mode that the mesh will use.
81 * @details Name "shadingMode", type ShadingMode::Value (Property::INTEGER) or Property::STRING.
82 * 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.
84 * @note Optional. If not specified, it will use the best it can support (will try ShadingMode::TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING first).
85 * @see ShadingMode::Value
90 * @brief Whether to use mipmaps for textures or not.
91 * @details Name "useMipmapping", type Property::BOOLEAN.
93 * @note Optional. If not specified, the default is true.
98 * @brief Whether to average normals at each point to smooth textures or not.
99 * @details Name "useSoftNormals", type Property::BOOLEAN.
101 * @note Optional. If not specified, the default is true.
106 * @brief The position, in stage space, of the point light that applies lighting to the model.
107 * @details Name "lightPosition", type Property::VECTOR3.
108 * This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center,
109 * and using all zeroes will place the light at the top left corner.
111 * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
116 } // namespace Property
119 * @brief The shading mode used by MeshVisual.
122 namespace ShadingMode
126 * @brief The shading mode used by MeshVisual.
131 TEXTURELESS_WITH_DIFFUSE_LIGHTING, ///< *Simplest*. One color that is lit by ambient and diffuse lighting. @SINCE_1_1.45
132 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
133 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
136 } // namespace ShadingMode
138 } // namespace MeshVisual
144 } // namespace Toolkit
148 #endif // DALI_TOOLKIT_MESH_VISUAL_PROPERTIES_H