X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmatrix.cpp;h=cac4a4fcd99afe6d2e110c80030aad39dd9352c1;hb=c87860db3b23a98eda1adfe59acddffdb6eb8420;hp=8cc9dcba3a513e49b5b7d9367bd3dae733e371ee;hpb=2b779717e42b514210f7128cf9aee2276650e003;p=libs%2Fgl.git diff --git a/source/matrix.cpp b/source/matrix.cpp index 8cc9dcba..cac4a4fc 100644 --- a/source/matrix.cpp +++ b/source/matrix.cpp @@ -63,7 +63,7 @@ Vector4 Matrix::operator*(const Vector4 &vec) const Vector3 Matrix::operator*(const Vector3 &vec) const { - return Geometry::reduce_vector((*this)*Geometry::augment_vector(vec, 1.0f)); + return Vector3((*this)*Vector4(vec, 1.0f)); } double Matrix::operator[](unsigned i) const @@ -140,9 +140,9 @@ Matrix Matrix::frustum_centered(double w, double h, double n, double f) return frustum(-w/2, w/2, -h/2, h/2, n, f); } -Matrix Matrix::perspective(double h, double a, double n, double f) +Matrix Matrix::perspective(const Angle &h, double a, double n, double f) { - double hh = tan(h/2)*n; + double hh = tan(h/2.0)*n; return frustum(-hh*a, hh*a, -hh, hh, n, f); }