#ifndef VOXEL_MESH_DATA_H #define VOXEL_MESH_DATA_H #include "core/reference.h" #include "core/vector.h" #include "scene/resources/material.h" #include "scene/resources/mesh.h" #include "scene/resources/surface_tool.h" class VoxelMeshData : public Reference { GDCLASS(VoxelMeshData, Reference) public: Ref get_material(); void set_material(Ref material); Ref create_mesh(); void add_vertex(Vector3 vertex); void add_normal(Vector3 normal); void add_index(int iundex); void add_vertices_from(Vector &vertices); void add_normals_from(Vector &normals); void add_indices_from(Vector &indices); void clear(); VoxelMeshData(); ~VoxelMeshData(); protected: static void _bind_methods(); private: Ref _material; Vector *_vertices; Vector *_normals; Vector *_indices; Ref _surface_tool; }; #endif