// EXTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali/devel-api/common/map-wrapper.h>
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/animation/animation.h>
class Model : public Dali::Toolkit::Internal::Control, public LightObserver
{
public:
- using AnimationData = std::pair<std::string, Dali::Animation>;
- using CameraData = Loader::CameraParameters;
+ using AnimationData = std::pair<std::string, Dali::Animation>;
+ using CameraData = Loader::CameraParameters;
+ using BlendShapeModelNodeMap = std::map<std::string, std::vector<Scene3D::ModelNode>>;
/**
* @copydoc Model::New()
*/
Scene3D::ModelNode FindChildModelNodeByName(std::string_view nodeName);
+ /**
+ * @copydoc Model::RetrieveBlendShapeNames()
+ */
+ void RetrieveBlendShapeNames(std::vector<std::string>& blendShapeNames) const;
+
+ /**
+ * @copydoc Model::RetrieveModelNodesByBlendShapeName()
+ */
+ void RetrieveModelNodesByBlendShapeName(std::string_view blendShapeName, std::vector<Scene3D::ModelNode>& modelNodes) const;
+
+ /**
+ * @copydoc Model::GenerateMotionDataAnimation()
+ */
+ Dali::Animation GenerateMotionDataAnimation(Scene3D::MotionData motionData);
+
+ /**
+ * @copydoc Model::SetMotionData()
+ */
+ void SetMotionData(Scene3D::MotionData motionData);
+
protected:
/**
* @brief Constructs a new Model.
public: // Overrides LightObserver Methods.
/**
+ * @copydoc Dali::Scene3D::Internal::LightObserver::NotifyShadowMapTexture()
+ */
+ void NotifyShadowMapTexture(Dali::Texture shadowMapTexture) override;
+
+ /**
* @copydoc Dali::Scene3D::Internal::LightObserver::NotifyImageBasedLightTexture()
*/
void NotifyImageBasedLightTexture(Dali::Texture diffuseTexture, Dali::Texture specularTexture, float scaleFactor, uint32_t specularMipmapLevels) override;
*/
void NotifyImageBasedLightScaleFactor(float scaleFactor) override;
- /**
- * @copydoc Dali::Scene3D::Internal::LightObserver::NotifyLightAdded()
- */
- void NotifyLightAdded(uint32_t lightIndex, Scene3D::Light light) override;
-
- /**
- * @copydoc Dali::Scene3D::Internal::LightObserver::NotifyLightRemoved()
- */
- void NotifyLightRemoved(uint32_t lightIndex) override;
-
private:
/**
* @brief Asynchronously model loading finished.
*/
void ResetCameraParameters();
+ /**
+ * @brief Collect ModelNode list by blendshape name
+ */
+ void UpdateBlendShapeNodeMap();
+
private:
std::string mModelUrl;
std::string mResourceDirectoryUrl;
WeakHandle<Scene3D::SceneView> mParentSceneView;
Dali::PropertyNotification mSizeNotification;
- // Light
- std::vector<Scene3D::Light> mLights;
+ Dali::Scene3D::Loader::ShaderManagerPtr mShaderManager;
+
+ // List of ModelNode for name of blend shape.
+ BlendShapeModelNodeMap mBlendShapeModelNodeMap;
// Asynchronous loading variable
ModelLoadTaskPtr mModelLoadTask;
EnvironmentMapLoadTaskPtr mIblDiffuseLoadTask;
EnvironmentMapLoadTaskPtr mIblSpecularLoadTask;
+ // Shadow
+ Dali::Texture mShadowMapTexture;
+
std::string mDiffuseIblUrl;
std::string mSpecularIblUrl;