mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 10:24:58 +01:00
Merge pull request #310 from miloszunio/pr/road-points-under-terrain
feat(editor): the points of the roads picked on the screen, also under the terrain; Alt+drag their height
This commit is contained in:
@@ -1924,6 +1924,11 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
bool follow{true}; // built roads are led over the ground between the clicked points
|
||||
float crossingspeed{30.f}; // speed limit on the junctions being made
|
||||
float heightstep{0.1f}; // how much the selected points are raised or lowered at a time
|
||||
// Alt+LMB on a point dragged up or down: the heights of the selected points changed by the drag, applied when let go
|
||||
bool lifting{false};
|
||||
float lift_mouse{0.0f}; // where on the screen the drag began, pixels down
|
||||
double lift_scale{0.0}; // metres for a pixel at the point picked
|
||||
std::vector<double> lift_from; // the heights of the selected points when the drag began
|
||||
bool ring{false}; // the build tool makes roundabouts
|
||||
float ringradius{15.f}; // of the middle of the road going around
|
||||
std::string island{"none"}; // what the middle of a roundabout is covered with
|
||||
@@ -1968,6 +1973,13 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
void draw_road_overlay() const;
|
||||
void update_road_tool();
|
||||
void road_click();
|
||||
// the point where pieces meet or end nearest to the cursor on the screen, within a few pixels; it's found under the
|
||||
// terrain too, where the click on the ground doesn't get near it
|
||||
bool road_joint_on_screen(glm::dvec3 &Joint) const;
|
||||
// Alt+LMB: the drag of the heights of the selected points begun on a point, and finished
|
||||
bool road_lift_start();
|
||||
void road_lift_finish();
|
||||
double road_lift_offset() const;
|
||||
void road_select(road_node *Road);
|
||||
void junction_select(junction_node *Junction);
|
||||
void road_apply();
|
||||
|
||||
Reference in New Issue
Block a user