X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Frendering%2Fgeometry.h;h=81e04210bb7fc59758ff93e2547218d2269eeffa;hb=4e17bda6fcb0eab26bf8fa551ec536549e103af3;hp=70c94c979882f14e680917e846ff830b85db465f;hpb=8d0e709881228a75a94d9e077087e9cc73363436;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/rendering/geometry.h b/dali/public-api/rendering/geometry.h index 70c94c9..81e0421 100644 --- a/dali/public-api/rendering/geometry.h +++ b/dali/public-api/rendering/geometry.h @@ -2,7 +2,7 @@ #define DALI_GEOMETRY_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -23,12 +23,16 @@ #include // uint16_t // INTERNAL INCLUDES -#include // Dali::Handle +#include // Dali::Handle #include // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX -#include // Dali::PropertyBuffer +#include // Dali::VertexBuffer namespace Dali { +/** + * @addtogroup dali_core_rendering_effects + * @{ + */ namespace Internal DALI_INTERNAL { @@ -43,7 +47,6 @@ class Geometry; class DALI_CORE_API Geometry : public BaseHandle { public: - /** * @brief Enumeration for the description of the type of geometry, used to determine how the coordinates will be used. * @SINCE_1_1.45 @@ -59,7 +62,6 @@ public: TRIANGLE_STRIP ///< A strip of triangles (after the first triangle, following triangles need only 1 point) @SINCE_1_1.45 }; - /** * @brief Creates a new Geometry object. * @@ -88,7 +90,7 @@ public: * @SINCE_1_1.43 * @param[in] handle Handle to an object */ - Geometry( const Geometry& handle ); + Geometry(const Geometry& handle); /** * @brief Downcasts to a geometry. @@ -98,7 +100,7 @@ public: * @param[in] handle Handle to an object * @return Geometry handle or an uninitialized handle */ - static Geometry DownCast( BaseHandle handle ); + static Geometry DownCast(BaseHandle handle); /** * @brief Assignment operator, changes this handle to point at the same object. @@ -107,22 +109,39 @@ public: * @param[in] handle Handle to an object * @return Reference to the assigned object */ - Geometry& operator=( const Geometry& handle ); + Geometry& operator=(const Geometry& handle); /** - * @brief Adds a PropertyBuffer to be used as source of geometry vertices. + * @brief Move constructor. * - * @SINCE_1_1.43 - * @param[in] vertexBuffer PropertyBuffer to be used as source of geometry vertices + * @SINCE_1_9.22 + * @param[in] rhs A reference to the moved handle + */ + Geometry(Geometry&& rhs); + + /** + * @brief Move assignment operator. + * + * @SINCE_1_9.22 + * @param[in] rhs A reference to the moved handle + * @return A reference to this handle + */ + Geometry& operator=(Geometry&& rhs); + + /** + * @brief Adds a VertexBuffer to be used as source of geometry vertices. + * + * @SINCE_1_9.27 + * @param[in] vertexBuffer VertexBuffer to be used as source of geometry vertices * @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove * this buffer if no longer required */ - std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer ); + std::size_t AddVertexBuffer(VertexBuffer& vertexBuffer); /** * @brief Retrieves the number of vertex buffers that have been added to this geometry. * - * @SINCE_1_1.43 + * @SINCE_1_9.27 * @return Number of vertex buffers that have been added to this geometry */ std::size_t GetNumberOfVertexBuffers() const; @@ -131,13 +150,13 @@ public: * @brief Removes a vertex buffer. * The index must be between 0 and GetNumberOfVertexBuffers(). * - * @SINCE_1_1.43 + * @SINCE_1_9.27 * @param[in] index Index to the vertex buffer to remove */ - void RemoveVertexBuffer( std::size_t index ); + void RemoveVertexBuffer(std::size_t index); /** - * @brief Sets a the index data to be used as a source of indices for the geometry + * @brief Sets the index data to be used as a source of indices for the geometry * Setting this buffer will cause the geometry to be rendered using indices. * To unset call SetIndexBuffer with a null pointer or count 0. * @@ -145,7 +164,18 @@ public: * @param[in] indices Array of indices * @param[in] count Number of indices in the array */ - void SetIndexBuffer( const uint16_t* indices, size_t count ); + void SetIndexBuffer(const uint16_t* indices, size_t count); + + /** + * @brief Sets the 32bits index data to be used as a source of indices for the geometry + * Setting this buffer will cause the geometry to be rendered using indices. + * To unset call SetIndexBuffer with a null pointer or count 0. + * + * @SINCE_2_2.16 + * @param[in] indices Array of indices with uint32_t elements. + * @param[in] count Number of indices in the array + */ + void SetIndexBuffer(const uint32_t* indices, size_t count); /** * @brief Sets the type of primitives this geometry contains. @@ -153,7 +183,7 @@ public: * @SINCE_1_1.43 * @param[in] geometryType Type of primitives this geometry contains */ - void SetType( Type geometryType ); + void SetType(Type geometryType); /** * @brief Gets the type of primitives this geometry contains. @@ -165,16 +195,18 @@ public: Type GetType() const; public: - /** * @brief The constructor. * @note Not intended for application developers. * @SINCE_1_1.43 * @param[in] pointer A pointer to a newly allocated Geometry */ - explicit DALI_INTERNAL Geometry( Internal::Geometry* pointer ); + explicit DALI_INTERNAL Geometry(Internal::Geometry* pointer); }; +/** + * @} + */ } //namespace Dali #endif // DALI_GEOMETRY_H