Worked on buildings in lines
This commit is contained in:
@@ -14,17 +14,34 @@ protected:
|
||||
_Signal<void> lines_updated;
|
||||
|
||||
public:
|
||||
static ImmediateGeometry *get_debug_node();
|
||||
struct line_building_data {
|
||||
String building_key;
|
||||
uint64_t building_key_hash;
|
||||
float line_offset;
|
||||
float normal_offset;
|
||||
};
|
||||
struct line_segment {
|
||||
Vector3 p1;
|
||||
Vector3 p2;
|
||||
float length;
|
||||
Vector3 dir;
|
||||
Vector3 tangent;
|
||||
float offset;
|
||||
};
|
||||
struct road_line {
|
||||
std::vector<Transform> points;
|
||||
std::vector<int> indices;
|
||||
std::vector<struct line_building_data> buildings;
|
||||
std::vector<struct line_segment> segments;
|
||||
int lanes;
|
||||
int pattern;
|
||||
int flags;
|
||||
Dictionary metadata;
|
||||
_Signal<void> line_updated;
|
||||
};
|
||||
static ImmediateGeometry *get_debug_node();
|
||||
HashMap<String, struct road_line> lines;
|
||||
HashMap<String, Ref<Curve3D> > curves;
|
||||
static RoadLinesData *get_singleton();
|
||||
virtual ~RoadLinesData();
|
||||
static void cleanup();
|
||||
@@ -36,6 +53,13 @@ public:
|
||||
std::vector<Vector3> &road_lines_nodes);
|
||||
void set_debug_flags(int debug_flags);
|
||||
int get_debug_flags() const;
|
||||
void update_line_segments(const String &line);
|
||||
void line_add_building(const String &line, const String &key,
|
||||
float curve_offset, float normal_offset);
|
||||
void assign_close_buildings(const String &line);
|
||||
bool line_has_building(const String &line, const String &building_key);
|
||||
Vector3 get_point_by_offsets(const String &line, float dir_offset,
|
||||
float normal_offset);
|
||||
|
||||
private:
|
||||
void create_segments_from_lines();
|
||||
|
||||
Reference in New Issue
Block a user