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.
21 #include "game-renderer.h"
23 #include <dali/public-api/actors/actor.h>
26 * @brief The GameEntity class
27 * GameEntity wraps the Dali::Actor class and binds the GameRenderer with
28 * loaded entity. Entities are owned by the GameScene and populated when
29 * scene is being deserialized.
35 * Creates an instance of GameEntity with given name
36 * @param[in] name Name of created entity
38 GameEntity(const char* name);
41 * Destroys an instance of GameEntity
46 * Returns the GameRenderer object
48 GameRenderer& GetGameRenderer();
51 * Returns associated DALi actor
52 * @return Returns actor associated with this GameEntity
54 Dali::Actor& GetActor();
57 * Sets location of entity
58 * @param[in] location Local position of entity
60 void SetLocation(const Dali::Vector3& location);
63 * Sets rotation of entity
64 * @param[in] rotation Local rotation of entity
66 void SetRotation(const Dali::Quaternion& rotation);
69 * Sets scale of entity
70 * @param[in] scale Local scale of entity
72 void SetScale(const Dali::Vector3& scale);
76 * @param[in] size Bounding box of entity
78 void SetSize(const Dali::Vector3& size);
81 * Updates Dali::Renderer in case if anything changed ( geometry, texture, etc. )
83 void UpdateRenderer();
87 GameRenderer mGameRenderer;