Separated setup code

This commit is contained in:
Segey Lapin
2021-10-24 02:20:15 +03:00
parent eef15ea522
commit 8a5e9e0186
4 changed files with 80 additions and 40 deletions

View File

@@ -69,6 +69,22 @@ struct half_edge {
float depth;
float length;
};
struct vshape {
AABB area;
int instance;
int e1, e2;
int site;
Vector3 p1, p2, p3;
float depth1, depth2;
/* filled later */
float total_width1,
total_width2;
PoolVector<String> parts_list1,
parts_list2;
Ref<Curve3D> curve3;
Ref<Curve3D> curve3a;
};
class RoadDiagram {
protected:
List<struct cluster> clusters;
@@ -128,19 +144,8 @@ protected:
Ref<RandomNumberGenerator> rnd;
int keep_seed;
List<struct cluster> clusters;
protected:
Rect2 bounds;
static void _bind_methods();
public:
struct vshape {
AABB area;
int instance;
int e1, e2;
int site;
Vector3 p1, p2, p3;
float depth1, depth2;
};
protected:
Vector<Vector2> diagram_vertices;
Vector<struct map_site> map_sites;
Vector<struct half_edge *> map_hedges;