mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-27 11:29:19 +01:00
Also merged directions.h into WaveFormCollapse.
This commit is contained in:
parent
9f190ca13c
commit
bcfb45d049
@ -1,11 +0,0 @@
|
|||||||
#ifndef FAST_WFC_DIRECTION_HPP_
|
|
||||||
#define FAST_WFC_DIRECTION_HPP_
|
|
||||||
|
|
||||||
constexpr int directions_x[4] = { 0, -1, 1, 0 };
|
|
||||||
constexpr int directions_y[4] = { -1, 0, 0, 1 };
|
|
||||||
|
|
||||||
constexpr uint32_t get_opposite_direction(uint32_t direction) {
|
|
||||||
return 3 - direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#include "core/reference.h"
|
#include "core/reference.h"
|
||||||
|
|
||||||
#include "direction.h"
|
|
||||||
|
|
||||||
class WaveFormCollapse : public Reference {
|
class WaveFormCollapse : public Reference {
|
||||||
GDCLASS(WaveFormCollapse, Reference);
|
GDCLASS(WaveFormCollapse, Reference);
|
||||||
|
|
||||||
@ -52,6 +50,9 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static constexpr int directions_x[4] = { 0, -1, 1, 0 };
|
||||||
|
static constexpr int directions_y[4] = { -1, 0, 0, 1 };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool get_eriodic_output() const;
|
bool get_eriodic_output() const;
|
||||||
void set_periodic_output(const bool val);
|
void set_periodic_output(const bool val);
|
||||||
@ -107,6 +108,10 @@ public:
|
|||||||
propagating.push_back(PropagatingEntry(y, x, pattern));
|
propagating.push_back(PropagatingEntry(y, x, pattern));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr uint32_t get_opposite_direction(uint32_t direction) {
|
||||||
|
return 3 - direction;
|
||||||
|
}
|
||||||
|
|
||||||
void normalize(Vector<double> &v);
|
void normalize(Vector<double> &v);
|
||||||
Vector<double> get_plogp(const Vector<double> &distribution);
|
Vector<double> get_plogp(const Vector<double> &distribution);
|
||||||
double get_min_abs_half(const Vector<double> &v);
|
double get_min_abs_half(const Vector<double> &v);
|
||||||
|
Loading…
Reference in New Issue
Block a user