mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-17 16:17:02 +08:00
feat: add random seed
This commit is contained in:
@@ -18,7 +18,7 @@ public:
|
||||
static void window_reshape_callback(GLFWwindow* window, int new_width, int new_height);
|
||||
|
||||
static int start_cubed_application(int argc, char** argv);
|
||||
|
||||
static unsigned int seed();
|
||||
static float delte_time();
|
||||
static float get_fps();
|
||||
private:
|
||||
@@ -38,7 +38,7 @@ private:
|
||||
inline static double fps_time_count = 0.0f;
|
||||
inline static int frame_count = 0;
|
||||
inline static int fps = 0;
|
||||
|
||||
inline static unsigned int m_seed = 0;
|
||||
|
||||
void init();
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ public:
|
||||
Player& get_player(const std::string& name);
|
||||
void init_world();
|
||||
bool is_aabb_in_frustum(const glm::vec3& center, const glm::vec3& half_extents);
|
||||
|
||||
int get_block(const glm::ivec3& block_pos) const;
|
||||
bool is_block(const glm::ivec3& block_pos) const;
|
||||
|
||||
void need_gen();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
class PerlinNoise {
|
||||
public:
|
||||
static void init();
|
||||
static void init(unsigned int seed);
|
||||
static float noise(float x, float y, float z);
|
||||
private:
|
||||
static inline bool is_init = false;
|
||||
|
||||
Reference in New Issue
Block a user