summaryrefslogtreecommitdiff
path: root/game/environment.h
blob: 271792fbc1667a5f9d94a2b5e39602615f580178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "config/types.h"
#include "worldobject.h"

class SceneRenderer;
class SceneProvider;

class Environment : public WorldObject {
public:
	Environment();
	void tick(TickDuration elapsed) override;
	void render(const SceneRenderer &, const SceneProvider &) const;
	[[nodiscard]] Direction2D getSunPos() const;
	[[nodiscard]] time_t getWorldTime() const;
	[[nodiscard]] static Direction2D getSunPos(Direction2D position, time_t time);

private:
	time_t worldTime;
	glm::vec<2, Angle> earthPos;
};