Skip to content

Commit 374d9ed

Browse files
committed
Added manager parameters to constants.hpp and more.
1 parent 34c0f88 commit 374d9ed

29 files changed

+75
-82
lines changed

bezier.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@ When the user calls the executable, he/she is at Path 1.
66
Each path consists of control points given as input by user, which are converted to an approximated smooth curve. The interpolation is done using nth-order Bezier-curve parameterization. The parameterization of the path is updated and rendered on screen at every input.
77

88
### Controls:
9-
* ##### Left-click -
10-
Takes the location of left click by user as the input of control points.
11-
* ##### Right-click -
12-
Stops the input of control points until 'R' is pressed.
13-
* ##### 'R' -
14-
Resumes the input of control points.
15-
* ##### 'N' -
16-
Moves to next path. Input of control stops until 'R' is pressed.
17-
* ##### 'P' -
18-
Moves to previous path. Input of control stops until 'R' is pressed.
19-
* ##### 'D' -
20-
Deletes the last control point in the current path.
21-
* ##### 'S' -
22-
The control points and interpolated points are stored in two raw files, with extension '.min.raw' and '.raw' respectively in models/Bezier-Curve.
23-
* ##### 'L' -
24-
The control points stored in the '.min.raw' are loaded and the paths are rendered with the screen displaying from Path 1.
25-
To start editing the paths, the user must press 'R' to resume.
26-
* ##### 'ESC' -
27-
The window is closed and all unsaved work is lost.
9+
* #### Keyboard:
10+
* ##### 'R' -
11+
Resumes the input of control points.
12+
* ##### 'N' -
13+
Moves to next path. Input of control stops until 'R' is pressed.
14+
* ##### 'P' -
15+
Moves to previous path. Input of control stops until 'R' is pressed.
16+
* ##### 'D' -
17+
Deletes the last control point in the current path.
18+
* ##### 'S' -
19+
The control points and interpolated points are stored in two raw files, with extension '.min.raw' and '.raw' respectively in models/Bezier-Curve.
20+
* ##### 'L' -
21+
The control points stored in the '.min.raw' are loaded and the paths are rendered with the screen displaying from Path 1.
22+
To start editing the paths, the user must press 'R' to resume.
23+
* ##### 'ESC' -
24+
The window is closed and all unsaved work is lost.
25+
* #### Mouse:
26+
* ##### Left-click -
27+
Takes the location of left click by user as the input of control points.
28+
* ##### Right-click -
29+
Stops the input of control points until 'R' is pressed.
2830

2931
### Code:
30-
Source directory - /src/Bezier-Curve
32+
Source directory - /src/Bezier-Curve
3133
Include directory - /include/road-network/Bezier-Curve

bin/input

-95.2 KB
Binary file not shown.

bin/output

-266 KB
Binary file not shown.

include/road_network/Bezier-Curve/path.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
#include <glm/vec2.hpp>
1515

1616
#include "road_network/shader_util.hpp"
17+
#include "road_network/constants.hpp"
1718

1819
#ifdef _WIN32
1920
#include <Windows.h>
2021
#else
2122
#include <unistd.h>
2223
#endif
2324

24-
// Average Interpolation Distance
25-
#define AIPD (1.0 / 30.0)
26-
2725
namespace soc {
2826

2927
std::vector<glm::vec2> bezier_curve_point(std::vector<glm::vec2> &pos,

include/road_network/Bezier-Curve/start_end.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <glm/vec2.hpp>
1515

1616
#include "road_network/shader_util.hpp"
17+
#include "road_network/constants.hpp"
1718

1819
#include "road_network/Bezier-Curve/path.hpp"
1920

@@ -23,8 +24,6 @@
2324
#include <unistd.h>
2425
#endif
2526

26-
#define PI 3.14159
27-
2827
namespace soc {
2928

3029
class Pairs {

include/road_network/Models/car_model.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include <glm/vec3.hpp>
1515
#include <glm/vec4.hpp>
1616

17-
#include "road_network/output_gl_framework.hpp"
1817
#include "road_network/shader_util.hpp"
18+
#include "road_network/constants.hpp"
1919

2020
#include "road_network/Road-Model/road.hpp"
2121

include/road_network/Models/traffic_light_model.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <glm/vec3.hpp>
1414
#include <glm/vec4.hpp>
1515

16-
#include "road_network/output_gl_framework.hpp"
16+
#include "road_network/constants.hpp"
1717
#include "road_network/shader_util.hpp"
1818

1919
#include "road_network/Road-Model/road.hpp"

include/road_network/Road-Graph/graph.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <math.h>
99
#include <algorithm>
1010

11+
#include "road_network/constants.hpp"
12+
1113
namespace soc {
1214

1315
struct Edge{

include/road_network/Road-Model/intersection.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
#include <glm/vec4.hpp>
1616

1717
#include "road_network/shader_util.hpp"
18+
#include "road_network/constants.hpp"
1819

1920
#include "road_network/Road-Model/road.hpp"
2021

21-
#define BZC_COUNT 20
22-
2322
namespace soc {
2423

2524
class Intersection{

include/road_network/Road-Model/road.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include <glm/vec3.hpp>
1414
#include <glm/vec4.hpp>
1515

16-
#include "road_network/output_gl_framework.hpp"
1716
#include "road_network/shader_util.hpp"
17+
#include "road_network/constants.hpp"
1818

1919
#include "road_network/Road-Model/texture.hpp"
2020

0 commit comments

Comments
 (0)