Support constructing orthographic_camera from 2d box
This commit is contained in:
parent
5ab15e263a
commit
76c465903b
1 changed files with 7 additions and 0 deletions
|
|
@ -59,6 +59,13 @@ namespace psemek::geom
|
||||||
|
|
||||||
orthographic_camera() = default;
|
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)
|
orthographic_camera(geom::box<float_t, 3> const & box)
|
||||||
: box{box}
|
: box{box}
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue