mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 23:03:37 +00:00
28 lines
671 B
C++
28 lines
671 B
C++
#pragma once
|
|
|
|
#include <span>
|
|
#include <vector>
|
|
#include "Vertex.h"
|
|
#include "Tesselator.h"
|
|
#include "../../Minecraft.World/Util/ArrayWithLength.h"
|
|
|
|
class _Polygon {
|
|
public:
|
|
std::vector<Vertex> vertices;
|
|
int vertexCount;
|
|
|
|
private:
|
|
bool _flipNormal;
|
|
|
|
public:
|
|
_Polygon() = default;
|
|
_Polygon(std::span<const Vertex> vertices);
|
|
_Polygon(std::span<const Vertex, 4> vertices, int u0, int v0, int u1,
|
|
int v1, float xTexSize, float yTexSize);
|
|
_Polygon(std::span<const Vertex, 4> vertices, float u0, float v0, float u1,
|
|
float v1);
|
|
void mirror();
|
|
void render(Tesselator* t, float scale);
|
|
_Polygon* flipNormal();
|
|
};
|