From 59a0e32991b5b714b6bdba504b6fbacdcd4b907a Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 2 May 2019 21:42:09 +0800 Subject: *misc --- source/modules/asura-core/mesh/mesh2d_data.h | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'source/modules/asura-core/mesh/mesh2d_data.h') diff --git a/source/modules/asura-core/mesh/mesh2d_data.h b/source/modules/asura-core/mesh/mesh2d_data.h index 78b2427..8cb9723 100644 --- a/source/modules/asura-core/mesh/mesh2d_data.h +++ b/source/modules/asura-core/mesh/mesh2d_data.h @@ -1,12 +1,15 @@ #ifndef __ASURA_MESH2D_DATA_H__ #define __ASURA_MESH2D_DATA_H__ +// cpp +#include + +// asura modules #include #include #include -#include - +// module #include "../graphics/color.h" #include "../graphics/gpu_buffer.h" @@ -21,8 +24,6 @@ namespace AsuraEngine struct Vertex { AEMath::Vector2f position; ///< 坐标 - AEMath::Vector2f tangent; ///< 切线 - AEMath::Vector2f normal; ///< 法线 AEGraphics::Color color; ///< 颜色 AEMath::Vector2f texCoord[4]; ///< UVs }; @@ -36,11 +37,26 @@ namespace AsuraEngine { public: + enum Mesh2DComponent + { + MESH2D_COMPONENT_POSITION, + MESH2D_COMPONENT_COLOR, + MESH2D_COMPONENT_TEXCOORD0, + MESH2D_COMPONENT_TEXCOORD1, + MESH2D_COMPONENT_TEXCOORD2, + MESH2D_COMPONENT_TEXCOORD3, + }; + void Decode(AEIO::DataBuffer& buffer) override; private: LUAX_DECL_FACTORY(Mesh2DData); + + LUAX_DECL_ENUM(Mesh2DComponent, 1); + + LUAX_DECL_METHOD(_GetVertices); + LUAX_DECL_METHOD(_GetVertex); /// /// mesh的所有顶点。 @@ -52,6 +68,8 @@ namespace AsuraEngine /// std::vector mIndices; + int mComponents; + }; } -- cgit v1.1-26-g67d0