mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add custom-models in hand support
This commit is contained in:
parent
5ed37d8604
commit
5a431ed898
6 changed files with 180 additions and 7 deletions
|
|
@ -4,6 +4,8 @@
|
|||
#include <vector>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "maths/UVRegion.hpp"
|
||||
|
||||
namespace model {
|
||||
struct Vertex {
|
||||
glm::vec3 coord;
|
||||
|
|
@ -14,9 +16,27 @@ namespace model {
|
|||
struct Mesh {
|
||||
std::string texture;
|
||||
std::vector<Vertex> vertices;
|
||||
|
||||
void addPlane(glm::vec3 pos, glm::vec3 right, glm::vec3 up, glm::vec3 norm);
|
||||
void addBox(glm::vec3 pos, glm::vec3 size);
|
||||
bool lighting = true;
|
||||
|
||||
void addPlane(
|
||||
const glm::vec3& pos,
|
||||
const glm::vec3& right,
|
||||
const glm::vec3& up,
|
||||
const glm::vec3& norm
|
||||
);
|
||||
void addPlane(
|
||||
const glm::vec3& pos,
|
||||
const glm::vec3& right,
|
||||
const glm::vec3& up,
|
||||
const glm::vec3& norm,
|
||||
const UVRegion& region
|
||||
);
|
||||
void addBox(const glm::vec3& pos, const glm::vec3& size);
|
||||
void addBox(
|
||||
const glm::vec3& pos,
|
||||
const glm::vec3& size,
|
||||
const UVRegion (&texfaces)[6]
|
||||
);
|
||||
void scale(const glm::vec3& size);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue