diff options
author | chai <chaifix@163.com> | 2019-04-08 22:31:12 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-08 22:31:12 +0800 |
commit | 4ea4bbfcb03091cb987dc151d41980ec16f3d18d (patch) | |
tree | bdbe56d8c570b5f243744fbfc5a6cdd2c4f6dc4f /source/modules/asura-core/mesh/mesh2d_data.h | |
parent | e47baca4f23db43ec91fbf64d5d06d7c0dbee495 (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/mesh/mesh2d_data.h')
-rw-r--r-- | source/modules/asura-core/mesh/mesh2d_data.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/source/modules/asura-core/mesh/mesh2d_data.h b/source/modules/asura-core/mesh/mesh2d_data.h index e69de29..ad4b6c8 100644 --- a/source/modules/asura-core/mesh/mesh2d_data.h +++ b/source/modules/asura-core/mesh/mesh2d_data.h @@ -0,0 +1,58 @@ +#ifndef __ASURA_MESH2D_DATA_H__ +#define __ASURA_MESH2D_DATA_H__ + +#include <asura-utils/scripting/portable.hpp> +#include <asura-utils/math/vector2.hpp> +#include <asura-utils/io/decoded_data.h> + +#include <vector> + +#include "../graphics/color.h" +#include "../graphics/gpu_buffer.h" + +namespace AsuraEngine +{ + namespace Mesh + { + + /// + /// Mesh2DĶݣindexʹáAsura 2D mesh֧4UVһϡ + /// + struct Vertex + { + AEMath::Vector2f position; ///< + AEMath::Vector2f tangent; ///< + AEMath::Vector2f normal; ///< + AEGraphics::Color color; ///< ɫ + AEMath::Vector2f texCoord[4]; ///< UVs + }; + + /// + /// meshĶݺ + /// + class Mesh2DData + : AEIO::DecodedData + , AEScripting::Portable<Mesh2DData> + { + public: + + void Decode(AEIO::DataBuffer& buffer) override; + + private: + + /// + /// meshж㡣 + /// + std::vector<Vertex*> mVertices; + + /// + /// ebo + /// + std::vector<float> mIndices; + + }; + + } +} + +#endif
\ No newline at end of file |