matrix: check that the look_at up vector is normalised
This commit is contained in:
parent
2e54950b1a
commit
a78ed2b879
@ -280,6 +280,8 @@ matrix<S,T>::look_at (util::point<3,T> eye,
|
|||||||
util::point<3,T> target,
|
util::point<3,T> target,
|
||||||
util::vector<3,T> up)
|
util::vector<3,T> up)
|
||||||
{
|
{
|
||||||
|
CHECK (is_normalised (up));
|
||||||
|
|
||||||
auto forward = normalised (eye.to (target));
|
auto forward = normalised (eye.to (target));
|
||||||
auto side = normalised (cross (forward, up));
|
auto side = normalised (cross (forward, up));
|
||||||
up = cross (side, forward);
|
up = cross (side, forward);
|
||||||
|
Loading…
Reference in New Issue
Block a user