1 #ifndef DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H
2 #define DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H
4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include <dali/public-api/actors/actor.h>
22 #include <dali/public-api/rendering/shader.h>
26 #include <dali-scene3d/public-api/api.h>
28 namespace Dali::Scene3D::Loader
30 struct MeshDefinition;
33 struct DALI_SCENE3D_API BlendShapes
52 // shader properties - animatable (uniforms)
53 static const char* NUMBER_OF_BLEND_SHAPES; ///< Integer number of blend shapes loaded.
54 static const char* UNNORMALIZE_FACTOR; ///< Scalar(s) for position components of blend shapes; Version 1.0: float array (1 per blend shape); Version 2.0: single float.
55 static const char* COMPONENT_SIZE; ///< Integer offset from one component (positions / normals / tangents) of a blend shape to the next.
57 // shader properties - read-only (not available as uniforms)
58 static const char* COMPONENTS; ///< Integer bitmask of the blend shape components that the shader uses; refer to the Components enum.
60 // actor property (instance) - animatable (uniforms)
61 static const char* WEIGHTS_UNIFORM; ///< The weight of each blend shape in a float array
64 * @brief Registers properties based on the mesh definition (and geometry) and identified by the above string constants,
65 * on the given @a shader and @a actor.
67 static void ConfigureProperties(const std::pair<MeshDefinition, MeshGeometry>& mesh, Shader shader, Actor actor);
69 BlendShapes() = delete;
72 } // namespace Dali::Scene3D::Loader
74 #endif // DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H