matrix: clarify look_at parameter names
rename 'centre' to 'target'; it's a lot more descriptive
This commit is contained in:
parent
a4a08aaa72
commit
b9fbcd6866
@ -277,10 +277,10 @@ matrix<S,T>::perspective (T fov, T aspect, range<T> Z)
|
|||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
matrix4<T>
|
matrix4<T>
|
||||||
matrix<S,T>::look_at (util::point<3,T> eye,
|
matrix<S,T>::look_at (util::point<3,T> eye,
|
||||||
util::point<3,T> centre,
|
util::point<3,T> target,
|
||||||
util::vector<3,T> up)
|
util::vector<3,T> up)
|
||||||
{
|
{
|
||||||
const auto f = normalised (centre - eye);
|
const auto f = normalised (target - eye);
|
||||||
const auto s = normalised (cross (f, up));
|
const auto s = normalised (cross (f, up));
|
||||||
const auto u = cross (s, f);
|
const auto u = cross (s, f);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user