remove (unnecessarily) exported signal and action names
[platform/core/uifw/dali-core.git] / dali / public-api / actors / model-actor-factory.h
1 #ifndef __DALI_MODEL_ACTOR_FACTORY_H__
2 #define __DALI_MODEL_ACTOR_FACTORY_H__
3
4 /*
5  * Copyright (c) 2014 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 // EXTERNAL INCLUDES
22 #include <cstddef>
23 #include <string>
24
25 // INTERNAL INCLUDES
26 #include <dali/public-api/animation/alpha-functions.h>
27
28
29
30 namespace Dali
31 {
32
33 class Actor;
34 class Animation;
35 class Model;
36
37 /**
38  * @brief This factory class is used to generate actors and animations from a model resource.
39  */
40 class DALI_IMPORT_API ModelActorFactory
41 {
42 public:
43
44   /**
45    * @brief Create an initialized Actor and child actors.
46    *
47    * This tree of actors is either the entire model
48    * (use an empty name), or a specific entity within the model
49    * (specify by entity name).
50    *
51    * These child actors may be accessed by using either Actor::GetChildren()
52    * or Actor::FindChildByName()
53    *
54    * SetSize() (or an equivalent) should be called on this root actor
55    * to scale the actor and it's children to fit within the required
56    * screen volume. Note that if any of the size coordinates are zero,
57    * (including Z), then the model will not display.
58    *
59    * @pre the model has finished loading
60    * @param[in] model A loaded model object
61    * @param[in] name of the entity to create.
62    * @return A handle to a newly allocated Dali resource.
63    */
64   static Actor BuildActorTree(Model& model, const std::string& name);
65
66   /**
67    * @brief Create an animation on the actor and child actors using the indexed animation map.
68    *
69    * If the animation map does not exist in the model, then this returns an uninitialised
70    * handle. Uses the duration from the model. Note, changing the duration of the animation
71    * will not change the duration of the animators. Instead, use the other variant of this method.
72    * @param[in] model A model resource handle
73    * @param[in] actor An actor tree (generated by BuildActorTree) to animate
74    * @param[in] index The index of the animation
75    * @return A handle to an animation, or uninitialised.
76    */
77   static Animation BuildAnimation(Model& model, Actor actor, size_t index);
78
79   /**
80    * @brief Create an animation on the actor and child actors using the indexed animation map.
81    *
82    * If the animation map does not exist in the model, then this returns an uninitialised
83    * handle.
84    * @param[in] model A model resource handle
85    * @param[in] actor An actor tree (generated by BuildActorTree) to animate
86    * @param[in] index The index of the animation
87    * @param[in] durationSeconds The duration in seconds to run the effect over
88    * @return A handle to an animation, or uninitialised.
89    */
90   static Animation BuildAnimation(Model& model, Actor actor, size_t index, float durationSeconds);
91
92   /**
93    * @brief Create an animation on the actor and child actors using the indexed animation map.
94    *
95    * If the animation map does not exist in the model, then this returns an uninitialised
96    * handle.
97    * @param[in] model A model resource handle
98    * @param[in] actor An actor tree (generated by BuildActorTree) to animate
99    * @param[in] index The index of the animation
100    * @param[in] alpha The alpha function to apply to the overall progress.
101    * @return A handle to an animation, or uninitialised.
102    */
103   static Animation BuildAnimation(Model& model, Actor actor, size_t index, AlphaFunction alpha);
104
105   /**
106    * @brief Create an animation on the actor and child actors using the indexed animation map.
107    *
108    * If the animation map does not exist in the model, then this returns an uninitialised
109    * handle.
110    * @param[in] model A model resource handle
111    * @param[in] actor An actor tree (generated by BuildActorTree) to animate
112    * @param[in] index The index of the animation
113    * @param[in] durationSeconds The duration in seconds to run the effect over
114    * @param[in] alpha The alpha function to apply to the overall progress.
115    * @return A handle to an animation, or uninitialised.
116    */
117   static Animation BuildAnimation(Model& model, Actor actor, size_t index, AlphaFunction alpha, float durationSeconds);
118
119 };
120
121 } // namespace Dali
122
123
124 #endif /* __DALI_MODEL_ACTOR_FACTORY_H__ */