Support constructing orthographic_camera from 2d box

This commit is contained in:
Nikita Lisitsa 2020-11-29 12:26:43 +03:00
parent 5ab15e263a
commit 76c465903b

View file

@ -59,6 +59,13 @@ namespace psemek::geom
orthographic_camera() = default;
orthographic_camera(geom::box<float_t, 2> const & box)
{
this->box[0] = box[0];
this->box[1] = box[1];
this->box[2] = {-1.f, 1.f};
}
orthographic_camera(geom::box<float_t, 3> const & box)
: box{box}
{}