diff options
Diffstat (limited to 'source/modules/asura-core/mesh/mesh2d_data.h')
-rw-r--r-- | source/modules/asura-core/mesh/mesh2d_data.h | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/source/modules/asura-core/mesh/mesh2d_data.h b/source/modules/asura-core/mesh/mesh2d_data.h deleted file mode 100644 index 024ba02..0000000 --- a/source/modules/asura-core/mesh/mesh2d_data.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef __ASURA_MESH2D_DATA_H__ -#define __ASURA_MESH2D_DATA_H__ - -// cpp -#include <vector> - -// asura modules -#include <asura-utils/scripting/portable.hpp> -#include <asura-utils/math/vector2.hpp> -#include <asura-utils/io/decoded_data.h> - -// module -#include "../graphics/color.h" -#include "../graphics/gpu_buffer.h" - -namespace_begin(AsuraEngine) -namespace_begin(Mesh) - -/// -/// Mesh2DĶݣindexʹáAsura 2D mesh֧4UVһϡ -/// -struct Vertex -{ - AEMath::Vector2f position; ///< - AEGraphics::Color color; ///< ɫ - AEMath::Vector2f texCoord[4]; ///< UVs -}; - -/// -/// meshĶݺ -/// -class Mesh2DData - : AEIO::DecodedData - , AEScripting::Portable<Mesh2DData> -{ -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ж㡣 - /// - std::vector<Vertex*> m_Vertices; - - /// - /// ebo - /// - std::vector<int> m_Indices; - - int m_Components; - -}; - -namespace_end -namespace_end - -namespace AEMesh = AsuraEngine::Mesh; - -#endif
\ No newline at end of file |