mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-01-26 04:33:33 +00:00
2D3D:: fixed grids
This commit is contained in:
10
graph.cpp
10
graph.cpp
@@ -4393,18 +4393,18 @@ void make_clipping_planes() {
|
||||
add_clipping_plane(+tx, -ty, +tx, +ty);
|
||||
}
|
||||
|
||||
void gridline(const hyperpoint h1, const hyperpoint h2, color_t col, int prec) {
|
||||
void gridline(const transmatrix& V1, const hyperpoint h1, const transmatrix& V2, const hyperpoint h2, color_t col, int prec) {
|
||||
if(WDIM == 2 && GDIM == 3) {
|
||||
ld eps = geom3::human_height/100;
|
||||
queueline(orthogonal_move(h1,geom3::FLOOR+eps), orthogonal_move(h2,geom3::FLOOR+eps), col, prec);
|
||||
queueline(orthogonal_move(h1,geom3::WALL-eps), orthogonal_move(h2,geom3::WALL-eps), col, prec);
|
||||
queueline(V1*orthogonal_move(h1,geom3::FLOOR+eps), V2*orthogonal_move(h2,geom3::FLOOR+eps), col, prec);
|
||||
queueline(V1*orthogonal_move(h1,geom3::WALL-eps), V2*orthogonal_move(h2,geom3::WALL-eps), col, prec);
|
||||
}
|
||||
else
|
||||
queueline(h1, h2, col, prec);
|
||||
queueline(V1*h1, V2*h2, col, prec);
|
||||
}
|
||||
|
||||
void gridline(const transmatrix& V, const hyperpoint h1, const hyperpoint h2, color_t col, int prec) {
|
||||
gridline(V*h1, V*h2, col, prec);
|
||||
gridline(V, h1, V, h2, col, prec);
|
||||
}
|
||||
|
||||
void draw_grid_at(cell *c, const transmatrix& V) {
|
||||
|
||||
Reference in New Issue
Block a user