1 #ifndef DALI_DEMO_MODELSKYBOX_H
2 #define DALI_DEMO_MODELSKYBOX_H
5 * Copyright (c) 2017 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/public-api/actors/actor.h>
23 #include <dali/public-api/rendering/renderer.h>
43 * @brief Initializes an Actor for the Physically Based Rendering.
45 * @note Call InitTexture() before calling this method.
47 * It creates a geometry for the renderer.
48 * According to the parameter @p modelType it may create a @e quad, a @e sphere or load a model.
49 * If @p modelType is @e MODEL, the @p modelUrl parameter needs to be set with a valid url pointing a file with a @e obj model.
51 * A renderer is created with the geometry and the shader and it's set to the an actor that can be retrieved by calling GetActor().
52 * The @p position and @p size is set to the actor.
54 * @param[in] shader The Physically Based Rendering shader.
55 * @param[in] modelType The type of geometry.
56 * @param[in] modelUrl The url of the model if the paramterer @p modelType is @e MODEL.
57 * @param[in] position The position of the actor.
58 * @param[in] size The size of the actor.
60 void Init( const Vector3& size );
63 * @brief Initializes the @p mTextureSet member with the needed textures for Physically Based Rendering.
65 * @param[in] albedoMetalTexture The albedo metal texture.
66 * @param[in] normalRoughTexture The normal rough texture.
67 * @param[in] diffuseTexture The diffuse texture.
68 * @param[in] specularTexture The specular texture.
70 void InitTexture( Texture texSkybox );
73 * @brief Retrieves the actor created by calling the Init() method.
75 * @return The Actor for the Physically Based Rendering.
82 * @brief Creates a geometry from a @e obj model.
84 * @param[in] url A url pointing a file with a @e obj model.
86 * @return The geometry.
88 Geometry CreateGeometry();
91 TextureSet mTextureSet;
94 #endif // DALI_DEMO_MODELSKYBOX_H