1 #ifndef __DALI_TOOLKIT_MODEL3D_VIEW_H__
2 #define __DALI_TOOLKIT_MODEL3D_VIEW_H__
5 * Copyright (c) 2015 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/controls/control.h>
30 namespace Internal DALI_INTERNAL
35 * @brief Model3dView is a control for displaying 3d geometry.
37 * All the geometry loaded with the control is automatically centered and scaled to fit
38 * the size of all the other controls. So the max is (0.5,0.5) and the min is (-0.5,-0.5)
42 class DALI_IMPORT_API Model3dView : public Control
47 * @brief The start and end property ranges for this control.
51 PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
52 PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices
54 ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
55 ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices
59 * @brief An enumeration of properties belonging to the TextLabel class.
65 GEOMETRY_URL = PROPERTY_START_INDEX, ///< name "geometryUrl", The path to the geometry file, type STRING
66 MATERIAL_URL, ///< name "materialUrl", The path to the material file, type STRING
67 IMAGES_URL, ///< name "imagesUrl", The path to the images directory, type STRING
68 ILLUMINATION_TYPE, ///< name "illuminationType", The type of illumination, type INTEGER
69 TEXTURE0_URL, ///< name "texture0Url", The path to first texture, type STRING
70 TEXTURE1_URL, ///< name "texture1Url", The path to second texture, type STRING
71 TEXTURE2_URL, ///< name "texture2Url", The path to third texture, type STRING
73 LIGHT_POSITION = ANIMATABLE_PROPERTY_START_INDEX ///< name "lightPosition", The coordinates of the light, type Vector3
81 DIFFUSE_WITH_NORMAL_MAP
86 * @brief Create a new instance of a Model3dView control.
88 * @return A handle to the new Model3dView control.
90 static Model3dView New();
93 * @brief Create a new instance of a Model3dView control.
95 * @return A handle to the new Model3dView control.
97 static Model3dView New( const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl );
101 * @brief Create an uninitialized Model3dView
103 * Only derived versions can be instantiated. Calling member
104 * functions with an uninitialized Dali::Object is not allowed.
111 * This is non-virtual since derived Handle types must not contain data or virtual methods.
116 * @brief Copy constructor.
118 Model3dView( const Model3dView& model3dView );
121 * @brief Assignment operator.
123 Model3dView& operator=( const Model3dView& model3dView );
126 * @brief Downcast an Object handle to Model3dView.
128 * If handle points to a Model3dView the downcast produces valid
129 * handle. If not the returned handle is left uninitialized.
131 * @param[in] handle Handle to an object
132 * @return handle to a Model3dView or an uninitialized handle
134 static Model3dView DownCast( BaseHandle handle );
136 public: // Not intended for application developers
139 * @brief Creates a handle using the Toolkit::Internal implementation.
141 * @param[in] implementation The Control implementation.
143 DALI_INTERNAL Model3dView( Internal::Model3dView& implementation );
146 * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
148 * @param[in] internal A pointer to the internal CustomActor.
150 DALI_INTERNAL Model3dView( Dali::Internal::CustomActor* internal );
154 } // namespace Toolkit
158 #endif // __DALI_TOOLKIT_MODEL3D_VIEW_H__