Début de l'ajout des trottoirs au routes.
This commit is contained in:
parent
2db9bb222a
commit
959a188335
|
@ -17,8 +17,38 @@ std::ostream& operator<<(std::ostream& os, const Route& r) {
|
|||
return os << "Route " << r.ne << "-" << r.se << "-" << r.sw << "-" << r.nw;
|
||||
}
|
||||
|
||||
|
||||
void Route::triangulation() {
|
||||
triangles.reserve(2);
|
||||
addTriangle(new Triangle(ne, nw, sw, 0x36, 0x36, 0x36));
|
||||
addTriangle(new Triangle(sw, se, ne, 0x36, 0x36, 0x36));
|
||||
}
|
||||
|
||||
// Version avec trottoirs.
|
||||
/*void Route::triangulation() {
|
||||
triangles.reserve(6);
|
||||
Vertex nne, nnw, nse, nsw; // Nouvel emplacement de la route.
|
||||
Vertex pvLne, pvLnw, pvLsw, pvLse; // Trottoir Nord (pv => pavement)
|
||||
Vertex pvRne, pvRnw, pvRsw, pvRse; // Trottoir Sud (pv => pavement)
|
||||
|
||||
pvLnw = nw;
|
||||
pvLsw = sw;
|
||||
pvRne = ne;
|
||||
pvRse = se;
|
||||
pvLne = nw + ((ne - nw)/6);
|
||||
pvLse = sw + ((se - sw)/6);
|
||||
pvRnw = ne - ((ne - nw)/6);
|
||||
pvRsw = se - ((se - sw)/6);
|
||||
nnw = pvLne;
|
||||
nsw = pvLse;
|
||||
nne = pvRnw;
|
||||
nse = pvRsw;
|
||||
|
||||
addTriangle(new Triangle(pvLne, pvLnw, pvLsw, 0xEE, 0xEE, 0x00));
|
||||
addTriangle(new Triangle(pvLsw, pvLse, pvLne, 0xEE, 0xEE, 0x00));
|
||||
addTriangle(new Triangle(pvRne, pvRnw, pvRsw, 0xEE, 0xEE, 0x00));
|
||||
addTriangle(new Triangle(pvRsw, pvRse, pvRne, 0xEE, 0xEE, 0x00));
|
||||
|
||||
addTriangle(new Triangle(nne, nnw, nsw, 0x36, 0x36, 0x36));
|
||||
addTriangle(new Triangle(nsw, nse, nne, 0x36, 0x36, 0x36));
|
||||
}*/
|
||||
|
|
3
view.cpp
3
view.cpp
|
@ -1,7 +1,8 @@
|
|||
#include "all_includes.hh"
|
||||
|
||||
// camera(Camera(Vertexf(1000,1000,2000),45,100,1000,0.6)
|
||||
View::View(Chose* root) : root(root), camera(Camera(Vertexf(13126,19103,30539),90,179,1000,0.6)) {
|
||||
//View::View(Chose* root) : root(root), camera(Camera(Vertexf(13126,19103,30539),90,179,1000,0.6)) {
|
||||
View::View(Chose* root) : root(root), camera(Camera(Vertexf(1493,18122,2246),13,179,1000,0.6)) {
|
||||
initWindow();
|
||||
mainLoop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user