voxspatium/src/planet/PlanetFace.h

40 lines
679 B
C++

#ifndef __PLANETFACE_H__
#define __PLANETFACE_H__
#include "util/Common.h"
#include "planet/Chunk.h"
#include "Shader.h"
#include "Camera.h"
#define CHUNKS_W 1
#define CHUNKS_D CHUNKS_W
#define CHUNKS_H 32
enum Face {
FACE_BOTTOM, FACE_TOP,
FACE_LEFT, FACE_RIGHT,
FACE_FRONT, FACE_BACK
};
class Planet;
class PlanetFace
{
public:
PlanetFace(Planet* planet, const unsigned int face = Face::FACE_BOTTOM);
~PlanetFace();
void tick(GLfloat dtime);
void draw(Camera* camera);
private:
Planet* m_planet;
unsigned int m_face;
glm::vec3 m_normal;
glm::vec3 m_pos;
int x, z;
Chunk* m_chunks[CHUNKS_W][CHUNKS_H][CHUNKS_D];
};
#endif // __PLANETFACE_H__