// EXTERNAL INCLUDES
#include <stdint.h>
#include <dali/public-api/common/dali-vector.h>
-#include <dali/devel-api/geometry/mesh-data.h>
-#include <dali/devel-api/images/atlas.h>
#include <dali/public-api/images/buffer-image.h>
+#include <dali/devel-api/images/atlas.h>
+#include <dali/devel-api/rendering/material.h>
namespace Dali
{
Dali::Vector< AtlasMetricsEntry > mAtlasMetrics; // container of atlas information
};
+ struct Vertex2D
+ {
+ Vector2 mPosition;
+ Vector2 mTexCoords;
+ };
+
+ struct Mesh2D
+ {
+ Vector< Vertex2D > mVertices;
+ Vector< unsigned int> mIndices;
+ };
+
/**
* Create an AtlasManager handle; this can be initialised with AtlasManager::New()
* Calling member functions with an uninitialised handle is not allowed.
*/
void GenerateMeshData( ImageId id,
const Vector2& position,
- MeshData& mesh,
+ Mesh2D& mesh,
bool addReference = true );
/**
* @param[in] second Second mesh
* @param[in] optimize should we optimize vertex data
*/
- void StitchMesh( MeshData& first,
- const MeshData& second,
+ void StitchMesh( Mesh2D& first,
+ const Mesh2D& second,
bool optimize = false );
/**
* @param[in] optimize should we optimize vertex data
* @param[out] out resulting mesh
*/
- void StitchMesh( const MeshData& first,
- const MeshData& second,
- MeshData& out,
+ void StitchMesh( const Mesh2D& first,
+ const Mesh2D& second,
+ Mesh2D& out,
bool optimize = false );
/**
*/
void GetMetrics( Metrics& metrics );
+ /**
+ * @brief Get Material used by atlas
+ *
+ * @param atlas[in] atlas AtlasId
+ *
+ * @return Material used by atlas
+ */
+ Material GetMaterial( AtlasId atlas ) const;
+
+ /**
+ * @brief Get Sampler used by atlas
+ *
+ * @param atlas[in] atlas AtlasId
+ *
+ * @return Sampler used by atlas
+ */
+ Sampler GetSampler( AtlasId atlas ) const;
private:
explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager *impl);
} // namespace Dali
-#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__
\ No newline at end of file
+#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__