35 lines
740 B
C++
35 lines
740 B
C++
#ifndef __PLANET_H__
|
|
#define __PLANET_H__
|
|
|
|
#include "util/Common.h"
|
|
#include "Shader.h"
|
|
#include "Camera.h"
|
|
|
|
class PlanetFace;
|
|
class Planet
|
|
{
|
|
public:
|
|
Planet(glm::vec3 position, float radius);
|
|
~Planet();
|
|
|
|
inline void setLightDirection(glm::vec3 lightDir) { m_lightDir = lightDir; }
|
|
inline glm::vec3 getLightDirection() const { return m_lightDir; }
|
|
|
|
inline float getRadius() const { return m_radius; }
|
|
inline glm::vec3 getPosition() const { return m_position; }
|
|
|
|
void tick(Camera* camera, GLfloat dtime);
|
|
void draw(Camera* camera, Shader* shader);
|
|
|
|
glm::mat4 getTransformation();
|
|
private:
|
|
glm::vec3 m_position;
|
|
float m_radius;
|
|
|
|
glm::vec3 m_lightDir;
|
|
|
|
// 6 faces
|
|
PlanetFace* m_faces[6];
|
|
};
|
|
#endif // __PLANET_H__
|