X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fmesh%2Fmesh-visual.h;h=99ed559b7e007928d7ad45539c6008e5d1579cf6;hb=b4f3bbb0d784ad6f981351cae3d949f736b8ca36;hp=4a2927c49960f366a941053947e658656240b65b;hpb=c3f9162ab11786380e2ec9c55f217c2daf7722e8;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/mesh/mesh-visual.h b/dali-toolkit/internal/visuals/mesh/mesh-visual.h index 4a2927c..99ed559 100644 --- a/dali-toolkit/internal/visuals/mesh/mesh-visual.h +++ b/dali-toolkit/internal/visuals/mesh/mesh-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_MESH_VISUAL_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #include #include +#include // INTERNAL INCLUDES #include @@ -36,6 +37,9 @@ namespace Toolkit namespace Internal { +class MeshVisual; +typedef IntrusivePtr< MeshVisual > MeshVisualPtr; + /** * The visual which renders a 3D object to the control's quad * @@ -56,40 +60,54 @@ class MeshVisual: public Visual::Base public: /** - * @brief Constructor. + * @brief Create a new mesh visual. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] properties A Property::Map containing settings for this visual + * @return A smart-pointer to the newly allocated visual. */ - MeshVisual( VisualFactoryCache& factoryCache ); + static MeshVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties ); + +public: // from Visual /** - * @brief A reference counted object may only be deleted by calling Unreference(). + * @copydoc Visual::Base::CreatePropertyMap */ - virtual ~MeshVisual(); + void DoCreatePropertyMap( Property::Map& map ) const override; -public: // from Visual + /** + * @copydoc Visual::Base::CreateInstancePropertyMap + */ + void DoCreateInstancePropertyMap( Property::Map& map ) const override; + +protected: /** - * @copydoc Visual::Base::SetSize + * @brief Constructor. + * + * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object */ - virtual void SetSize( const Vector2& size ); + MeshVisual( VisualFactoryCache& factoryCache ); /** - * @copydoc Visual::Base::CreatePropertyMap + * @brief A reference counted object may only be deleted by calling Unreference(). */ - virtual void DoCreatePropertyMap( Property::Map& map ) const; + virtual ~MeshVisual(); -protected: + /** + * @copydoc Visual::Base::DoSetProperties + */ + void DoSetProperties( const Property::Map& propertyMap ) override; /** - * @copydoc Visual::Base::DoInitialize + * @copydoc Visual::Base::OnSetTransform */ - virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ); + void OnSetTransform() override; /** * @copydoc Visual::Base::DoSetOnStage */ - virtual void DoSetOnStage( Actor& actor ); + void DoSetOnStage( Actor& actor ) override; public: @@ -152,6 +170,13 @@ private: */ bool LoadTextures(); + /** + * Helper method to set individual values by index key. + * @param[in] index The index key of the value + * @param[in] value The value + */ + void DoSetProperty( Property::Index index, const Property::Value& value ); + private: // Undefined