voxelman/library/voxel_surface_merger.h

34 lines
772 B
C
Raw Permalink Normal View History

#ifndef VOXEL_SURFACE_MERGER_H
#define VOXEL_SURFACE_MERGER_H
#include "voxel_surface.h"
2019-11-09 21:51:40 +01:00
#include "scene/resources/texture.h"
#include "../../texture_packer/texture_packer.h"
class VoxelSurfaceMerger : public VoxelSurface {
GDCLASS(VoxelSurfaceMerger, VoxelSurface)
public:
2019-11-09 21:51:40 +01:00
Ref<AtlasTexture> get_region(const VoxelSurfaceSides side);
void set_region(const VoxelSurfaceSides side, Ref<AtlasTexture> texture);
2019-11-09 21:51:40 +01:00
Ref<Texture> get_texture(const VoxelSurfaceSides side);
void set_texture(const VoxelSurfaceSides side, Ref<Texture> texture);
void refresh_rects();
VoxelSurfaceMerger();
~VoxelSurfaceMerger();
protected:
static void _bind_methods();
private:
2019-11-09 21:51:40 +01:00
Ref<AtlasTexture> _regions[VOXEL_SIDES_COUNT];
Ref<Texture> _textures[VOXEL_SIDES_COUNT];
};
#endif