X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-scene3d%2Finternal%2Fcontrols%2Fmodel%2Fmodel-impl.h;h=d7924bfbbeb846b43a7e49e9312400e2dee52957;hb=c1236a21a2ddc2da56cb8d54b4ab7e7b1b6c2b50;hp=23aaf61065e436875dc24069b5b6cbac3572dd45;hpb=b4b0e14f550ed243a65d56e2ba1eccc66c6c3dd9;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene3d/internal/controls/model/model-impl.h b/dali-scene3d/internal/controls/model/model-impl.h index 23aaf61..d7924bf 100644 --- a/dali-scene3d/internal/controls/model/model-impl.h +++ b/dali-scene3d/internal/controls/model/model-impl.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -172,6 +173,11 @@ private: void OnSceneDisconnection() override; /** + * @copydoc CustomActorImpl::OnSizeSet( const Vector3& size ) + */ + void OnSizeSet(const Vector3& size) override; + + /** * @copydoc Toolkit::Control::GetNaturalSize */ Vector3 GetNaturalSize() override; @@ -205,7 +211,7 @@ private: /** * @brief Scales the model to fit the control or to return to original size. */ - void ScaleModel(); + void ScaleModel(bool useCurrentSize); /** * @brief Changes model anchor point to set the model at center or returns to the original model pivot. @@ -274,6 +280,11 @@ private: void OnIblLoadComplete(); /** + * @brief Update model root scale when Model size property is updated. + */ + void OnSizeNotification(Dali::PropertyNotification& source); + + /** * @brief Reset Resource loading tasks. */ void ResetResourceTasks(); @@ -304,12 +315,13 @@ private: void ResetCameraParameters(); private: - std::string mModelUrl; - std::string mResourceDirectoryUrl; - Scene3D::ModelNode mModelRoot; - std::vector mAnimations; - std::vector mCameraParameters; - WeakHandle mParentSceneView; + std::string mModelUrl; + std::string mResourceDirectoryUrl; + Scene3D::ModelNode mModelRoot; + std::vector mAnimations; + std::vector mCameraParameters; + WeakHandle mParentSceneView; + Dali::PropertyNotification mSizeNotification; // Asynchronous loading variable ModelLoadTaskPtr mModelLoadTask;